Coder Social home page Coder Social logo

请求失败 about net HOT 6 CLOSED

breakadmin avatar breakadmin commented on June 2, 2024
请求失败

from net.

Comments (6)

liangjingkanji avatar liangjingkanji commented on June 2, 2024

请求用的OkHttp, 从未出现过请求不通的bug

请提供请求报错信息

from net.

breakadmin avatar breakadmin commented on June 2, 2024

javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

from net.

liangjingkanji avatar liangjingkanji commented on June 2, 2024
  1. 证书问题, 你检查下你的证书
  2. 如果是你说的重启app偶尔会请求失败请反馈给Okhttp官方, 网络连接Net没有插入任何代码
  3. 临时解决: 信任任何证书

from net.

breakadmin avatar breakadmin commented on June 2, 2024
at com.drake.net.interceptor.NetOkHttpInterceptor.intercept(NetOkHttpInterceptor.kt:105)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
     at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:221)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
     at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
     at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
     at com.pick.quickearn.ui.videModel.MainViewModel$getSystemConfig$1$invokeSuspend$$inlined$Get$default$1.invokeSuspend(NetCoroutine.kt:459)
     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
     at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
     at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
    Caused by: java.net.SocketException: Connection reset
     at java.net.SocketInputStream.read(SocketInputStream.java:215)
     at java.net.SocketInputStream.read(SocketInputStream.java:144)
     at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:941)
     at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:905)
     at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.access$100(ConscryptEngineSocket.java:727)
     at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:241)
     at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:220)
     at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379)
     at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337)
     at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209)
     at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
     at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
     at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
     at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
     at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
     at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
     at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
     at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
     at com.drake.net.interceptor.NetOkHttpInterceptor.intercept(NetOkHttpInterceptor.kt:89)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) 
     at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:221) 
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) 
     at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) 
     at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) 
     at com.pick.quickearn.ui.videModel.MainViewModel$getSystemConfig$1$invokeSuspend$$inlined$Get$default$1.invokeSuspend(NetCoroutine.kt:459) 
     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 
     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 
     at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) 
     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) 
     at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) 
     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) 
     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) 
     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664

from net.

liangjingkanji avatar liangjingkanji commented on June 2, 2024
  1. 你用OkHttp原始请求试下吧, 这和Net没有关系
  2. 你们公司后端写的有问题, 强制关流了

from net.

liangjingkanji avatar liangjingkanji commented on June 2, 2024

如果坚持认为Net有问题, 但是不太想追溯问题(本框架属于开源项目), 可以换Retrofit或者Okhttp

考虑到本问题毫无进展, 我将暂时关闭此问题

from net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.