Crash reports starting FCM Intent

A few days ago we switched our standalone app to use FCM push notifications.
Everything went fine in testing, but when rolling out to the users we’re starting to see crash reports on the Play store. Not had any user complaints yet, and it looks like only about 1/50 have been effected.

The crash seems to be when starting the FCM intent:

java.lang.IllegalStateException: 
  at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1538)
  at android.app.ContextImpl.startService (ContextImpl.java:1484)
  at android.content.ContextWrapper.startService (ContextWrapper.java:663)
  at host.exp.exponent.fcm.ExpoFcmInstanceIDService.a (ExpoFcmInstanceIDService.java:19)
  at com.google.firebase.iid.FirebaseInstanceIdService.b (Unknown Source:12)
  at com.google.firebase.iid.k.run (Unknown Source:26)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at java.lang.Thread.run (Thread.java:764)

Has anyone else seen this or know how to avoid it?
This is on SDK 27.

Thanks.

Thanks for the report. I’ll take a look at this before the next release.

Thanks.

FWIW the crash reports are all on Android 8. I did see some suggestions that a Firebase library update would help, but as far as I can tell the APK we deployed has firebase 12 (1201 from expo build logs) which should be Oreo compatible.

I think it’s an issue with the way we’re starting the service. Do you know the specific device models that this is affecting?

Doesn’t seem to be anything specific:

|Device|Percentage|
|—|—|—|
|Galaxy S8 (dreamlte)|26.3%|
|Galaxy S9+ (star2lte)|21.1%|
|Galaxy Note8 (greatlte)|10.5%|
|Galaxy S9 (starlte)|10.5%|
|Galaxy S7 (herolte)|10.5%|
|Galaxy S8+ (dream2lte)|10.5%|
|moto g(6) play (aljeter_n)|5.3%|
|Galaxy A5(2017) (a5y17lte)|5.3%|

I’ve been using on an S8, an S8+ etc on 8.0 without issue so I think this is just the breakdown of what people on Android 8.0 are using.

It is 100% Android 8.0 though.

1 Like

Thanks!

Don’t know if it helps, but this is Unity having the same problem:
https://github.com/firebase/quickstart-unity/issues/165

Essentially the crash appears to be happening when the token refreshes and the app is backgrounded. Oreo doesn’t let you start the FcmRegistrationIntentService from a background service.

This will be why users don’t appear to be complaining - they don’t really notice.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.