'updateCurrentUser failed: First argument "user" must be an instance of Firebase User or null.' when running in Firebase Hosting
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- firebase, javascript, react
- Domain
- authentication, frontend
Research direction
Start by reproducing the issue in Firebase Hosting with the reserved /__/firebase/init.js script and the StyledFirebaseAuth component using firebase.auth(). Check how the CDN Firebase instance interacts with the npm-loaded FirebaseUI dependency. Done means establishing and documenting a supported setup that avoids the duplicate-global warning and the updateCurrentUser error.
Written by the indexing model from the issue text.
Description
Hi - I'm not sure if this is a bug report for FirebaseUI-web-react of FirebaseUI-web; I suspect this is the correct place but please tell me if not.
I'm running my app in Firebase Hosting, and I'm linking the magic/reserved URLs that autoconfigure firebase (<script src="/__/firebase/init.js"></script>)
Later, when <StyledFirebaseAuth uiConfig={uiConfig} firebaseAuth={firebase.auth()}/> is mounted, I get this warn on the console:
Warning: Firebase is already defined in the global scope. Please make sure Firebase library is only loaded once.
This warning is there because window.firebase is defined (it was defined from in the init.js loaded from the reserved URL).
I understand this is because I have a "version" of firebase loaded from the CDN and another "version" of firebase loaded from NPM (from a firebaseui dependency).
I would ignore this warning (since I made sure I'm loading the same version of Firebase from the CDN and from npm) but after logging in using GOOGLE_AUTH as provider, I get:
updateCurrentUser failed: First argument "user" must be an instance of Firebase User or null. Dismiss
and in my experience this is related to the previous warning.
So, my question would be: what's the correct way to use firebaseui-web-react when I'm running in the Firebase Hosting thus using Firebase from the CDN and not NPM.
thanks
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 246
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebaseui-web-react
-
This Project Is Dead Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
firebase/firebaseui-web-react#292 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 1/100
firebase/firebaseui-web-react#280 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
firebase/firebaseui-web-react#220 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
firebase/firebaseui-web-react#210 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
firebase/firebaseui-web-react#201 · 1 comment · 1 reaction ·
All issues in firebase/firebaseui-web-react
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100