Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unregisterForPushNotifications causes crash with suplied Google Play Services JARs #56

Closed
hannta opened this issue May 22, 2017 · 2 comments

Comments

@hannta
Copy link

hannta commented May 22, 2017

I try to unregister push notifications, when I call TiGoosh.unregisterForPushNotifications() I get the following crash:

 FATAL EXCEPTION: AsyncTask #2
 Process: com.xxx.yyy, PID: 8258
 java.lang.RuntimeException: An error occurred while executing doInBackground()
 	at android.os.AsyncTask$3.done(AsyncTask.java:309)
 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
 	at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
 	at java.util.concurrent.FutureTask.run(FutureTask.java:242)
 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
 	at java.lang.Thread.run(Thread.java:818)
 Caused by: java.lang.NoSuchMethodError: No virtual method deleteToken(Ljava/lang/String;Ljava/lang/String;)V in class Lcom/google/android/gms/iid/InstanceID; or its super classes (declaration of 'com.google.android.gms.iid.InstanceID' appears in /data/app/com.xxx.yyy-1/base.apk)
	at ti.goosh.TiGooshModule$1.doInBackground(TiGooshModule.java:148)
 	at ti.goosh.TiGooshModule$1.doInBackground(TiGooshModule.java:144)
 	at android.os.AsyncTask$2.call(AsyncTask.java:295)
 	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 	... 4 more

Im using supplied Google Play Services JARs (gps-jars/google-play-services-gcm+maps.jar)

I tink the root of the issue is in proguard confs (eg. gps-jars/gcm+maps.conf), they should also keep com.google.android.gms.iid.InstanceID calss?

@kopiro
Copy link
Contributor

kopiro commented May 22, 2017

yes, this could be the issue.
did you try including it?

@hannta
Copy link
Author

hannta commented May 22, 2017

Yes, including com.google.android.gms.iid.** did the trick.

-keep public class com.google.android.gms.iid.** {
 public protected *;
}

This is actually already included in ti.goosh/android/proguard/proguard.conf but missing from ti.goosh/gps-jars/gcm+*.conf confs.

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

No branches or pull requests

3 participants