TestGcm icon indicating copy to clipboard operation
TestGcm copied to clipboard

java.io.IOException: MISSING_INSTANCEID_SERVICE

Open sssahas opened this issue 10 years ago • 9 comments

Hi, This repo is very useful, particularly for non-java guys like me. Thanks for your effort. I pulled down code, generated the google-services.json for my app and replaced here then ran react-native run-android. Then getting below error from the console, I must be doing something silly.. appreciate any suggestions to fix the same.

12-25 16:18:04.278  1490  1546 D GcmRegistrationService: Failed to complete token refresh
12-25 16:18:04.278  1490  1546 D GcmRegistrationService: java.io.IOException: MISSING_INSTANCEID_SERVICE
12-25 16:18:04.278  1490  1546 D GcmRegistrationService:    at com.google.android.gms.iid.zzc.zza(Unknown Source)
12-25 16:18:04.278  1490  1546 D GcmRegistrationService:    at com.google.android.gms.iid.zzc.zzb(Unknown Source)
12-25 16:18:04.278  1490  1546 D GcmRegistrationService:    at com.google.android.gms.iid.zzc.zza(Unknown Source)
12-25 16:18:04.278  1490  1546 D GcmRegistrationService:    at com.google.android.gms.iid.InstanceID.zzc(Unknown Source)
12-25 16:18:04.278  1490  1546 D GcmRegistrationService:    at com.google.android.gms.iid.InstanceID.getToken(Unknown Source)
12-25 16:18:04.278  1490  1546 D GcmRegistrationService:    at com.oney.gcm.GcmRegistrationService.onHandleIntent(GcmRegistrationService.java:38)
12-25 16:18:04.278  1490  1546 D GcmRegistrationService:    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
12-25 16:18:04.278  1490  1546 D GcmRegistrationService:    at android.os.Handler.dispatchMessage(Handler.java:102)
12-25 16:18:04.278  1490  1546 D GcmRegistrationService:    at android.os.Looper.loop(Looper.java:148)
12-25 16:18:04.278  1490  1546 D GcmRegistrationService:    at android.os.HandlerThread.run(HandlerThread.java:61)

sssahas avatar Dec 25 '15 23:12 sssahas

Thanks!

  • Can you try using origin google-services.json(not replace to yours) to see if the error happens?
  • What device do you test?

oney avatar Dec 26 '15 04:12 oney

Hi, Thanks. I tried with default demo apps google-services.json file and still getting the same error. Devices are

  1. emulator "5.2" Marshmallow (6.0.0) XXHDPI Phone - 6.0"
  2. also on a real device Samsung Galaxy S4.

sssahas avatar Dec 26 '15 15:12 sssahas

@sahas- install Google Play Services on device.

CoolMind avatar Jan 20 '17 15:01 CoolMind

It is amusing, after almost 3 years I again got this exception, but now in Firebase Cloud Messaging. Yes, an emulator didn't contain Google Play Services.

CoolMind avatar Oct 16 '19 13:10 CoolMind

@CoolMind hey buddy, did you work it out, I came across the same issue with FCM on Galaxy S6 SM-G9200 android 5.1.1

glWesley avatar Dec 25 '19 06:12 glWesley

@glWesley, sorry, I've gotten the exception on an emulator. It didn't contain Google Play Services, and I changed the emulator. Does your device have GPS (not outdated, probably logged in Google account)? Does the bug appear only on it or many other devices? If on other, maybe google-services.json has some error.

CoolMind avatar Dec 25 '19 13:12 CoolMind

我是在设备上运行的,也是报这个错误,改怎么解决啊

myz-make avatar Mar 09 '22 06:03 myz-make

I am running on the device, also reported this error, how to fix it

myz-make avatar Mar 09 '22 06:03 myz-make

I am also getting the same error on Amazon Firestick. Firebase should rectify the issue!

Pushpendracolourmoon avatar Nov 28 '22 09:11 Pushpendracolourmoon