-
Notifications
You must be signed in to change notification settings - Fork 653
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
Apollo client error Android 7.0 #3571
Comments
Hi 👋! Thanks for reaching out! That looks like a SSL error? Can you share the full stacktrace from the error? Also, it looks like you're trying to connect to a local server at IP |
Thanks, below are the detail.. 2021-11-18 11:59:58.476 1712-5755/com.techvibe.studylabteacher D/libc-netbsd: getaddrinfo: sites.techvibesltd.com get result from proxy gai_error = 0 |
still on this, i don't know if this looks like local server |
Here is my client method and header
|
THis works on other android API like 8,10.... |
That sounds awfully like square/okhttp#2372 Another option would be to update your security provider in case a root certificate is not present on this device?https://developer.android.com/training/articles/security-gms-provider?authuser=1 ? |
Dumping the connection info shows TLS1.2 indeed:
I'm not too well versed in the SSL/TLS details but that's another thing pointing at older versions of Android not supporting TLS1.2 by default. There are a number of suggestions in that other issue worth trying. Maybe try this one ? |
Thanks so much @martinbonnin , but this API version is still very much higher than lollipop (v5.0), the solution above addresses pre-lollipop. |
Another thing I have observed was that this same device can successfully make retrofit okhttp calls. |
Trying to run a query against https://sites.techvibesltd.com/web/api/ on a
So I'd bet for a missing root certificate somewhere although the fact that retrofit is running would contradict that. Is retrofit using the same url ( |
Wow,
I really appreciate you, sir.
…On Thu, Nov 18, 2021 at 3:25 PM Martin Bonnin ***@***.***> wrote:
Trying to run a query against https://sites.techvibesltd.com/web/api/ on
a apiLevel=24 emulator, I get the following stacktrace:
2021-11-18 15:17:54.788 4919-4919/com.example.rocketreserver W/System.err: com.apollographql.apollo.exception.ApolloNetworkException: Failed to execute http call for operation 'GetPing'
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: at com.apollographql.apollo.internal.interceptor.ApolloServerInterceptor$executeHttpCall$1.onFailure(ApolloServerInterceptor.kt:107)
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.RealCall$AsyncCall.execute(RealCall.java:211)
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: at java.lang.Thread.run(Thread.java:761)
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:361)
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:320)
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:284)
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:169)
2021-11-18 15:17:54.789 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:258)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:127)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:257)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at okhttp3.RealCall$AsyncCall.execute(RealCall.java:201)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: ... 4 more
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:549)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:508)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:401)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:375)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:304)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:88)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:178)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:596)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:357)
2021-11-18 15:17:54.790 4919-4919/com.example.rocketreserver W/System.err: ... 23 more
2021-11-18 15:17:54.791 4919-4919/com.example.rocketreserver W/System.err: Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
2021-11-18 15:17:54.791 4919-4919/com.example.rocketreserver W/System.err: ... 34 more
So I'd bet for a missing root certificate somewhere although the fact that
retrofit is running would contradict that. Is retrofit using the same url (
https://sites.techvibesltd.com/web/api/) ? If yes, can you try passing
the exact same okHttpClient to both Apollo and Retrofit?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3571 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG7BGFSZXV34JARRVURWFZTUMUEFNANCNFSM5IJIW2VA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I will relate this to my team mates, or what exactly can I do? |
Did you try updating your security provider as described there: https://developer.android.com/training/articles/security-gms-provider?authuser=1 ? ProviderInstaller.installIfNeeded(context) |
No, I haven't, I have a meeting with my team tomorrow. I will share it with
them. Thanks so much for your help.
…On Fri, Nov 19, 2021, 10:25 AM Martin Bonnin ***@***.***> wrote:
Did you try updating your security provider as described there:
https://developer.android.com/training/articles/security-gms-provider?authuser=1
?
ProviderInstaller.installIfNeeded(context)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3571 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG7BGFVH55JQN4FO3R27ISLUMYJYJANCNFSM5IJIW2VA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi 👋 How did that meeting go? Were you able to fix this issue? |
@alumichael Did you end up finding a solution for this? |
Change the hostnameVerifier OkHttpClient.Builder()
.addInterceptor(AuthorizationInterceptor())
.hostnameVerifier { hostname, session -> true }
.build() |
Summary
Hello everyone, I observed the apollo client library is not working for android 7.0
Version
using apollo library version 2.5.10
Description
On installing the app on android 7.0, doing a query, I got this error below
I/System.out: close [socket][/192.168.43.21:59851]
I/ApollosError: Failed to execute http call for operation 'GetAllFeedEntries'
D/NativeCrypto: ssl=0xaaf2c1c0 NativeCrypto_SSL_interrupt
Please, what can I do?
The text was updated successfully, but these errors were encountered: