# Local webtransport in firefox

**URL:** <https://discuss.ipfs.tech/t/local-webtransport-in-firefox/17767>\
**Category:** Help\
**Tags:** webtransport\
**Created:** [March 27, 2024, 6:52am UTC](https://discuss.ipfs.tech/t/local-webtransport-in-firefox/17767 "2024-03-27T06:52:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![h30x](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/h30x/32/8463_2.png) [@h30x](https://discuss.ipfs.tech/u/h30x)\
**Post date:** [March 27, 2024, 6:52am UTC](https://discuss.ipfs.tech/t/local-webtransport-in-firefox/17767/1 "2024-03-27T06:52:05Z")

</div>

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

* * *

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

```auto
/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWF44SaSomGuUSNycgpkRwQcxcsMYeNbtn6XCHPR2ojodv
/ip4/127.0.0.1/udp/4001/quic-v1/p2p/12D3KooWF44SaSomGuUSNycgpkRwQcxcsMYeNbtn6XCHPR2ojodv
/ip4/127.0.0.1/udp/4001/quic-v1/webtransport/certhash/uEiCQEENr7FShHOkuCAUCgW-oahGIGj0Mk3tOHXQjrsWGWQ/certhash/uEiCG3LMdW9dtRC_kXft2TlE66kZ4RX1MzQksLwxRgbJMVw/p2p/12D3KooWF44SaSomGuUSNycgpkRwQcxcsMYeNbtn6XCHPR2ojodv

```

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

```auto
const local_peer = [
  '/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWF44SaSomGuUSNycgpkRwQcxcsMYeNbtn6XCHPR2ojodv',
  '/ip4/127.0.0.1/udp/4001/quic-v1/p2p/12D3KooWF44SaSomGuUSNycgpkRwQcxcsMYeNbtn6XCHPR2ojodv',
  '/ip4/127.0.0.1/udp/4001/quic-v1/webtransport/certhash/uEiCQEENr7FShHOkuCAUCgW-oahGIGj0Mk3tOHXQjrsWGWQ/certhash/uEiCG3LMdW9dtRC_kXft2TlE66kZ4RX1MzQksLwxRgbJMVw/p2p/12D3KooWF44SaSomGuUSNycgpkRwQcxcsMYeNbtn6XCHPR2ojodv'
]

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

```

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

```auto
https://127.0.0.1:4001/.well-known/libp2p-webtransport?type=noise	

```

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

```auto
// 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](https://developer.mozilla.org/en-US/docs/Web/API/WebTransport)) but it seems the certificate is accepted by chromium and not by firefox.

---

<div class="post-metadata">

**Author:** ![adin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/adin/32/2679_2.png) [@adin](https://discuss.ipfs.tech/u/adin)\
**Post date:** [April 1, 2024, 4:55am UTC](https://discuss.ipfs.tech/t/local-webtransport-in-firefox/17767/2 "2024-04-01T04:55:46Z")

</div>

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](https://bugzilla.mozilla.org/show_bug.cgi?id=1873263)). 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](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/125). 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](https://issues.chromium.org/issues/40069954) (feel free to star the issue so they know people care).
