Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

'updateCurrentUser failed: First argument "user" must be an instance of Firebase User or null.' when running in Firebase Hosting

オープン
#90 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
firebase, javascript, react

調査の方向性

まず、予約済みスクリプト /__/firebase/init.js と StyledFirebaseAuth コンポーネントを使用し、firebase.auth() で Firebase Hosting 上の問題を再現します。CDN の Firebase インスタンスが npm で読み込まれた FirebaseUI 依存関係とどのように相互作用するかを確認します。duplicate-global 警告と updateCurrentUser エラーを回避するサポート対象の構成を確立し、文書化できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
JavaScript
スター
1.3k
フォーク
246
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/firebaseui-web-react のほかの issue

firebase/firebaseui-web-react の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。