dixahq / dixa-messenger-react-native-demo

This is the Dixa messenger React Native Demo
Apache License 2.0
1 stars 1 forks source link

Android crash: com.square.moshi NoSuchMethodException #10

Closed pavelparradomarin closed 1 year ago

pavelparradomarin commented 1 year ago

It's not a single crash, affects a good amount of people. Mostly with Huawei and Android 8/9 ONLY. 65% of cases crash in the background.

Caused by java.lang.NoSuchMethodException: values []
       at java.lang.Class.getMethod(Class.java:2114)
       at java.lang.Class.getDeclaredMethod(Class.java:2093)
       at java.lang.Enum$1.create(Enum.java:268)
       at java.lang.Enum$1.create(Enum.java:263)
       at libcore.util.BasicLruCache.get(BasicLruCache.java:58)
       at java.lang.Enum.getSharedConstants(Enum.java:289)
       at java.lang.Class.getEnumConstantsShared(Class.java:2462)
       at java.lang.Class.getEnumConstants(Class.java:2448)
       at com.squareup.moshi.StandardJsonAdapters$EnumJsonAdapter.<init>(StandardJsonAdapters.java:273)
       at com.squareup.moshi.StandardJsonAdapters$1.create(StandardJsonAdapters.java:68)
       at com.squareup.moshi.Moshi.adapter(Moshi.java:146)
       at com.dixa.messenger.ofs.a.a(a.java:2)
       at com.dixa.messenger.settings.data.entity.SettingsDto_ElevioJsonAdapter.<init>(SourceFile:3)
       at java.lang.reflect.Constructor.newInstance0(Constructor.java)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
       at com.squareup.moshi.internal.Util.generatedAdapter(Util.java:588)
       at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory.create(KotlinJsonAdapter.kt:200)
       at com.squareup.moshi.Moshi.adapter(Moshi.java:146)
       at com.dixa.messenger.ofs.a.a(a.java:2)
       at com.dixa.messenger.settings.data.entity.SettingsDto_IntegrationsJsonAdapter.<init>(SourceFile:1)
       at java.lang.reflect.Constructor.newInstance0(Constructor.java)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
       at com.squareup.moshi.internal.Util.generatedAdapter(Util.java:588)
       at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory.create(KotlinJsonAdapter.kt:200)
       at com.squareup.moshi.Moshi.adapter(Moshi.java:146)
       at com.dixa.messenger.ofs.a.a(a.java:2)
       at com.dixa.messenger.settings.data.entity.SettingsDto_GeneralJsonAdapter.<init>(SourceFile:11)
       at java.lang.reflect.Constructor.newInstance0(Constructor.java)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
       at com.squareup.moshi.internal.Util.generatedAdapter(Util.java:588)
       at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory.create(KotlinJsonAdapter.kt:200)
       at com.squareup.moshi.Moshi.adapter(Moshi.java:146)
       at com.dixa.messenger.ofs.a.a(a.java:2)
       at com.dixa.messenger.settings.data.entity.SettingsDtoJsonAdapter.<init>(SourceFile:5)
       at java.lang.reflect.Constructor.newInstance0(Constructor.java)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
       at com.squareup.moshi.internal.Util.generatedAdapter(Util.java:588)
       at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory.create(KotlinJsonAdapter.kt:200)
       at com.squareup.moshi.Moshi.adapter(Moshi.java:146)
       at com.squareup.moshi.Moshi.adapter(Moshi.java:106)
       at retrofit2.converter.moshi.MoshiConverterFactory.responseBodyConverter(MoshiConverterFactory.java:89)
       at retrofit2.Retrofit.nextResponseBodyConverter(Retrofit.java:362)
       at retrofit2.Retrofit.responseBodyConverter(Retrofit.java:345)
       at retrofit2.HttpServiceMethod.createResponseConverter(HttpServiceMethod.java:124)
       at retrofit2.HttpServiceMethod.parseAnnotations(HttpServiceMethod.java:85)
       at retrofit2.ServiceMethod.parseAnnotations(ServiceMethod.java:39)
       at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:202)
       at retrofit2.Retrofit$1.invoke(Retrofit.java:160)
       at java.lang.reflect.Proxy.invoke(Proxy.java:913)
       at $Proxy7.getMessengerSettings()
       at com.dixa.messenger.ofs.D8$c.invokeSuspend(SourceFile:33)
       at com.dixa.messenger.ofs.D8$c.invoke(SourceFile:1)
       at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
       at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(BuildersKt__Builders_common.kt:169)
       at kotlinx.coroutines.BuildersKt.withContext(Builders.kt:1)
       at com.dixa.messenger.ofs.D8.c(SourceFile:79)
       at com.dixa.messenger.ofs.x8.a(SourceFile:1)
       at com.dixa.messenger.DixaMessenger$b.invokeSuspend(SourceFile:33)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
       at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
       at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:570)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
idortulov commented 1 year ago

@pavelparradomarin This has been fixed in version 1.3.6 of the messenger SDK.

pavelparradomarin commented 1 year ago

Thank you!

idortulov commented 1 year ago

@pavelparradomarin Are you still having issues? Do you have any additional questions? Can we close this ticket?

pavelparradomarin commented 1 year ago

Didn't spot any issue. The ticket can be closed.

sizmin commented 1 year ago

@idortulov it happens again in 1.4.0 for me.

idortulov commented 1 year ago

Try version 1.4.1. @sizmin