firebase.init error: TypeError: Cannot read property 'getInstance' of undefined
See original GitHub issuei try to use firebase plugin in my nativescript core(not angular) project and i noticed that reference.d.ts file not exist in my project to put this line “<reference path='./node_modules/nativescript-plugin-firebase/firebase.d.ts'/>” i try to install and reinstall the plugin and remove /add platform android without any changes and i stuck in this step when i put the following code
firebase.init({
// Optionally pass in properties for database, authentication and cloud messaging,
// see their respective docs.
}).then(
instance => {
console.log(“firebase.init done”);
},
error => {
console.log(firebase.init error: ${error}
);
}
);
any suggestions please
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
firebase.init error: TypeError: Cannot read property 'database ...
I finally solved it by installing the plugin manually via the CLI (i initially installed it through NativeScript sidekick) apparently they ...
Read more >FirebaseAnalytics - Google
The top level Firebase Analytics singleton that provides methods for logging events and setting user properties. See the developer guides for general ...
Read more >typeerror: cannot read properties of undefined (reading 'db') - You ...
I've an error comes when I execute (npm start) : TypeError: Cannot read properties of undefined (reading 'database') at Object.<anonymous> (C:\Users\Ahmed ...
Read more >Cannot read property of undefined react functional ... - hs-barssel.de
TypeError : Cannot read property 'getInstance' of null. map is not a function. Categories I'm currently getting the error: Cannot read property 'title'...
Read more >Uncaught TypeError: Cannot read property of undefined
If you get undefined error, you need to make sure that which ever variables throws undefined error, is assigned a value to it....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This has been broken since 6.8.1 (in #904) for plugin users on Android, with
"authentication": false
infirebase.nativescript.json
. I’ll fix this today in 7.1.2.Thanks, @felix-idf, that really helps. I don’t think I’ve tested recent versions with this
firebase.nativescript.json
config (onlyusing_android
andmessaging
aretrue
):Looking into it.