NativeScript / NativeScript/firebase

[IOS] The default FirebaseApp instance must be configured before the default Authinstance can be initialized

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

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

主要言語
TypeScript
スター
62
フォーク
53
平均マージ
8日 4時間
マージ済み PR(30日)
2

説明

Hi @NathanWalker

When I call firebase().auth().addAuthStateChangeListener that will throw error

 NativeScript encountered a fatal error: Uncaught Error: The default FirebaseApp instance must be configured before the default Authinstance can be initialized. One way to ensure this is to call `FirebaseApp.configure()` in the App Delegate's `
  application(_:didFinishLaunchingWithOptions:)` (or the `@main` struct's initializer in SwiftUI).
  at
  get native(file: app/webpack:/--/node_modules/@nativescript/firebase-auth/index.ios.js:1237:0)
  at addAuthStateChangeListener(file: app/webpack:/--/node_modules/@nativescript/firebase-auth/index.ios.js:907:0)

to prevent this error I should declare init on a delegate applicationDidFinishLaunchingWithOptions then it work !

Do you have an idea what happen

Thanks

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

app/webpack:/--/node_modules/@nativescript/firebase-auth/index.ios.js にある失敗している addAuthStateChangeListener パスから始め、特に 907 行目と 1237 行目付近の参照を確認します。iOS の初期化順序を再現し、報告されている applicationDidFinishLaunchingWithOptions の workaround と比較します。デフォルトの Firebase アプリが呼び出し元によって明示的に設定されていない場合でも、認証で例外がスローされなくなれば完了です。

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

評価

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

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

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