rburgst/okhttp-digest

Authentication Cache Concurrent Modification Exception

emauro opened this issue · 3 comments

I received this crash report and I couldn't figure where is the problem. Using version 1.18 with Okhttp 3.12.6.

Fatal Exception: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode + 1441(HashMap.java:1441)
at java.util.HashMap$EntryIterator.next + 1475(HashMap.java:1475)
at java.util.HashMap$EntryIterator.next + 1473(HashMap.java:1473)
at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1.next + 1703(Collections.java:1703)
at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1.next + 1696(Collections.java:1696)
at java.util.HashMap.putMapEntries + 511(HashMap.java:511)
at java.util.HashMap. + 489(HashMap.java:489)
at zn.a + 26(DigestAuthenticator.java:26)
at wn.a + 2(DispatchingAuthenticator.java:2)
at sn.intercept + 6(AuthenticationCacheInterceptor.java:6)
at okhttp3.internal.http.RealInterceptorChain.proceed + 10(RealInterceptorChain.java:10)
at okhttp3.internal.http.RealInterceptorChain.proceed + 1(RealInterceptorChain.java:1)
at rd1$b$a.intercept + 9(HTTPClient.kt:9)
at okhttp3.internal.http.RealInterceptorChain.proceed + 10(RealInterceptorChain.java:10)
at okhttp3.internal.http.RealInterceptorChain.proceed + 1(RealInterceptorChain.java:1)
at okhttp3.RealCall.getResponseWithInterceptorChain + 13(RealCall.java:13)
at okhttp3.RealCall$AsyncCall.execute + 2(RealCall.java:2)
at okhttp3.internal.NamedRunnable.run + 3(NamedRunnable.java:3)
at java.util.concurrent.ThreadPoolExecutor.runWorker + 1167(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run + 641(ThreadPoolExecutor.java:641)
at java.lang.Thread.run + 764(Thread.java:764)

hm, sorry for the late response but the fact that the source lines are obfuscated does not help. I will try to analyze and fix the problem

Since I cannot use okhttp 4 I made the necessary changes in tag 1.18 in order to use okhttp 3. Let me know if can do something else.

Thanks!!