Android O java.lang.RuntimeException: protocol negotiation failed
See original GitHub issueI am getting handshake failure on all gRPC requests when using Android 8.0, I am not sure if it is a gRPC library issue or Android O preview.
What version of gRPC are you using?
1.2.0
What JVM are you using (java -version
)?
Android RunTime (ART)
What did you do?
It can be reproduced by trying to make gRPC request in Android O
What did you expect to see?
Request goes through and server responds back
What did you see instead?
Caused by: java.lang.RuntimeException: protocol negotiation failed
at io.grpc.okhttp.OkHttpProtocolNegotiator.negotiate(OkHttpProtocolNegotiator.java:107)
at io.grpc.okhttp.OkHttpProtocolNegotiator$AndroidNegotiator.negotiate(OkHttpProtocolNegotiator.java:169)
at io.grpc.okhttp.OkHttpTlsUpgrader.upgrade(OkHttpTlsUpgrader.java:
at io.grpc.okhttp.OkHttpClientTransport$1.run(OkHttpClientTransport.java:433)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117)
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)
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Android grpc error: TLS ALPN negotiation failed with protocols
HTTP/2 is negotiated during TLS using ALPN. The client sends what protocols it supports (in this case grpc-exp and h2, aka http/2).
Read more >SSLCertificateSocketFactory - Android Developers
Returns the Next Protocol Negotiation (NPN) protocol selected by client and server, or null if no protocol was negotiated.
Read more >Protocol Negotiation Failed - TeamViewer Community
Can you kindly restart TeamViewer services for both sides of connection please then try again for remote control connection. Kindly follow the ...
Read more >8 Java Secure Socket Extension (JSSE) Reference Guide
The negotiation phase during which the two socket peers agree to use a new or existing session. The handshake protocol is a series...
Read more >504 Gateway Timeout - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 504 Gateway Timeout server error response code indicates that the server, while acting as a gateway ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ericgribkoff We updated our Jetty servers to support ALPN and it resolved the issue. Thanks!
@ericgribkoff this sounds to be right! I am gonna update my server to support ALPN and will close the issue as soon as I confirm the fix. Thanks for the help!