Local webtransport in firefox

TL;DR Webtransport does work in chromium but not in firefox.

I started a kubo node locally, it exposes these multiaddresses:


Then I initialize a webtransport libp2p connection (in Helia):

const local_peer = [

const libp2p = await createLibp2p({
  peerDiscovery: [
      list: local_peer
  transports: [webTransport()],
  connectionGater: {
    denyDialMultiaddr: async () => false

This works well in chromium, I see this connection in the network tab	

But this does not work in firefox, I get this error:

// WebTransport connection rejected
WebTransportError { source: "session", streamErrorCode: null, name: "WebTransportError", message: "WebTransport connection rejected", code: 0, result: 0, filename: "", lineNumber: 0, columnNumber: 0, data: null }

Does anybody know where the problem comes from? I’m aware webtransport is only available in a “secure context” (see doc WebTransport - Web APIs | MDN) but it seems the certificate is accepted by chromium and not by firefox.

If you look at the MDN docs options.serverCertificateHashes is not yet supported in Firefox (although IIUC it’s in beta! 1873263 - Webtransport: serverCertificateHashes does not work as expected). This is required for talking to a kubo node since without it you’d need to have a CA signed certificate.

So if this indeed made it into Firefox 125 you should only have to wait a few weeks until it’s released Firefox 125 for developers - Mozilla | MDN. Otherwise you should be able to download the Firefox beta and try it out.

Initial testing shows that WebTransport should work much better in Firefox than Chromium at the moment due to an ongoing issue with Chromium in need of resolution Chromium (feel free to star the issue so they know people care).

1 Like