-
Notifications
You must be signed in to change notification settings - Fork 25
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
WebTransportError: Opening handshake failed #166
Comments
And, what is the error message on the browser side? |
And can you replace the certificate generating code, with the one we use in our unit tests. |
The error sounds more like a closed blocked port. Please check, which app is bound to which udp port.... |
That's weird, the port seems to be open:
With
Tested on Chrome (110.0.5481.177) and Chromium (112.0.5615.49), with Node.js v16.15.1 and v18.12.1. I feel there is something obvious I am missing.
Yes please. |
Here are the debug logs of the session (in https://netlog-viewer.appspot.com):
|
The best way to debug, is to check the source code out from GitHub and compile it with If it reaches the code here: webtransport/src/http3server.cc Line 410 in 320550b
The session establishment is nearly done. Here: webtransport/src/http3server.cc Line 323 in 320550b
The function called for every UDP packet, so if it is not called, the packets never reach the setup. Here: webtransport/src/http3dispatcher.cc Line 48 in 320550b
you can see if a quick connection is established. Here: webtransport/src/http3serverbackend.cc Line 52 in 320550b
are WebTransport requests processed. The whole file here: webtransport/src/http3serverstream.cc Line 76 in 320550b
deals with the connection. Any way if you put there some print code or place debugger break points, you should see how far it comes. |
I have added a bunch of Are you able to reproduce the issue with the example I provided above (https://github.com/darrachequesne/webtransport-example)? Or is it a problem with my own setup? Else, is it possible that there is a compatibility issue with latest versions of chromium, as is suggested there? |
Ok interesting, if you are not hitting OnSocketEvent, then you get no UDP packet. So the UDP are not reaching your socket.
I am only doing programming in my free time on weekends, and this weekend did not have enough time.
No I have run it against Chrome Canary on Sunday. |
May be look into the server start phase: webtransport/src/http3server.cc Line 139 in 320550b
|
I am now trying it. First thing to note, it seems not to work with localhost, using a normal ip address it works. I will check if this is a problem in the webtransport module. |
I have checked localhost. The code of the library translates it fine to 127.0.0.1 . However, the browser seems to have no clue what localhost ist, but it knows 127.0.0.1 . Could be a bug in chromium, would not be the first. |
It does indeed seem to be linked to the usage of "localhost". If I create an alias in my
And create a self-signed certificate for this domain, then I'm able to successfully reach the server 🚀 In case anyone is interested, here is the diff: darrachequesne/webtransport-example@46a9098 Thanks a lot for your help 👍 |
For future readers, using
#!/bin/bash
openssl req -new -x509 -nodes \
-newkey ec -pkeyopt ec_paramgen_curve:prime256v1 \
-out cert.pem -keyout key.pem \
-subj '/CN=127.0.0.1'
#!/bin/bash
HASH=`openssl x509 -pubkey -noout -in cert.pem |
openssl pkey -pubin -outform der |
openssl dgst -sha256 -binary |
base64`
/opt/google/chrome/chrome \
--origin-to-force-quic-on=127.0.0.1:3000 \
--ignore-certificate-errors-spki-list=$HASH \
https://localhost:3000 No alias needed 🚀
|
And this may be a bug in chrome, or in my certificate-checking code. |
Hi! I'm trying to use the library, but can't achieve connection on Chrome (Version 110.0.5481.177, Ubuntu 20.04).
I've created a sample project reproducing the issue: https://github.com/darrachequesne/webtransport-example
I've taken a look at #76, but it does not seem to be related to the certificate.
It works with the Node.js client though. Thanks in advance!
The text was updated successfully, but these errors were encountered: