Was trying today to use http2 with chrome and I get errors like:
[2018-04-22T20:06:46.518Z] ERROR (proxy/81952 on Roberts-MacBook-Pro-2.local): session error
err: {
"type": "NghttpError",
"message": "Received bad client magic byte string",
"stack":
Error [ERR_HTTP2_ERROR]: Received bad client magic byte string
at Http2Session.onSessionInternalError [as error] (internal/http2/core.js:574:26)
"code": "ERR_HTTP2_ERROR",
"name": "Error [ERR_HTTP2_ERROR]",
"errno": -903
}
Possibly related? https://github.com/nghttp2/nghttp2/issues/607
Seems to be related to non secure server.
no modern browser will connect to http2 servers without tls
Quoting the docs:
Since there are no browsers known that support unencrypted HTTP/2, the use of http2.createSecureServer() is necessary when communicating with browser clients.
I'm going to go ahead and close this (seems like it was closed and accidentally reopened) but anyone feel free to reopen if you'd like to discuss or follow up with a PR.
It doesn't seem like it's related to encryption but rather I think Chrome might be sending http/1.1 request for some reason? But why... ? It makes no sense 馃槙
@ronag if you get more info, could you reopen and post it. This could very well be Chrome related because they do seem to have on and off bugs with http2.
You could also have a look at https://bugs.chromium.org/p/chromium/issues/list?q=component:Internals%3ENetwork%3EHTTP2
Most helpful comment
no modern browser will connect to http2 servers without tls