question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android O java.lang.RuntimeException: protocol negotiation failed

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
fbarzincommented, Aug 4, 2017

@ericgribkoff We updated our Jetty servers to support ALPN and it resolved the issue. Thanks!

0reactions
fbarzincommented, Aug 2, 2017

@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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found