BiagioFesta / wtransport

Async-friendly WebTransport implementation in Rust
Apache License 2.0
462 stars 31 forks source link

Firefox 130 connection issues #224

Open rofferom opened 2 months ago

rofferom commented 2 months ago

I have difficulties to connect to wtransport, using Firefox 130 and wtransport 0.3.1.

I have seen in #166 that there has been a recent fixup regarding Firefox support, however I have various behavior, depending of the OS:

Some extra notes

Here are some logs

2024-09-19T10:21:38.664 DEBUG wtransport::endpoint - New incoming QUIC connection
2024-09-19T10:21:38.664 DEBUG rustls::server::hs - decided upon suite TLS13_AES_128_GCM_SHA256
2024-09-19T10:21:38.665 DEBUG rustls::server::hs - Chosen ALPN protocol [104, 51]
2024-09-19T10:21:38.665 DEBUG quinn_proto::connection - failed to authenticate packet
2024-09-19T10:21:38.665 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:38.666 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:38.670 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:38.670 DEBUG quinn_proto::connection - ECN not acknowledged by peer
2024-09-19T10:21:38.676 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:38.676 DEBUG wtransport::driver - Driver; quic_id=2955843274976
2024-09-19T10:21:38.676 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:38.677 DEBUG wtransport::driver::worker - Started
2024-09-19T10:21:38.677 DEBUG wtransport::driver::worker - New incoming uni stream (2)
2024-09-19T10:21:38.677 DEBUG wtransport::driver::worker - Stream; message=id=2
2024-09-19T10:21:38.677 DEBUG wtransport::driver::worker - New incoming uni stream (6)
2024-09-19T10:21:38.677 DEBUG wtransport::driver::worker - Stream; message=id=6
2024-09-19T10:21:38.677 DEBUG wtransport::driver::worker - New incoming uni stream (10)
2024-09-19T10:21:38.678 DEBUG wtransport::driver::worker - Stream; message=id=10
2024-09-19T10:21:38.678 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:38.678 DEBUG wtransport::driver::worker - Type: Control
2024-09-19T10:21:38.678 DEBUG wtransport::driver::worker - Type: QPackEncoder
2024-09-19T10:21:38.678 DEBUG wtransport::driver::worker - Type: QPackDecoder
2024-09-19T10:21:38.678 DEBUG wtransport::driver::worker - Received: Settings({H3Datagram: 1, EnableWebTransport: 1, QPackMaxTableCapacity: 65536, QPackBlockedStreams: 20})
2024-09-19T10:21:38.681 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:38.683 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:38.686 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:38.689 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:38.711 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:38.711 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:43.713 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:43.713 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:43.724 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:48.736 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:48.737 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:48.740 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:53.743 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:53.744 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:53.748 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:58.751 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:58.751 DEBUG quinn::connection - drive; id=0
2024-09-19T10:21:58.755 DEBUG quinn::connection - drive; id=0
2024-09-19T10:22:03.768 DEBUG quinn::connection - drive; id=0
2024-09-19T10:22:03.769 DEBUG quinn::connection - drive; id=0
2024-09-19T10:22:03.772 DEBUG quinn::connection - drive; id=0
2024-09-19T10:22:08.783 DEBUG quinn::connection - drive; id=0
2024-09-19T10:22:08.783 DEBUG quinn::connection - drive; id=0
2024-09-19T10:22:08.786 DEBUG quinn::connection - drive; id=0
2024-09-19T10:22:09.375 DEBUG wtransport::driver::worker - Ended with error: NotConnected
2024-09-19T10:22:09.375 DEBUG quinn::connection - drive; id=0
2024-09-19T10:22:09.375 DEBUG quinn::connection - drive; id=0
2024-09-19T10:22:09.375 DEBUG quinn::connection - drive; id=0
2024-09-19T10:22:09.378 DEBUG quinn::connection - drive; id=0
2024-09-19T10:22:09.465 DEBUG quinn::connection - drive; id=0
BiagioFesta commented 2 months ago

Still not able to reproduce (on Linux 130.0.1).


I'm not using serverCertificateHashes because it seems not to be supported on Firefox. Instead I'm using a Let's Encrypt certificate

BTW, serverCertificateHashes is supported on Firefox since version 125: https://caniuse.com/mdn-api_webtransport_webtransport_options_servercertificatehashes_parameter

rofferom commented 1 month ago

I reproduced the issue more than 5 times in a row with Firefox 131.0 on Linux vs wtransport 0.4.0, actually I never managed to connect. But I have no issue while running examples/full.rs. I'm going to check the differences with my integration of wtransport.

About serverCertificateHashes, I wasn't sure of the actual support in Firefox, I previously had some errors that seemed to be related to it. Since it seems I have another issue, maybe my interpretation of the real issue I was facing was wrong. I'm going to continue to use serverCertificateHashes for this issue