question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IllegalArgumentException reading Cache Entry

See original GitHub issue

We see infrequent crashes (only reports for a fraction of users, could not reproduce locally) that seem to happen when okhttp loads a cached response:

Fatal Exception: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no colon was found
       at okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1325)
       at okhttp3.HttpUrl.get(HttpUrl.java:916)
       at okhttp3.Request$Builder.url(Request.java:165)
       at okhttp3.Cache$Entry.response(Cache.java:702)
       at okhttp3.Cache.get(Cache.java:211)
       at okhttp3.Cache$1.get(Cache.java:145)
       at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:54)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
       at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
       at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
       at // some Interceptor that simply adds a "User-Agent" header
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
       at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
       at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
       at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
       at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)

While reading the changelog I noticed:

Fix: Don’t corrupt the response cache when a 304 (Not Modified) response overrides the stored “Content-Encoding” header.

could this be related to a corrupted cache? If yes do we need to wipe the cache or will that recover by itself?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
swankjessecommented, Nov 7, 2018

Yeah, that’ll work. Sigh.

0reactions
Antim4ttercommented, May 11, 2020

I know is been almost 1 year after this crash but I’,m using 3.10.0 version, did you find a way to reproduce it? Thanks in advance

Read more comments on GitHub >

github_iconTop Results From Across the Web

jenkins2 branch-indexing: java.lang.IllegalArgumentException
the problem was a corrupted cache rm -rf org.jenkinsci.plugins.github.GitHubPlugin.cache/. solved the problem for me.
Read more >
Question: Custom cache not working
IllegalArgumentException : Missing registration for cache with ID: 'TestCacheWithExpiration'. I have tried modifying the package.json from both ...
Read more >
Interface Cache<K,V> - javadoc.io
If the cache is configured read-through, and a get for a key would return null because an entry is missing from the cache,...
Read more >
[#DRILL-3917] IllegalArgumentException when running query ...
IllegalArgumentException when running query after creating ... SYSTEM ERROR: IllegalArgumentException: MinorFragmentId 0 has no read entries ...
Read more >
TreeCache and enum| JBoss.org Content Archive (Read Only)
PropertyAccessException: IllegalArgumentException occurred while calling setter of ... at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:116)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found