firebase-react-native-sample
firebase-react-native-sample copied to clipboard
Authorization Example since 3.1?
It has been announced that as of the release of Firebase 3.1.0 Firebase Authentication works with React, however I've found myself having a lot of problems, I haven't gone through the process of attempting a manual automatic login flow using signInWithEmailAndPassword`
The standard callback for managing authorization state changes immediately throws an error, it seems like it's because it's trying to use DOM local storage,
firebase.auth().onAuthStateChanged(...)
The actual callback fires, however immediately after the callback function is executed, you're given an error:
ExceptionsManager.js:78
Unhandled JS Exception: Cannot read property 'getItem' of undefined
Is this expected? I've noticed a few posts about examples using React and Firebase since 3.1, but none of them use Auth.
For anyone that runs into this, it turns out everything works as it should, but Firebase Auth will not work correctly while Remote JS Debugging is active.
any solution for this?
It reproduces even if you put in rules "true" for read and write and don't use auth. So, you just not able to use Remote JS Debugging for your app with firebase.
Maybe there is some workaround?
I'm having this problem still...has it been resolved?
same problem
I'm having the same problem with Firebase and React Native. Closing the Remote JS Debugging before reloading resolves the issue, but it's still annoying. Any way to make Firebase play nicely with debugging?
I have the same problem
I have the same problem
I have the same problem
@davideast Any workaround for this?
yep, same :/
same for me the latest firebase.
however this works just fine:
npm install --save [email protected]
hope it helped.
I got an answer here.
In short words: close your device toolbar in chrome (ctrl+shift+m, cmd+shift+m)
Thanks @chuece. Worked for me :smiley:
I'd like to suggest using react-native-firebase - it's a small JS bridge to native side - all the work is done by the official native firebase SDK's for android and IOS and is therefore much faster and doesn't reduce the JS frame rate.
It also includes storage, crash reporting, analytics and offline capabilities compared to the web SDK. And of course no remote debugging issues 😸
Thanks @chuece. Worked for me 😃
@chuece What a answer 👍 👍 👍 wow !! ..
@davideast can you please close the issue?
👍 @chuece - im not sure how this is even a thing but nice one
Sadly this is still an issue.
just got bitten by this
No, don't close the issue until it's resolved please.