-1

So, I have integrated FCM with version 9.6.1 all works fine but the problem is My android vitals showing crashes for every time user opens the app. But this crash is not visible to users neither it is being caught in log cat of android studio

Doug Stevenson
  • 236,239
  • 27
  • 275
  • 302
  • You should add more information about the crash that android vitals is showing. – Vedprakash Wagh Jun 06 '19 at 07:29
  • Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.firebase.INSTANCE_ID_EVENT pkg=com.seattleapplab.trymyui cmp=com.seattleapplab.trymyui/.Service.MyFirebaseInstanceIDService (has extras) }: app is in background uid UidRecord{26cc21 u0a174 RCVR idle procs:1 seq(0,0,0)} – Mahesh Marapalli Jun 06 '19 at 08:00
  • @VedprakashWagh please refer the above comment – Mahesh Marapalli Jun 06 '19 at 08:00
  • first update your fcm version – BlackBlind Jun 06 '19 at 08:16
  • ok got your point but my question was why this same log is not showing in logcat of my android studio – Mahesh Marapalli Jun 06 '19 at 08:21
  • if it shows then i can be sure that only library version is an issue not some other thing plus I want to make sure whether these crashes are background caught exceptions or user experience this crash – Mahesh Marapalli Jun 06 '19 at 08:22

1 Answers1

0

From the crash report that you've attached in your comment, I can see that you're using deprecated FirebaseInstanceIDService. Using that in your app will crash the app. In order to fix the error, follow the steps mentioned below:

  1. Update your Firebase Libraries to the latest ones from app/build.gradle.

  2. Change your FirebaseInstanceIdService to the latest FirebaseMessagingService and handle the notification handling in the onMessageReceived as well as other stuff in onNewToken

  3. You can check out how to migrate from FirebaseInstanceIdService to the latest one from the following few articles.

FirebaseInstanceIdService is deprecated.

FirebaseMessagingService crashes on Android 8.0

Vedprakash Wagh
  • 2,552
  • 2
  • 5
  • 23
  • ok Thanks for your answer but one thing wanted to make sure whether these type of crashes making an app to force close it or it is only logged in app quality – Mahesh Marapalli Jun 06 '19 at 08:25
  • If it appears in Crashes section of Crashes and ANR that means your app completely Crashed. In the latest Android versions, it does not show that the app was crashed to avoid user frustration. You should fix the crash as soon as possible because it affects your app rankings in play store nowadays – Vedprakash Wagh Jun 06 '19 at 08:28
  • Accept the answer if it helped you find what you were looking for. The error in second link is pretty similar to yours. – Vedprakash Wagh Jun 06 '19 at 08:36