pusher / push-notifications-android

Android SDK for Pusher Beams
https://www.pusher.com/beams
MIT License
22 stars 22 forks source link

Runtime crash with moshi #111

Open swetasrp opened 4 years ago

swetasrp commented 4 years ago

I am using pusher notification: 1.6.2 and there is a crash in Android 4.3 and Android 4.4.

Fatal Exception: java.lang.VerifyError: e/g/a/x/a/a$b at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapter.fromJson(KotlinJsonAdapter.java:111) at com.squareup.moshi.internal.NullSafeJsonAdapter.fromJson(NullSafeJsonAdapter.java:40) at com.squareup.moshi.adapters.PolymorphicJsonAdapterFactory$PolymorphicJsonAdapter.fromJson(PolymorphicJsonAdapterFactory.java:249) at com.squareup.moshi.internal.NullSafeJsonAdapter.fromJson(NullSafeJsonAdapter.java:40) at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:38) at com.pusher.pushnotifications.internal.MoshiConverter.from(MoshiConverter.java:14) at com.pusher.pushnotifications.internal.TapeJobQueue$noExceptionConverter$1.from(TapeJobQueue.java:23) at com.pusher.pushnotifications.internal.TapeJobQueue$noExceptionConverter$1.from(TapeJobQueue.java:20) at com.squareup.tape2.FileObjectQueue$QueueFileIterator.next(FileObjectQueue.java:95) at kotlin.collections.CollectionsKtCollectionsKt.filterNotNullTo(CollectionsKtCollectionsKt.java:761) at kotlin.collections.CollectionsKtCollectionsKt.filterNotNull(CollectionsKtCollectionsKt.java:754) at kotlin.collections.CollectionsKt.asReversedMutable(CollectionsKt.java) at com.pusher.pushnotifications.internal.TapeJobQueue.asIterable(TapeJobQueue.java:56) at com.pusher.pushnotifications.internal.ServerSyncHandler.(ServerSyncHandler.java:41) at com.pusher.pushnotifications.internal.ServerSyncHandler.(ServerSyncHandler.java:16) at com.pusher.pushnotifications.internal.ServerSyncHandler$Companion.obtain$pushnotifications_release(ServerSyncHandler.java:87) at com.pusher.pushnotifications.PushNotificationsInstance$serverSyncHandler$1.invoke(PushNotificationsInstance.java:106) at com.pusher.pushnotifications.PushNotificationsInstance$serverSyncHandler$1.invoke(PushNotificationsInstance.java:93) at com.pusher.pushnotifications.PushNotificationsInstance.(PushNotificationsInstance.java:105) at com.pusher.pushnotifications.internal.PushNotificationsInitProvider.onCreate(PushNotificationsInitProvider.java:67) at android.content.ContentProvider.attachInfo(ContentProvider.java:1214) at android.content.ContentProvider.attachInfo(ContentProvider.java:1189) at android.app.ActivityThread.installProvider(ActivityThread.java:5119) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4725) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4665) at android.app.ActivityThread.access$1400(ActivityThread.java:159) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5419) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) at dalvik.system.NativeStart.main(NativeStart.java)

akaita commented 3 years ago

Tbh, the very fact that such a small library uses Moshi and even worse, the refection adapter is sad. I don't need those 3mb in my app, and I don't need the conflict between kotlin-reflect version and kotlin-stdlib version it provokes.