updateCurrentUser failed: First argument "user" must be an instance of Firebase User or null.
See original GitHub issueDescribe your environment
- Operating System version: Mac
- Browser version: Google Chrome Version 71.0.3578.98
- Firebase UI version:
"react-firebaseui": "^3.1.2"
- Firebase SDK version:
"firebase": "5.7.1"
Describe the problem
I’m using the https://github.com/firebase/firebaseui-web-react
wrapper
My implementation it seems to do the login properly on firebase (as i can see the mail logged on “Users” but on my react app I’m getting this error all the time
updateCurrentUser failed: First argument "user" must be an instance of Firebase User or null. Dismiss
No signInSuccessUrl
redirection or signInSuccessWithAuthResult
callback works after this error
signInSuccessUrl: '/',
callbacks: {
signInSuccessWithAuthResult: function(authResult, redirectUrl) {
console.log(authResult)
console.log(redirectUrl)
return true
}
}
I have no clue about how to debug this or what would be the error
Any ideas?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Firebase UI: updateCurrentUser failed: First argument "user ...
updateCurrentUser failed : First argument "user" must be an instance of Firebase User or null. How can I restore the auth functionality?
Read more >First argument "user" must be an instance of Firebase User or ...
updateCurrentUser failed : First argument "user" must be an instance of Firebase User or null.
Read more >Auth | JavaScript SDK | Firebase JavaScript API reference
Reference for Auth. ... The app associated with the Auth service instance. example ... This function will create a new user account and...
Read more >UNPKG - @firebase/auth
RECOVER_EMAIL action, which allows a user to undo an email address ... the link is handled in the app directly, this is the...
Read more >firebase@9.15.0 - jsDocs.io
email and error.credential (firebase.auth.AuthCredential) fields are also provided. You have to link the credential to the existing user with ...
Read more >Top Related Medium Post
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I hit this error, and the reason was we had two copies of Firebase (one we were including manually, one which npm was pulling in). That caused this bug because for some reason it was using the manual one we specified to invoke the FirebaseUI React component and then calling updateCurrentUser() in the underlying npm version of Firebase (and thus checking the type there). Both versions of Firebase were 5.7.1 so it wasn’t a versioning issue, it was that we had two copies of Firebase and the component wasn’t consistent about which one it used (which I’d argue is a bug in FirebaseUI or the React-FirebaseUI module, but I ain’t dying on that hill).
Same problem here, but this happens to me only when using typescript. I made a test with similar code with javascript with the same environment and same code and it did work.
The actual firebase auth works. A new user is been created to firebase app but then something goes wrong. I have not yet been able to find the exact place where.