Firefox cannot connect after refreshing the page from localhost
- Dominant language
- JavaScript
- Stars
- 7.8k
- Forks
- 983
- PR merge metrics
- No merged PRs in 30d
Description
## System
* Arch linux 64bit
* Firefox 77.0.1 64 bit
* Google chrome 83.0.4103.97 (Official Build) (64-bit)
## To reproduce
I'm using [this repo](https://github.com/mrozbarry/simple-peer-firefox-bug-example) to test things out, and I'm 99% sure the issue is not simple-peer, but I just want to step through everything that could be the problem.
## Issue
When I run my app (`yarn start`) locally, and open a fresh firefox instance, my webrtc peer offer and other signals work exactly as expected. If I refresh the page, I get the initial offer signal, but then an error (with trickle on and off):
```
WebRTC: ICE failed, add a TURN server and see about:webrtc for more details
Peer error Error: "Ice connection failed."
makeError index.js:18
_onIceStateChange index.js:681
oniceconnectionstatechange index.js:116
```
To be clear, this seems to mostly be an issue with localhost. I deployed my [app on netlify](https://webrtc-firefox-bug-demo.netlify.app/) and Firefox seems to behave well, or at least I haven't observed the same issues I see on localhost. On chrome, things appear to work find in any case.
I have similar issues with PeerJS as well, but PeerJS appears to have identical issues on both localhost and a deployed domain.
Otherwise, I'm not really sure how to go about debugging this. I have a pretty decent understanding of TCP/UDP sockets on a system level, but I'm not 100% clear on all the effort of doing web peer to peer.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.