android – javax.net.ssl.SSLHandshakeException:java.lang.IllegalArgumentException:toASCII的输入无效:ip_nbae7bac35.kodrive.xyz

前端之家收集整理的这篇文章主要介绍了android – javax.net.ssl.SSLHandshakeException:java.lang.IllegalArgumentException:toASCII的输入无效:ip_nbae7bac35.kodrive.xyz前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

这个例外有解决方法吗?看看这个issue on github听起来好像它可能是一个机器人的bug,有关主机名有下划线字符的东西.

这是堆栈跟踪:

  1. javax.net.ssl.SSLHandshakeException: java.lang.IllegalArgumentException: Invalid input to toASCII: ip_nbae7bac35.kodrive.xyz
  2. at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:219)
  3. at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:318)
  4. at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:282)
  5. at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:167)
  6. at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
  7. at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
  8. at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
  9. at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
  10. at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
  11. at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
  12. at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
  13. at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
  14. at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
  15. at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
  16. at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
  17. at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
  18. at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
  19. at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
  20. at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
  21. at okhttp3.RealCall.execute(RealCall.java:77)
最佳答案
您的问题是您不能使用包含_的toASCII将字符串转换为ASCII.除了与域名所有者取得联系并要求他们删除_之外,没有办法解决这个问题.这就是你得到IllegalArgumentException的原因,字符串是“非法的”.

猜你在找的Android相关文章