You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Note: I first posted this issue in the Javalin project since I observed it in that context, see javalin/javalin#975. Some further investigation indicated however that the issue is independent of Javalin, so I'm posting it here again.)
The problem is that I'm unable to establish a wss connection to a javalin endpoint using Chrome. Wss works as expected in Firefox and http, https and ws connections work without any issue in both browsers. Chrome does however always return the following error message: Error during WebSocket handshake: Invalid status line
The error is independent of the used keystore, I tried it with a self-signed cert via localhost and via a cert validated through Let's Encrypt and a proper domain, both with the exact same behavior. It works fine without SSL. It also does not work without HTTP2 and with SSL, the other way around is not testable since Chrome does not do HTTP2 over unencrypted connections. The error does however change to Connection closed before receiving a handshake response when not using HTTP2. Below is a minimal working example (in Kotlin) to reproduce the problem. I used https://www.websocket.org/echo.html to test the websocket.
Jetty version
jetty-9.4.25.v20191220; built: 2019-12-20T17:00:00.294Z; git: a9729c7
Java version
jvm 11.0.6+8-b765.40
OS type/version
Windows 10 version 19.09
Description
(Note: I first posted this issue in the Javalin project since I observed it in that context, see javalin/javalin#975. Some further investigation indicated however that the issue is independent of Javalin, so I'm posting it here again.)
The problem is that I'm unable to establish a wss connection to a javalin endpoint using Chrome. Wss works as expected in Firefox and http, https and ws connections work without any issue in both browsers. Chrome does however always return the following error message:
Error during WebSocket handshake: Invalid status line
The error is independent of the used keystore, I tried it with a self-signed cert via localhost and via a cert validated through Let's Encrypt and a proper domain, both with the exact same behavior. It works fine without SSL. It also does not work without HTTP2 and with SSL, the other way around is not testable since Chrome does not do HTTP2 over unencrypted connections. The error does however change to
Connection closed before receiving a handshake response
when not using HTTP2. Below is a minimal working example (in Kotlin) to reproduce the problem. I used https://www.websocket.org/echo.html to test the websocket.The text was updated successfully, but these errors were encountered: