26

I deployed my flutter app to Google play store internal testing and after one hour, I saw this exception in the Pre-launch report details. I am not even sure where to start debugging. Could Someone please help? I don't have a lot of knowledge of Android since I am using Flutter.

Exception java.lang.RuntimeException: Unable to start receiver com.google.android.finsky.instantapps.PhenotypeUpdateReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.gms.phenotype.UPDATE cmp=com.android.vending/com.google.android.finsky.instantapps.PhenotypeUpdateService }: app is in background uid UidRecord{2a75503 u0a192 TRNB bg:+2m53s648ms idle change:uncached procs:4 seq(0,0,0)} at android.app.ActivityThread.handleReceiver (ActivityThread.java:4035)
at android.app.ActivityThread.access$1400 (ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1924) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:223) at android.app.ActivityThread.main (ActivityThread.java:7664) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:947) Caused by java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.gms.phenotype.UPDATE cmp=com.android.vending/com.google.android.finsky.instantapps.PhenotypeUpdateService }: app is in background uid UidRecord{2a75503 u0a192 TRNB bg:+2m53s648ms idle change:uncached procs:4 seq(0,0,0)} at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1715)
at android.app.ContextImpl.startService (ContextImpl.java:1670) at android.content.ContextWrapper.startService (ContextWrapper.java:720) at alj.a (alj.java:2) at alm.a (alm.java:3) at wnv.a (wnv.java:2) at com.google.android.finsky.instantapps.PhenotypeUpdateReceiver.onReceive (PhenotypeUpdateReceiver.java:6) at android.app.ActivityThread.handleReceiver (ActivityThread.java:4026)

I also managed to download the full logcat which is very large file. I am not sure how to include the file over here.

MendelG
  • 14,885
  • 4
  • 25
  • 52
Aimn Blbol
  • 907
  • 11
  • 20
  • There is also a video in crash details showing the testing steps. For me the crash happens after they click the "Install" button in Google AdMob rewarded ads, it shows a Google Play "Terms of Services" popup dialog, almost looks like they never used Play Store on that testing device. When I test locally, clicking the "Install" button correctly opens the app detail page in Play Store. – yume_chan Dec 19 '22 at 16:18
  • Same error here BUT it happens that I do own a Google Pixel 7. Use it to test it from Android Studio and I got no error. I only got them in Playstore. Also note this is a new app version, previous one worked without problems. However I did added a capacitor plugin that is performing native firebase plugin with social-media accounts. – SharpBCD Dec 19 '22 at 15:50
  • 1
    Same error in Pre-launch report on Google Pixel 5 (SDK 30) & Google Pixel 6 (SDK 31) I try some devices on firebase Test Lab (API Level 23,24,28,30,31). All passed without errors. It seems that this error only happens with Google Pixel. – Вадим Импрессор Dec 19 '22 at 13:11
  • I just broke in Play Console testing on the same. I'm crashing on Pixel 5 and Pixel 6 phones, Android 11 and 12. This is a fairly new one, my bundles were testing fine until my latest bundle drops. – Bruce Eleniak Dec 18 '22 at 22:31
  • I'm going to re-submit an old-old bundle that previously passed and see if it breaks. Yay for git! – Bruce Eleniak Dec 18 '22 at 22:34
  • 1
    Update. A release that previously passed now suffers the same issue as my latest. I believe I updated to a newer flutter/dart quite recently. This points to a possible infrastructure issue (i.e. something in my build environment has changed since this code previously survived whatever ungodly torture they put it through) – Bruce Eleniak Dec 18 '22 at 23:06
  • 3
    Are we sure this is not an issue on Google Play's side? I just got the same errors today, though the message in the inbox said 'No issues found'. And then I was able to just submit the release for review (haven't got the result of the review yet). – Marius Bughiu Dec 18 '22 at 23:13
  • I'm reasonably sure this is a robo test issue, having seen reports of similar in the past. I'm going to ignore it for a day or two, polish my code, maybe set up a clean docker flutter environment in the mean time :) – Bruce Eleniak Dec 18 '22 at 23:16
  • 1
    Yea, so my submission got through and the app was approved and released to the store. Despite the errors in the report. – Marius Bughiu Dec 19 '22 at 16:53
  • I just received the same error from the Google Play Console for an app I wrote using Jetpack Compose. I don't know how much help it will be but if you click show more on the page with the error, it shows the devices it failed on. In my case, it's a Google Pixel 5 running Android 11 (SDK 30). I am now installing an emulator to test on that device. The "see more" is on the top-right above the error message. (https://i.stack.imgur.com/6yNbd.png) – fractaloon Dec 17 '22 at 22:07
  • Thanks for trying to help. When I clicked on show more, I was able to get the full exception. I updated the post with the complete exception I am getting. The ex exception is Detected on google Pixel 5. – Aimn Blbol Dec 18 '22 at 13:30
  • 1
    Commenting for the records. Got the same issue with a new app built with Flutter, but not luck reproducing it on a physical device. – FDuhen Dec 20 '22 at 07:12
  • Vaguely related? - https://stackoverflow.com/questions/46445265/android-8-0-java-lang-illegalstateexception-not-allowed-to-start-service-inten – ryanwebjackson Dec 21 '22 at 03:18
  • 1
    @MariusBughiu how did you argue with Google let your submission got through ? – shooding Dec 21 '22 at 12:29
  • There was no arguing. I just clicked submit and got no feedback, the app was simply published ~24h later. – Marius Bughiu Dec 22 '22 at 06:45
  • My submission got through and the app was approved for closed testing. I did not do anything from my side. – Aimn Blbol Dec 22 '22 at 08:46

1 Answers1

1

flutter downgrade to as much as possible

You have to uninstall and reinstall the app, and also have to clear the data and cache from the Settings page.

Try it. I have solved the problem this way.

Marius Bughiu
  • 997
  • 14
  • 32