Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android.system.UnixSocketAddress cannot be cast to java.net.InetSocketAddress #3804

Closed
lby1992 opened this issue Jan 30, 2018 · 2 comments
Closed

Comments

@lby1992
Copy link

lby1992 commented Jan 30, 2018

I got the crash on my Nexus 5X running with Android O:

Fatal Exception: java.lang.ClassCastException: android.system.UnixSocketAddress cannot be cast to java.net.InetSocketAddress
       at libcore.io.IoBridge.getLocalInetSocketAddress(IoBridge.java:700)
       at libcore.io.IoBridge.connectDetail(IoBridge.java:197)
       at libcore.io.IoBridge.connect(IoBridge.java:138)
       at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:129)
       at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:356)
       at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
       at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:356)
       at java.net.Socket.connect(Socket.java:616)
       at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:63)
       at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:220)
       at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:146)
       at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:186)
       at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
       at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
       at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
       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:93)
       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:120)
       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$AsyncCall.execute(RealCall.java:129)
       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)

But I can't reproduce it.
I am using OkHttp 3.6.0.
Can someone help me why it occured and how to fix?

@NightlyNexus
Copy link
Contributor

Duplicate of #3438
Update to OkHttp 3.9.1.

@lby1992
Copy link
Author

lby1992 commented Jan 31, 2018

@NightlyNexus Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants