I have this error in firebase/auth.js and firebase/database.js:
rollup: Use of eval is strongly discouraged, as it posses security risks
This must be error in firebase node_module! I can't understand what's going on.
It's working When I remove firebase.initializeApp(config)
But, having same error on adding above.
Using Firebase v3 in Ionic2 Via NPM is not working at all!! Had lot's of problems in their node module.
So, I found a solution.. follow the link below, where discussion has been made for similar problem.
https://forum.ionicframework.com/t/is-it-possible-to-use-firebase-v3-in-ionic-2/54387
And here is the direct link of solution ..
https://github.com/aaronksaunders/ionic2firebase3
Simply, do not use Firebase v3 in Ionic2 Via NPM, unless they fix problems in their firebase node module.
Related
I found Pusher-js docs is not very usefull to get start with, Is there any tutorial I can follow to learn exactly how the flow will look like?
The front end javascript will be the same: https://pusher.com/docs/channels/getting_started/javascript/ . If you're using Vercel, you can use their serverless functions for backend message triggering. I got it working with Python. Follow their instructions on how to add the Pusher server library https://vercel.com/docs/concepts/functions/supported-languages
My app does not use ember-data, it uses only apollo for graphql to retrieve/manage data.
But after installing emberfire, we must have to install ember-data too.
We just use emberfire/firebase for authentication :)
If I try to remove it I've got an error:
Cannot find module 'ember-data/package.json' from '/Users/bruno/octane-graphql/node_modules/emberfire'
The solution here is simple: don't use emberfire!
Basically the entire concept of emberfire is to intergrate firebase into ember-data. If you just want to use some firebase services use the firebase sdk directly.
emberfire uses ember-data under the hood. So you need to have it installed.
i have to implement mixpannel analytics in one of my app.
i checked out Mixpannel officail site and react-native-mixpannel
but i'm struggling how to get started with it.
How to use it from scratch and what things i need for it like firebase
or not ?
Please suggest me some article or something else from where i can implement mixpannel anaylits to my react native app
Thanks
First of all did you use react-native init AwesomeProject or expo new?
With the first one you have access to the native code for iOS and Android.
For expo you have only the JavaScript files and you can't use this SDK.
I am trying to implement login in my ionic v3 application by the firebase phone authentication service.
I've read several tutorials. Between them:
1- https://javebratt.com/firebase-phone-authentication/
2- https://github.com/jestcastro/cordova-plugin-firebase#f778505942bbf7518df75545c6a6b32efa4d5229
-
The comments in link 1 teach how to use the cordova-plugin-firebase of link 2.
I tried to do the documentation. I did everything exactly the same, as it is said in the links.
Yet,
When I use the function ( window).FirebasePlugin.getVerificationID, from link 2, gives the error: ERROR TypeError: Can not read property 'getVerificationID' of undefined
I did exactly the same. And I've been trying to solve this problem for a few days. Does anyone have a solution?
I think the cordova-plugin-firebase is for ionic v1. When you have ionic v3 in use, then you will use the cordova-plugin-fcm.
When using Firebase on ReactNative, it will show such error message:
can't find variable process
However, if I require firebase/lib/firebase-web.js manually, it will show:
can't find variable document
How can I resolve this?
I just went through the same issue while trying to use sockets.io in my react native app so hopefully I can help.
The reason that you cannot use firebase's node module is because there hasn't been a polyfill created yet for websockets support (which firebase is dependent on) in react native.
If you take a look at issue #619 in react native's repo you'll find the current discussion on creating a websockets api polyfill.
The way that we solved it is by using Jason's modified version of the sockets library and creating our own repo around just that file. Then we added the line below to our package.json dependencies.
"react-sockets": "crewapp/react-native-sockets-io"
The reason that Jason's version of the sockets.io client file works is because react-native is added as a user agent. You can find the code that makes this change at the top of the file:
window.navigator = {
userAgent: "react-native"
}
Once you've gone through these steps you should be able to require sockets.io / firebase as normal.
Just figuring it our. Pavan's answer is helpful, but it is not quite true when using with Firebase.
For firebase, please follow the steps:
Download the firebase-debug.js from wsExample. Or you can just install wsExample by npm and require the firebase-debug.js inside it.
Use badfortrains's forked React-Native:
"react-native": "git://github.com/badfortrains/react-native#WebSocket"
New the Firebase like this:
var firebase = require("../../firebase-debug.js");
var rootRef = new Firebase(Const.FB_ROOT);
Things should just work now!
I had issues with socket.io on React Native too, solution was to get notifications about new data and if data is big enough - get it by simple RESTfull request. in my case data was small enough to be sent all within notifications API.
I was using GCM service to send notification to phone from nodejs server. BTW, it uses less battery then socket connection and works great :)