Open bradherman opened 1 year ago
@bradherman You need to add the dependency for okhttp:
implementation 'com.squareup.okhttp3:okhttp:3.6.0'
@idortulov In RN 0.72.3 OKHTTP_VERSION is 4.9.2, do you think it's safe to downgrade it?
for me acceptable solution was to have following
configurations.all {
resolutionStrategy.force 'com.squareup.okhttp3:okhttp:4.9.2'
resolutionStrategy.force 'com.squareup.okhttp3:okhttp-urlconnection:4.9.2'
}
with using the same version as RN
Yes, this is also acceptable. The root issue was the missing dependency.
@idortulov would be nice to mention it in Readme and update example app 🙏
@professorkolik I am more than happy to accept the change to the example app and to the readme file.
@idortulov In RN 0.72.3 OKHTTP_VERSION is 4.9.2, do you think it's safe to downgrade it?
for me acceptable solution was to have following
configurations.all { resolutionStrategy.force 'com.squareup.okhttp3:okhttp:4.9.2' resolutionStrategy.force 'com.squareup.okhttp3:okhttp-urlconnection:4.9.2' }
with using the same version as RN
I made this change, I can start the first chat on Android side, When I answer on the web pannel I get a network error. Logcat output is as follows.
E Throwable: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jsoup/Jsoup;
at com.dixa.messenger.ofs.n6.b(Unknown Source:6)
at com.dixa.messenger.ofs.L1.a(Unknown Source:242)
at com.dixa.messenger.ofs.L1.a(SourceFile:3)
at com.dixa.messenger.ofs.f2$c$a.emit(Unknown Source:71)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Emitters.kt:224)
at com.dixa.messenger.ofs.R2$b$a.emit(Unknown Source:72)
at kotlinx.coroutines.flow.StateFlowImpl.collect(StateFlow.kt:398)
at kotlinx.coroutines.flow.StateFlowImpl$collect$1.invokeSuspend(Unknown Source:15)
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.kt: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)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.jsoup.Jsoup" on path: DexPathList[[zip file "/data/app/~~66WDdaAFLCigxSeCC5qprQ==/com.justmop.partner-DW8QuXFq22oBODH0Nvf-Rw==/base.apk"],nativeLibraryDirectories=[/data/app/~~66WDdaAFLCigxSeCC5qprQ==/com.justmop.partner-DW8QuXFq22oBODH0Nvf-Rw==/lib/arm64, /data/app/~~66WDdaAFLCigxSeCC5qprQ==/com.justmop.partner-DW8QuXFq22oBODH0Nvf-Rw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.dixa.messenger.ofs.n6.b(Unknown Source:6)
at com.dixa.messenger.ofs.L1.a(Unknown Source:242)
at com.dixa.messenger.ofs.L1.a(SourceFile:3)
at com.dixa.messenger.ofs.f2$c$a.emit(Unknown Source:71)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Emitters.kt:224)
at com.dixa.messenger.ofs.R2$b$a.emit(Unknown Source:72)
at kotlinx.coroutines.flow.StateFlowImpl.collect(StateFlow.kt:398)
at kotlinx.coroutines.flow.StateFlowImpl$collect$1.invokeSuspend(Unknown Source:15)
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.kt: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 In RN 0.72.3 OKHTTP_VERSION is 4.9.2, do you think it's safe to downgrade it? for me acceptable solution was to have following
configurations.all { resolutionStrategy.force 'com.squareup.okhttp3:okhttp:4.9.2' resolutionStrategy.force 'com.squareup.okhttp3:okhttp-urlconnection:4.9.2' }
with using the same version as RN
I made this change, I can start the first chat on Android side, When I answer on the web pannel I get a network error. Logcat output is as follows.
E Throwable: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jsoup/Jsoup; at com.dixa.messenger.ofs.n6.b(Unknown Source:6) at com.dixa.messenger.ofs.L1.a(Unknown Source:242) at com.dixa.messenger.ofs.L1.a(SourceFile:3) at com.dixa.messenger.ofs.f2$c$a.emit(Unknown Source:71) at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Emitters.kt:224) at com.dixa.messenger.ofs.R2$b$a.emit(Unknown Source:72) at kotlinx.coroutines.flow.StateFlowImpl.collect(StateFlow.kt:398) at kotlinx.coroutines.flow.StateFlowImpl$collect$1.invokeSuspend(Unknown Source:15) 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.kt: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) Caused by: java.lang.ClassNotFoundException: Didn't find class "org.jsoup.Jsoup" on path: DexPathList[[zip file "/data/app/~~66WDdaAFLCigxSeCC5qprQ==/com.justmop.partner-DW8QuXFq22oBODH0Nvf-Rw==/base.apk"],nativeLibraryDirectories=[/data/app/~~66WDdaAFLCigxSeCC5qprQ==/com.justmop.partner-DW8QuXFq22oBODH0Nvf-Rw==/lib/arm64, /data/app/~~66WDdaAFLCigxSeCC5qprQ==/com.justmop.partner-DW8QuXFq22oBODH0Nvf-Rw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.dixa.messenger.ofs.n6.b(Unknown Source:6) at com.dixa.messenger.ofs.L1.a(Unknown Source:242) at com.dixa.messenger.ofs.L1.a(SourceFile:3) at com.dixa.messenger.ofs.f2$c$a.emit(Unknown Source:71) at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Emitters.kt:224) at com.dixa.messenger.ofs.R2$b$a.emit(Unknown Source:72) at kotlinx.coroutines.flow.StateFlowImpl.collect(StateFlow.kt:398) at kotlinx.coroutines.flow.StateFlowImpl$collect$1.invokeSuspend(Unknown Source:15) 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.kt: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)
Instead of this change, I excluded okhttp3 and implemented org.jsoup:jsoup:1.16.1 as follows. it worked for me
implementation 'org.jsoup:jsoup:1.16.1'
implementation ('com.dixa:messenger-sdk:1.5.4'){
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
Android app crashes due to the following when including the
implementation('com.dixa:messenger-sdk:1.3.2')
in build.gradle: