talk-android
talk-android copied to clipboard
Use android-library, streamline dav4jvm
This uses
- https://github.com/nextcloud/android-library/pull/881
- which uses https://github.com/bitfireAT/dav4jvm/pull/3
This way we can streamline all our dav4jvm classes (and later also our okhttp3 client)
- [ ] write test
For later:
- [ ] remove BrowserFile
As always, early feedback is appreciated :-)
I currently get a crash at startup;
io.reactivex.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/Util;
at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:69)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/Util;
at okhttp3.JavaNetCookieJar.decodeHeaderAsJavaNetCookies(JavaNetCookieJar.kt:81)
at okhttp3.JavaNetCookieJar.loadForRequest(JavaNetCookieJar.kt:59)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:74)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:65)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:221)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at com.nextcloud.talk.dagger.modules.RestModule$HeadersInterceptor.intercept(RestModule.java:252)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:205)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:158)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:204)
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:46)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:608)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)Â
at java.util.concurrent.FutureTask.run(FutureTask.java:264)Â
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)Â
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)Â
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)Â
at java.lang.Thread.run(Thread.java:1012)Â
Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.internal.Util" on path: DexPathList[[zip file "/data/app/~~qX22F70WR-Srw7iu1mv-vA==/com.nextcloud.talk2-VKMvo0R4DnRubOzj3_A-8w==/base.apk"],nativeLibraryDirectories=[/data/app/~~qX22F70WR-Srw7iu1mv-vA==/com.nextcloud.talk2-VKMvo0R4DnRubOzj3_A-8w==/lib/arm64, /data/app/~~qX22F70WR-Srw7iu1mv-vA==/com.nextcloud.talk2-VKMvo0R4DnRubOzj3_A-8w==/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 okhttp3.JavaNetCookieJar.decodeHeaderAsJavaNetCookies(JavaNetCookieJar.kt:81)Â
at okhttp3.JavaNetCookieJar.loadForRequest(JavaNetCookieJar.kt:59)Â
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:74)Â
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)Â
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:65)Â
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)Â
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:221)Â
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)Â
at com.nextcloud.talk.dagger.modules.RestModule$HeadersInterceptor.intercept(RestModule.java:252)Â
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)Â
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:205)Â
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:158)Â
at retrofit2.OkHttpCall.execute(OkHttpCall.java:204)Â
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:46)Â
at io.reactivex.Observable.subscribe(Observable.java:12284)Â
at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35)Â
at io.reactivex.Observable.subscribe(Observable.java:12284)Â
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)Â
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:608)Â
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)Â
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)Â
at java.util.concurrent.FutureTask.run(FutureTask.java:264)Â
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)Â
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)Â
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)Â
at java.lang.Thread.run(Thread.java:1012)Â
I suspect this is due to competing okhttp lib versions?
True. It works when I change it to http 5.x branch. Not sure about any side effects…
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/2497-talk.apk
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.