I am getting this error when trying to run my app with google signin. I dont feel like I've done anything different than the instructions and I folllowed the example in my js. Any help with this is greatly appreciated!
01-27 11:16:36.949 14644-14666/? E/unknown:React: Exception in native call from JS
01-27 11:16:36.949 14644-14666/? E/unknown:React: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context com.google.android.gms.common.api.GoogleApiClient.getContext()' on a null object reference
01-27 11:16:36.949 14644-14666/? E/unknown:React: at com.google.android.gms.auth.api.signin.internal.zzc.signOut(Unknown Source)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at co.apptailor.googlesignin.RNGoogleSigninModule.signOut(RNGoogleSigninModule.java:82)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at java.lang.reflect.Method.invoke(Native Method)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at java.lang.reflect.Method.invoke(Method.java:372)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:249)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at com.facebook.react.bridge.NativeModuleRegistry$ModuleDefinition.call(NativeModuleRegistry.java:158)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at com.facebook.react.bridge.NativeModuleRegistry.call(NativeModuleRegistry.java:58)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at com.facebook.react.bridge.CatalystInstanceImpl$NativeModulesReactCallback.call(CatalystInstanceImpl.java:430)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at android.os.Handler.handleCallback(Handler.java:739)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at android.os.Handler.dispatchMessage(Handler.java:95)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at android.os.Looper.loop(Looper.java:135)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:184)
01-27 11:16:36.949 14644-14666/? E/unknown:React: at java.lang.Thread.run(Thread.java:818)
what is your testing environment - RN version, what kind of emulator or device ?
thanks
I'm using RN 18.1 and android studio nexus 5 emulator
do you observe the same issue when running the sample app ?
also the issue seems to come from the logout method. are you correctly logged-in when you call this method ?
I deleted my entire index.android.js file and replace the contents with the sample and I still get the same thing. It seems can't log in as this comes up immediately after starting my app. Everything is still working in Xcode and the iphone emulator but not android.
just tested the sample app on a real nexus 5. everything works just fine (login & logout)
if you can share your code I could be able to help you.
my problem solved with this:
cd android
gradlew clean
gradlew assembleDebug --stacktrace
i hope that works for you
Most helpful comment
my problem solved with this:
i hope that works for you