Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL EXCEPTION: main - Attempt to invoke interface method 'com.getcapacitor.JSObject io.capawesome.capacitorjs.plugins.firebase.firestore.interfaces.Result.toJSObject()' on a null object reference #469

Closed
robingenz opened this issue Oct 18, 2023 Discussed in #468 · 5 comments · Fixed by #471
Labels
bug/fix Something isn't working package: firestore platform: android Android platform
Milestone

Comments

@robingenz
Copy link
Member

Discussed in #468

Originally posted by FrancescoIoppolo October 18, 2023
On Android I get this error:
Can you help me?

FATAL EXCEPTION: main
Process: digipetx.app, PID: 16119
java.lang.NullPointerException: Attempt to invoke interface method 'com.getcapacitor.JSObject io.capawesome.capacitorjs.plugins.firebase.firestore.interfaces.Result.toJSObject()' on a null object reference
at io.capawesome.capacitorjs.plugins.firebase.firestore.FirebaseFirestorePlugin$3.success(FirebaseFirestorePlugin.java:129)
at io.capawesome.capacitorjs.plugins.firebase.firestore.FirebaseFirestore.lambda$getDocument$4(FirebaseFirestore.java:84)
at io.capawesome.capacitorjs.plugins.firebase.firestore.FirebaseFirestore$$ExternalSyntheticLambda1.onSuccess(Unknown Source:4)
at com.google.android.gms.tasks.zzm.run(com.google.android.gms:play-services-tasks@@18.0.2:1)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:264)
at android.app.ActivityThread.main(ActivityThread.java:8312)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)

@robingenz
Copy link
Member Author

@FrancescoIoppolo I just published a dev version with a fix:

npm i @capacitor-firebase/[email protected]

Can you please tell me if the problem is fixed?

@FrancescoIoppolo
Copy link

yes, solve it! great

now I get this:

FATAL EXCEPTION: CapacitorPlugins
Process: digipetx.app, PID: 28035
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.getcapacitor.Bridge.lambda$callPluginMethod$0(Bridge.java:783)
at com.getcapacitor.Bridge.$r8$lambda$ehFTi5f4HhVNFKTbCKAYDkpQYRA(Unknown Source:0)
at com.getcapacitor.Bridge$$ExternalSyntheticLambda3.run(Unknown Source:8)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:264)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:138)
at com.getcapacitor.Bridge.lambda$callPluginMethod$0(Bridge.java:774)
at com.getcapacitor.Bridge.$r8$lambda$ehFTi5f4HhVNFKTbCKAYDkpQYRA(Unknown Source:0)
at com.getcapacitor.Bridge$$ExternalSyntheticLambda3.run(Unknown Source:8)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:264)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/app/FragmentActivity;
at com.google.android.gms.auth.api.signin.internal.zzi.zzd(Unknown Source:0)
at com.google.android.gms.auth.api.signin.GoogleSignInClient.getSignInIntent(Unknown Source:34)
at io.capawesome.capacitorjs.plugins.firebase.authentication.handlers.GoogleAuthProviderHandler.signIn(GoogleAuthProviderHandler.java:40)
at io.capawesome.capacitorjs.plugins.firebase.authentication.FirebaseAuthentication.signInWithGoogle(FirebaseAuthentication.java:456)
at io.capawesome.capacitorjs.plugins.firebase.authentication.FirebaseAuthenticationPlugin.signInWithGoogle(FirebaseAuthenticationPlugin.java:583)
at java.lang.reflect.Method.invoke(Native Method)
at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:138)
at com.getcapacitor.Bridge.lambda$callPluginMethod$0(Bridge.java:774)

@robingenz
Copy link
Member Author

This should help you: #456 (comment)
Please read the plugin documentation again and make sure you correctly configured the plugin.

@FrancescoIoppolo
Copy link

FrancescoIoppolo commented Oct 18, 2023 via email

@robingenz
Copy link
Member Author

Thanks for testing!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/fix Something isn't working package: firestore platform: android Android platform
Projects
None yet
2 participants