[IOS] The default FirebaseApp instance must be configured before the default Authinstance can be initialized
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, ios, typescript
- Domain
- authentication, mobile
Research direction
Start with the failing addAuthStateChangeListener path in app/webpack:/--/node_modules/@nativescript/firebase-auth/index.ios.js, especially the references around lines 907 and 1237. Reproduce the iOS initialization order and compare it with the reported applicationDidFinishLaunchingWithOptions workaround; done means authentication no longer throws when the default Firebase app has not been explicitly configured by the caller.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- TypeScript
- Stars
- 62
- Forks
- 53
- Avg merge
- 8d 4h
- Merged PRs (30d)
- 2
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 NativeScript/firebase
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
NativeScript/firebase#292 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
NativeScript/firebase#289 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
NativeScript/firebase#288 · 4 reactions ·
-
bug ios
NativeScript/firebase#287 · 1 assignee ·
-
Uh-Oh Shazam Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
NativeScript/firebase#286 ·
All issues in NativeScript/firebase
Similar issues
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100