Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Play Services GcmTaskService schedule crashes sometimes #86

Open
niqo01 opened this issue Aug 12, 2015 · 17 comments
Open

Play Services GcmTaskService schedule crashes sometimes #86

niqo01 opened this issue Aug 12, 2015 · 17 comments
Assignees

Comments

@niqo01
Copy link

niqo01 commented Aug 12, 2015

I am seeing a few crashes using GcmTaskService.
The error message show:
"There is no GcmTaskService component registered within this package. Have you extended GcmTaskService correctly?"

You can find the stacktrace, devices impacted and Android version here:
http://crashes.to/s/8f4a3a13a0c

Please find below more details on my setup:
Google Play services:
'com.google.android.gms:play-services-gcm:7.5.0'

AndroidManifest:

    <service
        android:name=".service.UploadAnalyticsService"
        android:exported="true"
        android:permission="com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE"
        >
      <intent-filter>
        <action android:name="com.google.android.gms.gcm.ACTION_TASK_READY"/>
      </intent-filter>
    </service>

Schedule code:

    OneoffTask myTask =
        new OneoffTask.Builder().setService(UploadAnalyticsService.class).setExecutionWindow(0,
            15 * 60) 
            .setRequiredNetwork(Task.NETWORK_STATE_CONNECTED).setPersisted(
            true) 
            .setUpdateCurrent(true).setTag(TASK_TAG).build();
    gcmNetworkManager.schedule(myTask);

And my Java class which obviously extends GcmTaskService

public class UploadAnalyticsService extends GcmTaskService 
@tprochazka
Copy link

I have the same problem. It works correctly on all my devices, but sometimes user report this issue.
I check GPS availability before use with

GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context)

@yshahak
Copy link

yshahak commented Jun 13, 2016

I run to the same problem exactly, and also checked that GoogleApiAvailability is available.

@GaborPeto
Copy link

Any update on this? I've got the same exception on production lately.

@tobiasschuerg
Copy link

Which version of the Googl play services are you using?

'com.google.android.gms:play-services:9.2.1' ?

@GaborPeto
Copy link

I was using 9.0.0. I've updated to 9.2.1 just now, will see if this happens on this version as well.

@humblerookie
Copy link

I was getting the same crash with 8.4.0.

Is anyone able to reproduce this issue?

I have raised an issue for the same. Could you guys bump it up just in case.

@eric-labelle
Copy link

Having the same problem here, using play services 8.4.0.
Can't find any way to reproduce nor find any common thing between all the crashes. It happened on pretty much any device and any OS version from what I can see.

@GaborPeto
Copy link

updating to version 9.2.1 did not resolve this issue.

@GaborPeto
Copy link

Any update on this issue? Still getting this in version 10.2.1

java.lang.IllegalArgumentException: There is no GcmTaskService component registered within this package. Have you extended GcmTaskService correctly?
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6324)
       at android.app.ActivityThread.access$1800(ActivityThread.java:222)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1861)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:158)
       at android.app.ActivityThread.main(ActivityThread.java:7229)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

@aaronbond
Copy link

It seems i'm suffering from this as well occasionally, any updates?

@Sloy
Copy link

Sloy commented Jun 8, 2017

Another one here ☝️

@green-nick
Copy link

I have crashes too in version 10.2.1

@ogeidix
Copy link
Contributor

ogeidix commented Jun 17, 2017

Hi everybody,
we are aware of this issue and we are actively investigating it.
Unfortunately it seems to be a problem within the Android Framework which leaves us few options available. We are still investigating and we will report if we can fix it.

@renlikuan
Copy link

I have crashes too
any update for the issue?

@whalemare
Copy link

Also there is a crash, who ever fixed?

@awenger
Copy link

awenger commented Sep 19, 2017

There is another similar bug (problem to find the service in the manifest) mentioned here: https://issuetracker.google.com/issues/37113668

@deepakmishra
Copy link

I have the same bug in 12.0.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests