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

Crash when checking google play service availability and 9.8 is installed #2

Closed
fabriziomoscon opened this issue Dec 2, 2016 · 3 comments

Comments

@fabriziomoscon
Copy link
Collaborator

fabriziomoscon commented Dec 2, 2016

RN 0.38
this lib 0.2.2
Android 5.1.1 and 7.0.0
Google play service:

Exception in native call
 java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources$Theme android.content.Context.getTheme()' on a null object reference
     at com.google.android.gms.common.GoogleApiAvailability.zza(Unknown Source)
     at com.google.android.gms.common.GoogleApiAvailability.getErrorDialog(Unknown Source)
     at com.google.android.gms.common.GoogleApiAvailability.getErrorDialog(Unknown Source)
     at com.hoxfon.react.TwilioVoice.TwilioVoiceModule.checkPlayServices(TwilioVoiceModule.java:678)
     at com.hoxfon.react.TwilioVoice.TwilioVoiceModule.startGCMRegistration(TwilioVoiceModule.java:168)
     at com.hoxfon.react.TwilioVoice.TwilioVoiceModule.<init>(TwilioVoiceModule.java:138)
     at com.hoxfon.react.TwilioVoice.TwilioVoicePackage.createNativeModules(TwilioVoicePackage.java:28)
     at com.facebook.react.XReactInstanceManagerImpl.processPackage(XReactInstanceManagerImpl.java:954)
     at com.facebook.react.XReactInstanceManagerImpl.createReactContext(XReactInstanceManagerImpl.java:878)
     at com.facebook.react.XReactInstanceManagerImpl.access$600(XReactInstanceManagerImpl.java:110)
     at com.facebook.react.XReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(XReactInstanceManagerImpl.java:214)
     at com.facebook.react.XReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(XReactInstanceManagerImpl.java:193)
     at android.os.AsyncTask$2.call(AsyncTask.java:292)
     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
     at java.lang.Thread.run(Thread.java:818)
@dabit3
Copy link
Contributor

dabit3 commented Jan 17, 2017

@fabriziomoscon I'm getting this same issue. Any ideas what may be causing it?

@dabit3
Copy link
Contributor

dabit3 commented Jan 18, 2017

I think this error was being thrown because Google Play services was not installed on my emulator (in my case, Genymotion). This Stackoverflow issue helped me fix this for anyone that may be coming here.

@fabriziomoscon
Copy link
Collaborator Author

fabriziomoscon commented Jan 18, 2017

@dabit3 yes I logged the issue, and I wasn't able to reproduce it once I have upgraded Google Play Service. The solution is installing/upgrading Google Play Service on the device.

I was able to reproduce this creating a new emulator with no Google Play Service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants