5

I am trying to run demo given here. The problem is whenever app tries to register instanceId, it say "background sync failed: MISSING_INSTANCEID_SERVICE, retry in 320s" and then when I print token, it says token is null. I tried changing INSTANCE_ID_EVENTinstead of INSTANCEID_EVENT and other solution that were previously asked on stackoverflow, but none of them works for me.

Mrugesh
  • 4,381
  • 8
  • 42
  • 84

3 Answers3

6

Firebase won't run without Google Play Services, so check if they are available.

5

When running on the emulator, use an image with the Google APIs.

Undo
  • 25,519
  • 37
  • 106
  • 129
1

If you have followed the solutions provided by @srivAbhishek001 and @Levent and still face the same issue, Kindly check if you have added the Internet permission in your manifest file.

<uses-permission android:name="android.permission.INTERNET"/>

Sometimes something so obvious becomes the main culprit.

P.S: - It happened with me.

Ujwal Agrawal
  • 454
  • 7
  • 8