Exception thrown with authState upon login/logout/re-login:
Uncaught TypeError: Cannot read property 'resolve' of undefined
at lm.h.tc (auth.esm.js?b7aa:317)
at lm.d [as onAuthStateChanged] (auth.esm.js?b7aa:340)
at Login.componentDidMount (Login.js?25f4:53)
both using @firebase/auth @ 0.11.0, fine with @firebase/app 0.3.17 but fail with @firebase/app 0.4.0,
working on it, cannot reproduce elsewhere...
working on it, cannot reproduce elsewhere...
@henrylearn2rock I cannot reproduce this with firebase 6.0.0. Can you try to do a clean npm install to see if it works? You could remove the node_modules and package-lock.json and run npm install again.
@wti806 I tried what you suggested, I even cleared the yarn cache, but I am still getting the same error
Here is the error message from Firefox:
TypeError: _firebase_app__WEBPACK_IMPORTED_MODULE_0___default.a.Promise is undefined[Learn More] main.bundle.js line 1073 > eval:320:33
tc auth.esm.js:317
d auth.esm.js:340
componentDidMount Login.js:53
I suspect it's caused by "Breaking change: Removed polyfills in the Firebase package." since it is complaining about Promise, which is firebase.promise in the code, is undefined.
https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/src/auth.js#L1349
It's actually not that. We removed firebase.Promise from the interface, but Auth is still using it. Instead, Auth should use native Promise directly. We will make a patch release to fix it. Thanks a lot for reporting it.
Please upgrade to 6.0.1 for the fix.
Most helpful comment
It's actually not that. We removed
firebase.Promisefrom the interface, but Auth is still using it. Instead, Auth should use native Promise directly. We will make a patch release to fix it. Thanks a lot for reporting it.