Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upNo WebRTC support: Specify `opts.wrtc` option in this environment #1639
Comments
This comment has been minimized.
This comment has been minimized.
Even including wrtc still triggers this error, anyone to help out please on how to fix this? Thanks. |
This comment has been minimized.
This comment has been minimized.
|
Are you running this code in a Node.js environment, Electron environment, or the browser? If so, which browser? In Node.js, you shouldn't need to even set the option to The only way the error you're getting could possibly happen (as far as I can tell), is if you're setting the new WebTorrent({ tracker: { wrtc: true }})Or you're setting |
This comment has been minimized.
This comment has been minimized.
|
The behavior of this was so inconsistent I couldn't accurately reproduce it because of the multiple packages involved (wrtc, simple-peer, and webtorrent). I have tried with the options you mentioned and other different workarounds, but in any case I made my own fork of simple-peer so the error is no longer thrown, so I will close this unless I can accurately reproduce it. |
What version of WebTorrent?
0.103.1
What operating system and Node.js version?
Windows 7, v11.6.0
I'm having this issue again : feross/simple-peer#110
I don't understand what I'm doing wrong.
Here is my code for adding a torrent :
(As I pasted this snippet I just remember I added a try-catch block for this reason around a month ago, I just forgot about this problem.)
Once the torrent is added through the code above, it's downloaded for a few seconds, and then an error is thrown.
The error thrown is similar to the linked issue :
This is weird because I tried to go through simple-peer to disable wrtc, but it seems ironic, here's the relevant code for the error above :
Setting wrtc to either a falsey value, or a truthy one, will always trigger the error. Any help on how to work around this error? Thanks.