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.

[android][0.31.0] fetch let's encrypt ssl throw FATAL EXCEPTION: OkHttp Dispatcher

See original GitHub issue

fetch(‘https://www.example.com/rest’) will throw exception, the rest url is use let’s encrypt.

the nginx config:

ssl_certificate /etc/letsencrypt/live/XXX/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/XXX/privkey.pem;
        ssl_trusted_certificate /etc/letsencrypt/live/XXX/chain.pem;

the exception:

08-29 12:33:50.075 5379-5508/? E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
                                                 Process: com.xuanhuangnet.app.anytech, PID: 5379
                                                 java.lang.IllegalStateException: closed
                                                     at okio.RealBufferedSink.write(RealBufferedSink.java:39)
                                                     at okio.ForwardingSink.write(ForwardingSink.java:35)
                                                     at com.facebook.react.modules.network.ProgressRequestBody$1.write(ProgressRequestBody.java:58)
                                                     at okio.RealBufferedSink.flush(RealBufferedSink.java:216)
                                                     at com.facebook.react.modules.network.ProgressRequestBody.writeTo(ProgressRequestBody.java:48)
                                                     at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:47)
                                                     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                                                     at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
                                                     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                                                     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
                                                     at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:109)
                                                     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                                                     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
                                                     at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
                                                     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                                                     at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:124)
                                                     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
                                                     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
                                                     at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170)
                                                     at okhttp3.RealCall.access$100(RealCall.java:33)
                                                     at okhttp3.RealCall$AsyncCall.execute(RealCall.java:120)
                                                     at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
                                                     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                     at java.lang.Thread.run(Thread.java:818)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
perrosnkcommented, Feb 21, 2018

Any updates on this? How did you solve this?

1reaction
armadilio3commented, Oct 17, 2016

Please re-open this issue I still get this error on RN0.35. The server also uses lets encrypt and some requests throw the Fatal Exception. But the ngnix server we use doesn’t have any http2 configuration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FATAL EXCEPTION: OkHttp Dispatcher - java - Stack Overflow
From what I've gathered, UI changes must be made in the runOnUiThread() block. But I'm not making any UI changes here in my...
Read more >
Error attempting to get SSL certificate for website - Help
I have tried searching for help, but I just can't seem to figure out why I'm receiving the errors I'm receiving when attempting...
Read more >
FATAL EXCEPTION: OkHttp Dispatcher (Example) - Treehouse
I'm using the OkHttp library in my android app to make web requests to a weather API. I've already implemented my code and...
Read more >
OkHttp with Let's Encrypt Certificates - Shekhar Gulati
<br />Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: ...
Read more >
LetsEncrypt certificates fail in domain validation - GitLab Forum
Which nginx ssl path configurations did you remove to get it working? AtjonTV October 6, 2018, 9:22am ...
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