Error in firebase.login: TypeError: Cannot read property 'getInstance' of undefined JS: TypeError: Cannot read property 'getInstance' of undefined
See original GitHub issuei try to use firebase plugin in my nativescript (with Angular) project
firebase.init works fine with
firebase.init({
showNotificationsWhenInForeground: true
}).then(
() => {
console.log('firebase.init done');
},
(error) => {
console.log(`firebase.init error: ${error}`);
}
);
but if i try to call:
firebase.login({
type: firebase.LoginType.PASSWORD,
passwordOptions: {
email: this.user.email,
password: this.user.password
}
})
.then((result) => JSON.stringify(result))
.catch((error) => console.log(error));
then i got this error: Error in firebase.login: TypeError: Cannot read property 'getInstance' of undefined
.
i have already enabled email-password login in my firebase instance. and this is my firebase.nativescript.json:
{
"external_push_client_only": false,
"using_ios": true,
"using_android": true,
"firestore": true,
"realtimedb": false,
"authentication": true,
"remote_config": false,
"performance_monitoring": false,
"messaging": true,
"crashlytics": false,
"crash_reporting": false,
"storage": false,
"functions": false,
"facebook_auth": false,
"google_auth": false,
"admob": false,
"invites": false,
"dynamic_links": false,
"ml_kit": false
}
any suggestions please
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Firebase: TypeError: Cannot read properties of undefined ...
The createUser() method returns a UserRecord which has no user property. Also it seems you are trying to get a user's ID Token...
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 >Why is my currentUser == null in Firebase Auth? - Medium
This means that the SDK is not going to block the main thread of execution in order to deliver data — the object...
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 >FirebaseUI for Web — Auth - Firebase Open Source
The FirebaseUI component implements best practices for authentication on mobile devices and websites, helping to sign-in and sign-up conversion for your app. 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 FreeTop 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
Top GitHub Comments
I solved this issue with simply rerun
npm run config
innode_modules/nativescript-plugin-firebase
Give it a try guys 😉I solved this issue with
then