You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RTC peers are released too slowly, causing an error that breaks both WebTorrent Desktop and the browser-only version of WebTorrent (while running in Chromium browsers). The following error will be seen in WD's "Developer > Show WebTorrent Process" menu: Failed to construct 'RTCPeerConnection': Cannot create so many PeerConnections
When this occurs, WebTorrent is completely unable to seed data. It is permanently broken until the process has been restarted.
This code can be used to fix the problem:
function forcePeerGC () {
queueMicrotask(() => {
let img = document.createElement('img')
img.src = window.URL.createObjectURL(new Blob([new ArrayBuffer(5e+7)]))
img.onerror = function () {
window.URL.revokeObjectURL(this.src)
img = null
}
})
}
setInterval(forcePeerGC, 30000)
What did you expect to happen?
Ideally, Chromium would perform proper garbage collection. But since that bug has existed for 3 years, I think it's unlikely to be fixed anytime soon.
Are you willing to submit a pull request to fix this bug?
I am willing to do this, though I have tried and I am struggling to figure out how. Tests fail because the "document" object does not exist in Node, and neither does the "new Blob()" function.
The text was updated successfully, but these errors were encountered:
Hi Guys ,
Any news regarding this BUG ?
Did you managed to solve this somehow ?
This issue still happening in the lib i'm afraid ( still didn't applied the fix above ) .
Thanks
What version of this package are you using?
^9.9.3
What operating system, Node.js, and npm version?
This happens on both Windows 10 and Ubuntu 20.024. It's not an NPM or Node problem.
What happened?
This is a known bug in Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=825576
This is currently affecting my ability to use WebTorrent: webtorrent/webtorrent#2017
RTC peers are released too slowly, causing an error that breaks both WebTorrent Desktop and the browser-only version of WebTorrent (while running in Chromium browsers). The following error will be seen in WD's "Developer > Show WebTorrent Process" menu: Failed to construct 'RTCPeerConnection': Cannot create so many PeerConnections
When this occurs, WebTorrent is completely unable to seed data. It is permanently broken until the process has been restarted.
This code can be used to fix the problem:
What did you expect to happen?
Ideally, Chromium would perform proper garbage collection. But since that bug has existed for 3 years, I think it's unlikely to be fixed anytime soon.
Are you willing to submit a pull request to fix this bug?
I am willing to do this, though I have tried and I am struggling to figure out how. Tests fail because the "document" object does not exist in Node, and neither does the "new Blob()" function.
The text was updated successfully, but these errors were encountered: