firebase-react-native-sample icon indicating copy to clipboard operation
firebase-react-native-sample copied to clipboard

Authorization Example since 3.1?

Open ghost opened this issue 7 years ago • 22 comments

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.

ghost avatar Sep 11 '16 01:09 ghost

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.

qualifyapp avatar Sep 13 '16 19:09 qualifyapp

any solution for this?

yernandus avatar Dec 02 '16 23:12 yernandus

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?

ykravv avatar Dec 08 '16 16:12 ykravv

I'm having this problem still...has it been resolved?

georgeludwig avatar Dec 27 '16 01:12 georgeludwig

same problem

helloncanella avatar Jan 18 '17 18:01 helloncanella

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?

Erin007 avatar Jan 19 '17 05:01 Erin007

I have the same problem

hugohow avatar Jan 19 '17 11:01 hugohow

I have the same problem

ashokseervidev avatar Jan 22 '17 11:01 ashokseervidev

I have the same problem

samf1981 avatar Feb 01 '17 05:02 samf1981

@davideast Any workaround for this?

smkhalsa avatar Feb 08 '17 17:02 smkhalsa

yep, same :/

csomakk avatar Mar 01 '17 23:03 csomakk

same for me the latest firebase. however this works just fine: npm install --save [email protected] hope it helped.

valinaga avatar Mar 02 '17 11:03 valinaga

I got an answer here.

In short words: close your device toolbar in chrome (ctrl+shift+m, cmd+shift+m)

chuece avatar Mar 17 '17 07:03 chuece

Thanks @chuece. Worked for me :smiley:

loloof64 avatar Mar 18 '17 22:03 loloof64

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 😸

Salakar avatar Apr 06 '17 09:04 Salakar

Thanks @chuece. Worked for me 😃

AggarwalAnkit avatar Apr 17 '17 21:04 AggarwalAnkit

@chuece What a answer 👍 👍 👍 wow !! ..

imchathu87 avatar Apr 18 '17 06:04 imchathu87

@davideast can you please close the issue?

rafaelcavalcante avatar May 22 '17 13:05 rafaelcavalcante

👍 @chuece - im not sure how this is even a thing but nice one

atomicleopard avatar Jul 27 '17 01:07 atomicleopard

Sadly this is still an issue.

michaelfriedman avatar Sep 05 '17 13:09 michaelfriedman

just got bitten by this

ippa avatar Oct 14 '17 11:10 ippa

No, don't close the issue until it's resolved please.

michaelfriedman avatar Oct 14 '17 19:10 michaelfriedman