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

Fatal error when invalid credentials are set #52

Open
aviollet opened this issue Dec 18, 2020 · 4 comments
Open

Fatal error when invalid credentials are set #52

aviollet opened this issue Dec 18, 2020 · 4 comments

Comments

@aviollet
Copy link

Hello
i am struggling with a Fatal error happening when the credentials are wrong.
i use sardine-android:0.7

the error appears in sardine.list() when i set a wrong login
No issue if the credentials are correct

i would appreciate very much some help.

the exception stack is as below

E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
Process: com.alv.remotefs, PID: 6395
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:354)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NoSuchMethodError: No virtual method log(ILjava/lang/String;Ljava/lang/Throwable;)V in class Lokhttp3/internal/platform/Platform; or its super classes (declaration of 'okhttp3.internal.platform.Platform' appears in /data/app/com.alv.remotefs-wBpthQZGx3l6Nl2b4UdXPQ==/base.apk)
at com.burgstaller.okhttp.digest.DigestAuthenticator.authenticateWithState(DigestAuthenticator.java:227)
at com.burgstaller.okhttp.digest.DigestAuthenticator.authenticate(DigestAuthenticator.java:177)
at com.burgstaller.okhttp.DispatchingAuthenticator.authenticate(DispatchingAuthenticator.java:45)
at com.burgstaller.okhttp.CachingAuthenticatorDecorator.authenticate(CachingAuthenticatorDecorator.java:35)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.followUpRequest(RetryAndFollowUpInterceptor.kt:223)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:108)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
at com.burgstaller.okhttp.AuthenticationCacheInterceptor.intercept(AuthenticationCacheInterceptor.java:49)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148)
at com.thegrizzlylabs.sardineandroid.impl.OkHttpSardine.execute(OkHttpSardine.java:626)
at com.thegrizzlylabs.sardineandroid.impl.OkHttpSardine.propfind(OkHttpSardine.java:180)
at com.thegrizzlylabs.sardineandroid.impl.OkHttpSardine.list(OkHttpSardine.java:149)
at com.thegrizzlylabs.sardineandroid.impl.OkHttpSardine.list(OkHttpSardine.java:125)
at com.alv.remotefs.MainActivity$TaskListDAV.doInBackground(MainActivity.java:794)
at com.alv.remotefs.MainActivity$TaskListDAV.doInBackground(MainActivity.java:747)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:764) 

Thanks a lot
best regards
Alex

@guillaume-tgl
Copy link
Contributor

This looks like an incompatibility between the version of OkHttp used by sardine-android and the one used by your app (and specifically the okhttp-digest library). Could you run ./gradlew dependencies in your project and make sure the same version of OkHttp is used everywhere?

@aviollet
Copy link
Author

hi,
oh, ok.

how can i know if this is the problem ?

if i copy the first block (debugCompileClasspath )... i have the following :

debugCompileClasspath - Dependencies for compilation
+--- com.google.android.material:material:1.1.0@aar
+--- androidx.appcompat:appcompat:1.2.0@aar
+--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0@aar
+--- com.github.bumptech.glide:glide:4.11.0@aar
+--- com.google.android.gms:play-services-vision:20.1.3@aar
+--- com.google.android.gms:play-services-vision-common:19.1.3@aar
+--- com.google.android.gms:play-services-clearcut:17.0.0@aar
+--- com.google.android.gms:play-services-flags:17.0.0@aar
+--- com.google.android.gms:play-services-phenotype:17.0.0@aar
+--- com.google.android.gms:play-services-base:17.4.0@aar
+--- com.google.android.gms:play-services-tasks:17.2.0@aar
+--- com.google.android.gms:play-services-basement:17.4.0@aar
+--- androidx.viewpager2:viewpager2:1.0.0@aar
+--- androidx.fragment:fragment:1.1.0@aar
+--- androidx.appcompat:appcompat-resources:1.2.0@aar
+--- androidx.drawerlayout:drawerlayout:1.0.0@aar
+--- androidx.coordinatorlayout:coordinatorlayout:1.1.0@aar
+--- androidx.recyclerview:recyclerview:1.1.0@aar
+--- androidx.transition:transition:1.2.0@aar
+--- androidx.vectordrawable:vectordrawable-animated:1.1.0@aar
+--- androidx.vectordrawable:vectordrawable:1.1.0@aar
+--- androidx.viewpager:viewpager:1.0.0@aar
+--- androidx.loader:loader:1.0.0@aar
+--- androidx.activity:activity:1.0.0@aar
+--- androidx.customview:customview:1.0.0@aar
+--- androidx.core:core:1.3.0@aar
+--- androidx.cursoradapter:cursoradapter:1.0.0@aar
+--- com.github.bumptech.glide:gifdecoder:4.11.0@aar
+--- androidx.exifinterface:exifinterface:1.0.0@aar
+--- androidx.interpolator:interpolator:1.0.0@aar
+--- androidx.cardview:cardview:1.0.0@aar
+--- androidx.lifecycle:lifecycle-runtime:2.1.0@aar
+--- androidx.versionedparcelable:versionedparcelable:1.1.0@aar
+--- androidx.collection:collection:1.1.0@jar
+--- androidx.lifecycle:lifecycle-viewmodel:2.1.0@aar
+--- androidx.savedstate:savedstate:1.0.0@aar
+--- androidx.lifecycle:lifecycle-livedata:2.0.0@aar
+--- androidx.lifecycle:lifecycle-livedata-core:2.0.0@aar
+--- androidx.lifecycle:lifecycle-common:2.1.0@jar
+--- androidx.arch.core:core-runtime:2.0.0@aar
+--- androidx.arch.core:core-common:2.1.0@jar
+--- androidx.annotation:annotation:1.1.0@jar
+--- androidx.constraintlayout:constraintlayout:1.1.3@aar
+--- androidx.constraintlayout:constraintlayout-solver:1.1.3@jar
+--- com.thegrizzlylabs.sardine-android:sardine-android:0.7@aar
+--- com.squareup.okhttp3:okhttp:4.7.2@jar
+--- com.squareup.okio:okio:2.6.0@jar
+--- org.jetbrains.kotlin:kotlin-stdlib:1.3.71@jar
+--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.71@jar
+--- org.jetbrains:annotations:13.0@jar
+--- com.burgstaller:okhttp-digest:2.0@jar
+--- com.drewnoakes:metadata-extractor:2.14.0@jar
+--- com.adobe.xmp:xmpcore:6.0.6@jar
+--- com.github.bumptech.glide:disklrucache:4.11.0@jar
--- com.github.bumptech.glide:annotations:4.11.0@jar

@guillaume-tgl
Copy link
Contributor

Sorry I didn't answer. Were you able to fix your problem?

@aviollet
Copy link
Author

aviollet commented Feb 11, 2021 via email

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