2

I have a problem with crashes of TagManager classes on Android 8. Here is the stack trace:

java.lang.RuntimeException: Unable to start receiver com.google.android.gms.tagmanager.InstallReferrerReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.x.z/com.google.android.gms.tagmanager.InstallReferrerService (has extras) }: app is in background uid UidRecord{90347cf u0a65 RCVR idle procs:1 seq(0,0,0)}
    at android.app.ActivityThread.handleReceiver(ActivityThread.java:3399)
        at android.app.ActivityThread.-wrap18(ActivityThread.java:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1780)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6944)
        at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.x.z/com.google.android.gms.tagmanager.InstallReferrerService (has extras) }: app is in background uid UidRecord{90347cf u0a65 RCVR idle procs:1 seq(0,0,0)}

For sure it is connected to Android 8.0: java.lang.IllegalStateException: Not allowed to start service Intent, but it looks I've configured the InstallReferrer according to Google documentation - https://developers.google.com/android/reference/com/google/android/gms/tagmanager/InstallReferrerReceiver

<service android:name="com.google.android.gms.tagmanager.InstallReferrerService"/>
<receiver
        android:name="com.google.android.gms.tagmanager.InstallReferrerReceiver"
        android:exported="true">
    <intent-filter>
        <action android:name="com.android.vending.INSTALL_REFERRER"/>
    </intent-filter>
</receiver>

<receiver android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
          android:enabled="true">
    <intent-filter>
        <action android:name="com.android.vending.INSTALL_REFERRER"/>
    </intent-filter>
</receiver>

<receiver android:name="com.google.android.gms.analytics.AnalyticsReceiver"
          android:enabled="true">
    <intent-filter>
        <action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH"/>
    </intent-filter>
</receiver>

<service android:name="com.google.android.gms.analytics.AnalyticsService"
         android:enabled="true"
         android:exported="false"/>

I have crash reports concerning only Android 8.0 and Samsung phones. I use com.google.android.gms:play-services-analytics:16.0.3

How to get rid of those crashes except removing the InstallReferrerReceiver code?

przan
  • 31
  • 4
  • Same issue here. Not only Samsung devices (also seeing Nexus). Happens on a fresh install from store. As a workaround I set android:enabled=@bool/below_oreo in the manifest, and created values\bools.xml (with true) and values-v26\bools.xml (with false) – rockgecko Oct 04 '18 at 07:22
  • I filed a bug on the Android issue tracker: https://issuetracker.google.com/u/1/issues/117231941 – rockgecko Oct 05 '18 at 01:04

0 Answers0