google / cronet-transport-for-okhttp

This package allows OkHttp and Retrofit users to use Cronet as their transport layer, benefiting from features like QUIC/HTTP3 support or connection migration.
Apache License 2.0
452 stars 34 forks source link

crash #6

Closed phuong-tran closed 1 year ago

phuong-tran commented 2 years ago

I used the lib but I encountered a crash below

java.util.concurrent.ExecutionException: ey: Exception in CronetUrlRequest: net::ERR_SSL_BAD_RECORD_MAC_ALERT, ErrorCode=11, InternalErrorCode=-126, Retryable=false

Danstahrg commented 2 years ago

Hi,

This is usually an indicator that something/someone is tampering with secure connections. It might be anything from your antivirus to your ISP. It can also happen if you need to use a proxy for Internet connectivity.

If the above doesn't help you can try enabling more verbose logging or capturing a netlog (https://chromium.googlesource.com/chromium/src/+/HEAD/components/cronet/android/test_instructions.md#debugging) to see what's going on in more detail.

phuong-tran commented 2 years ago

Hi, thanks for your reply, is there any way to avoid crashing the app? In this case, the app cannot use but just react like a connection issue.

Danstahrg commented 1 year ago

Exceptions should bubble up all the way to the call site (either directly if using call.execute(), or in the onFailed() callback if you use enqueue). You can handle them there.

If that's not the case please share a full stack trace so we can investigate.