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.

java.lang.NullPointerException:BridgeInterceptor.intercept

See original GitHub issue

It occurs a lot, But I can not locate the row that occurred, Can anyone help me out please.

java.lang.NullPointerException
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java)
	                                                     recover(RetryAndFollowUpInterceptor.java)
	                                                     isRecoverable(RetryAndFollowUpInterceptor.java)
	                                                     sameConnection(RetryAndFollowUpInterceptor.java)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java)
	at okhttp3.RealCall.access$100(RealCall.java)
	at okhttp3.RealCall$AsyncCall.execute(RealCall.java)
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
	at java.lang.Thread.run(Thread.java:838)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
swankjessecommented, Dec 5, 2016

@jaspreet84 please fix your cookie jar to not return null when it should return an empty list.

2reactions
Jaspreet84commented, Dec 5, 2016

I’m on Okhttp 3.5.0 and still see this issue. Important to note that it happens only after I add a cookie to cookiemanager of client:

Exception in thread “main” java.lang.NullPointerException at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:85) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:212) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:179) at okhttp3.RealCall.execute(RealCall.java:63) at com.zscaler.qa.ztaap.business.Authentication.main(Authentication.java:55) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

Please let me know if more info is needed

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NullPointerException | Confluence Server and ... - Jira
java.lang.NullPointerException. Gathering Interest: Assignee: Resolution: Gathering Interest. Unassigned. Unresolved. Component/s.
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