[firebase-core]: Unable to Initialize Firebase App
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- angular, firebase, typescript
Research direction
Start by reproducing the initialization from src/app/app.component.ts and inspect the failing Firebase.initializeApp path in node_modules/@nativescript/firebase-core/index.android.js, especially the reported FirebaseApp access. Check the project’s NativeScript and Firebase setup before tracing the Android-specific failure. Done means the app initializes successfully without the reported undefined FirebaseApp error.
Written by the indexing model from the issue text.
Description
Hello Team,
Can you assist with the error below, when trying to initialize the firebase app from the firebase-core?
Here is how I am initializing it
export class AppComponent implements OnInit {
ngOnInit(): void {
firebase().initializeApp().then((app) => {
console.log(app);
})
}
}
Here is the error that shows up
JS: Error: Cannot read property 'FirebaseApp' of undefined
JS: at file: src/webpack:/testapp/node_modules/@nativescript/firebase-core/index.android.js:295:0
JS: at new ZoneAwarePromise (file: src/webpack:/testapp/node_modules/zone.js/fesm2015/zone.js:1429:0)
JS: at Firebase.initializeApp (file: src/webpack:/testapp/node_modules/@nativescript/firebase-core/index.android.js:234:0)
JS: at AppComponent.ngOnInit (file: src/webpack:/testapp/src/app/app.component.ts:6:16)
JS: at callHook (file: src/webpack:/testapp/node_modules/@angular/core/fesm2015/core.mjs:2491:0)
JS: at callHooks (file: src/webpack:/testapp/node_modules/@angular/core/fesm2015/core.mjs:2460:0)
JS: at executeInitAndCheckHooks (file: src/webpack:/testapp/node_modules/@angular/core/fesm2015/core.mjs:2411:0)
JS: at refreshView (file: src/webpack:/testapp/node_modules/@angular/core/fesm2015/core.mjs:11971:0)
JS: at detectChangesInternal (file: src/webpack:/testapp/node_modules/@angular/core/fesm2015/core.mjs:13174:0)
JS: at RootViewRef.detectChanges (file:///data/data/org.nativescript.testapp/fi...
- 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