wonderpush / wonderpush-android-sdk

Android SDK for WonderPush − This plugin makes it easy to set up WonderPush push notifications on your Android apps for mobiles devices. High volume, fast delivery and full-featured starting €1/month.
https://docs.wonderpush.com/docs/android-push-notifications-quickstart
Apache License 2.0
5 stars 6 forks source link

Invalid Proguard configuration #5

Closed dbauduin closed 3 years ago

dbauduin commented 4 years ago

In the step 6 of the "Android Push Notifications" documentation, it is suggested to configure Proguard like this:

-keepattributes SourceFile,LineNumberTable,Signature
-keepnames class com.wonderpush.sdk.** {
    *;
}
-keepnames interface com.wonderpush.sdk.** {
    *;
}

But, with the version 3.2.0 (at least) of the SDK, it is necessary to add this in the Proguard file:

-keep class cz.msebera.android.httpclient.** {
    *;
}

Otherwise, some requests won't work:

AsyncHttpRequest: Unhandled exception origin cause AsyncHttpRequest: java.lang.ClassCastException: $Proxy3 cannot be cast to g.a.a.a.q0.h AsyncHttpRequest: at f.f.a.a.f.a(AsyncHttpResponseHandler.java:57) AsyncHttpRequest: at f.f.a.a.e.b(AsyncHttpRequest.java:9) AsyncHttpRequest: at f.f.a.a.e.c(AsyncHttpRequest.java:2) AsyncHttpRequest: at f.f.a.a.e.run(AsyncHttpRequest.java:8) AsyncHttpRequest: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428) AsyncHttpRequest: at java.util.concurrent.FutureTask.run(FutureTask.java:237) AsyncHttpRequest: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) AsyncHttpRequest: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) AsyncHttpRequest: at java.lang.Thread.run(Thread.java:762) a1 : Error request anonymous access token (aborting): null a1 : java.io.IOException: Unhandled exception: $Proxy3 cannot be cast to g.a.a.a.q0.h a1 : at f.f.a.a.e.c(AsyncHttpRequest.java:12) a1 : at f.f.a.a.e.run(AsyncHttpRequest.java:8) a1 : at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428) a1 : at java.util.concurrent.FutureTask.run(FutureTask.java:237) a1 : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) a1 : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) a1 : at java.lang.Thread.run(Thread.java:762)

Resulting in entries like this: WonderPush Dashboard Screenshot

ofavre commented 3 years ago

As of v4.0.0 we no longer use this dependency. I was never able to reproduce. Thanks for reporting anyway.