question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Library crash after play-services-gcm:12.0.0 update.

See original GitHub issue

My app started crashing after updating com.google.android:play-services-gcm from 11.8.0 to 12.0.0. Crash appears in your library. Error is following:

java.lang.RuntimeException: Unable to create application: java.lang.IllegalArgumentException: The GcmTaskService class you provided com.evernote.android.job.gcm.PlatformGcmService does not seem to support receiving com.google.android.gms.gcm.ACTION_TASK_READY

Tested on 4.4.2.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:39 (1 by maintainers)

github_iconTop GitHub Comments

18reactions
maximrahliscommented, Apr 10, 2018

I temporarily fixed it with by adding the service declaration in manifest:

    <!-- Patch fixing issue of evernote SDK with new gcm 12.0.1 -->
    <service
        android:name="com.evernote.android.job.gcm.PlatformGcmService"
        android:enabled="true"
        android:exported="true"
        android:permission="com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE"
        tools:replace="android:enabled" >
        <intent-filter>
            <action android:name="com.google.android.gms.gcm.ACTION_TASK_READY" />
        </intent-filter>
    </service>
13reactions
tdtrancommented, Apr 18, 2018

I spent a couple of hours debugging. This is what I found:

  1. GcmNetworkManager behavior changed in Play services v 12.x and later. It calls PackageManager.queryIntentServices to find registered services which have com.google.android.gms.gcm.ACTION_TASK_READY. This is not new.

  2. What’s new is GcmNetworkManager now runs an additional check on the returned List<ResolveInfo>. It checks if resolveInfo.serviceInfo.enabled == true. Per official Android documentation the values in serviceInfo are from service declaration in app manifest.

  3. android-job declares com.evernote.android.job.gcm.PlatformGcmService in the library manifest with android:enabled="false". The service is enabled programatically via code. The check in (2) only sees the static value in the manifest.

This is why the workaround posted by @maximrahlis (https://github.com/evernote/android-job/issues/415#issuecomment-380017997) works. It basically zeroes out android:enabled="false" in the library manifest

Read more comments on GitHub >

github_iconTop Results From Across the Web

xcode14:Library not loaded: /usr/l… | Apple Developer Forums
If your app experienced this crash after uploading to the App Store using Xcode 13 with bitcode enabled, your app experienced the crash...
Read more >
JW Library and Windows 11 22H2 Update and Feature update ...
Xaml.dll file that JW Library needs is altered. This change is the cause of the crash upon opening and not allowing .JWPub files...
Read more >
SmsRetrieverClient Crash last update - Stack Overflow
android.gms artifacts. And now I am getting crash when using SmsRetriever. Since I am specifying null in startSmsUserConsent(). UPDATE: I use:
Read more >
Why is forScore crashing on launch?
Crashing After an iOS Update. Occasionally, updates to iOS introduce features or changes that make older versions of forScore incompatible.
Read more >
Fusion 360 crashes when launching the Tool Library
Remove the xml files in %LOCALAPPDATA%\Fusion 360 CAM\Settings. Check the graphics card / drivers. Update graphics drivers to the latest. In ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found