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

Runtime crash with moshi #111

Open
swetasrp opened this issue Aug 5, 2020 · 1 comment
Open

Runtime crash with moshi #111

swetasrp opened this issue Aug 5, 2020 · 1 comment

Comments

@swetasrp
Copy link

swetasrp commented Aug 5, 2020

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.CollectionsKt___CollectionsKt.filterNotNullTo(CollectionsKt___CollectionsKt.java:761)
at kotlin.collections.CollectionsKt___CollectionsKt.filterNotNull(CollectionsKt___CollectionsKt.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
Copy link
Contributor

akaita commented Aug 26, 2021

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.

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

2 participants