question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

firebase.login error

See original GitHub issue

Hello there,

I’m using firebase with the last version of nativescript (2.1.1), and I get an error when I try to login:

JS: Error in firebase.login: Error: java.lang.NullPointerException: Attempt to invoke virtual method ‘android.content.pm.PackageManager android.content.Context.getPackageManager()’ on a null object reference JS: com.google.android.gms.common.zze.isGooglePlayServicesAvailable(Unknown Source) JS: com.google.android.gms.common.zzc.isGooglePlayServicesAvailable(Unknown Source) JS: com.google.android.gms.common.GoogleApiAvailability.isGooglePlayServicesAvailable(Unknown Source) JS: com.tns.Runtime.runModule(Native Method) JS: com.tns.Runtime.runModule(Runtime.java:241) JS: com.tns.Runtime.run(Runtime.java:235) JS: com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:17) JS: android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1036) JS: android.app.ActivityThread.handleBindApplication(ActivityThread.java:6321) JS: android.app.ActivityThread.access$1800(ActivityThread.java:222) JS: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1861) JS: android.os.Handler.dispatchMessage(Handler.java:102) JS: android.os.Looper.loop(Looper.java:158) JS: android.app.ActivityThread.main(ActivityThread.java:7229) JS: java.lang.reflect.Method.invoke(Native Method) JS: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) JS: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

I just do this on my “init” promise:

firebase.login({ type: firebase.LoginType.ANONYMOUS }).then( function (result) { console.log('ok'); }, function (errorMessage) { console.log('ko'); } );

I don’t know if it’s related to firebase or this plugin or android?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
NicholasSmiloviccommented, Jan 16, 2018

Just in case someone else encounters the same error message when using nativescript-plugin-firebase. If you change the android:name="com.tns.NativeScriptApplication" inside the AndroidManifest.xml when enabling multidex for pre lollipop devices this error happens.

https://docs.nativescript.org/runtimes/android/advanced-topics/extend-application-activity Instead of using the android:name=org.myApp.Application from the example in the link above. Use com.tns.NativeScriptApplication inside of application.android.ts.

0reactions
genautkincommented, Mar 18, 2020

angular nativescript In build.Gradle deleted multiDexEnabled true and it fixes it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Admin Authentication API Errors | Firebase - Google
The credential used to initialize the Admin SDK has insufficient permission to access the requested Authentication resource. Refer to Set up a Firebase...
Read more >
Firebase login failed - Stack Overflow
And this is what happened in the step 2: Firebase login failed The Firebase CLI login request was rejected or an error occurred....
Read more >
Firebase login is not working · Issue #1442 - GitHub
I´ve been trying to login in with firebase command and doesn´t work. I tried with firebase login --no-localhost and firebase login --reauth.
Read more >
Firebase login issue - Google Groups
The Firebase CLI login request was rejected or an error occurred. Please run firebase login again or contact support if you continue to...
Read more >
Handling Firebase Authentication Errors and Failures
In the Firebase authentication examples created in this book so far, very little effort has been made beyond simply notifying the user that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found