webtorrent/webtorrent-hybrid

webtorrent-hybrid seed for several seconds and stop

Danorcohen opened this issue ยท 27 comments

Hi,

I tried to seed an mp4 file (800M) with webtorrent-hybrid or webtorrent-hybrid-cli and to watch it with Webtorrent video player (such as instant.io). The web player shows that it start downloading from one peer (my server) and the server (webtorrent-hybrid-cli) shows that the client is downloading for several seconds... then the speed decreaces and eventually stops.. then, after a minute or two, it starts to download again for several seconds and stops again... and in the several seconds that it works the download speed is 300kB/s max...

According to Speedtest, in the server side the download rate is 480Mbit/s and upload rate 95Mbit/s
In the client side the download rate is 42Mbit/s and upload rate 3Mbit/s

What is the problem?

Nothing?

I have this problem too.

Hi,

I confirm this problem on my server. I thought it was a firewall issue, but it happens even after stopping the firewall.

I have same problem , Destop verson too ( webpeer not work )
Webtorrent still need many improvements for smooth operation

+1 also having this issue, connections are initiated and run briefly, but aren't maintained. No idea how useful this is, but left side is webtorrent-hybrid attempting to download on a raspberry pi. Right side is webtorrent-hybrid seeing from os-x. Both are on the same network and subnet, start up and connect immediately and transfer at around 1MB/s for a few seconds, and then crash. The connection tends to restart every 30-60 seconds for a while before halting indefinitely.
screen shot 2017-09-14 at 9 34 21 pm

Same here... just few seeding few seconds

Anybody found a solution or a workaround to this? I'm really going mad trying to understand where the problem is...

Same problem here, running webtorrent-hybrid in node on a mac. Starts and then hangs after a couple seconds.

I have the same problem with both webtorrent and webtorrent-hybrid.

I want to be able to keep seeding a file that is already downloaded but it only lasts for about 5 seconds. Is there anyway to do the equivalent of the --keep-seeding flag through the API? @feross

@TheFeelTrain The API automatically continues seeding, you don't need to pass any special flag.

+1.
Been a year. No updates ?
doesn't hang. but doesn't continue seeding either - at least not to the browser.

Made a browser process + node process download (& then auto seed ?) the same torrent. Torrent does become available successfully. But once I kill the browser process, after a while the torrent isn't available anymore to any new browser process, despite node process staying active all through out without any errors.

I also confirmed that the node process did not hang, because the code i put into node for remotely managing torrents, still runs fine & deletes the the torrent when instructed.

Is this expected behaviour ?

๐Ÿ‘ Similar problem, using webtorrent-hybrid via CLI.

Same result as @flimshaw.

I looked through the code and noticed webtorrent/webtorrent-hybrid only sets an RTC global that later gets "picked up" (referenced via the same global scope, there is no intermediary code) by webtorrent/webtorrent, so there's not much code in this repo that can break.

The underlying code is webtorrent-cli + webtorrent (via require()).

@feross Before outsiders have to jump in blind & deep, do you have any thoughts on what the cause might be? I'm up for fixing it, just hoping to save some time off debugging someone else's code.

@sebastienvercammen I suspect there's a bug in webtorrent itself that causes seeding to stop after some time. I think it will be a bit tricky, but not impossible to track down. Please ping me if you track it down and have a PR that fixes it :)

@feross Thanks for jumping in. Will do. :)

@feross , I got the same issue after seeding for 7/8 hours from my raspberry-pi. Then the terminal freezes and the torrent is unavailable. Also I tried the cli versions on other devices as well as the Webtorrent Desktop on Windows and Ubuntu, similar issues arose and sometimes even failing faster. But they all fail after some time, while I hoped that they would keep seeding permanently.

Screenshot at 2020-05-26 10-17-14
Test description at: https://github.com/Weedshaker/PeerWebSite#Tests

Is there a way, flag to get a log, because I think there is some error which stops nodejs execution.
PS: I am now trying to get some output with --verbose, gonna post my findings asap.

Thanks for the additions @Weedshaker.

I've been too busy to work on this, but I'm planning to make time soon to get this sorted. I'm following the updates and they're appreciated.

Until yesterday the test stood strong -> seeding. I can't really tell if the difference was the --verbose flag or that I ran an instant of transmission parallel (although transmission has no active upload stats received) or that I kept the above link open on chromium on the raspberry-pi. Although, the former usually stops seeding after the browser becomes idle. Anyhow, yesterday I had to reboot my raspberry-pi and I only started the webtorrent hybrid cli for the three torrents described in my test. The terminal froze and seeding stopped after less than 12 hours.

I restarted the test today. Again with a browser open and transmission in the background. I will see if I can reproduce it to stay seeding for long.

@Weedshaker Any update on the second test with --verbose? Any logs that hint at the problem?

@sebastienvercammen StIll Up and running.

Has this issue been resolved?

I am going to run a test from today and let you know.

The page and for that reason the torrent, which I am still seeding according to the WebTorrent Desktop UI on my computer, is now not reachable anymore. It is also not reachable from https://instant.io/#682fc456c6e9d1cb848efe6178fe5f0c26c210fc

Check box seeding had no effect. But once I did restart the WebTorrent Desktop, it would be seeding and available again. I had the same issue with hybrid, since this is under the hood of WebTorrent Desktop.

It just went offline again and these were the logs which happened between seeding and failing:

webtorrent: got wt-progress
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseEnter []
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseLeave []
22C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-progress
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\controllers\torrent-controller.js:41 warning for torrent 1: connection error to wss://tracker.btorrent.xyz
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-warning
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\controllers\torrent-controller.js:41 warning for torrent 2: connection error to wss://tracker.btorrent.xyz
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-warning
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\controllers\torrent-controller.js:41 warning for torrent 1: connection error to wss://tracker.btorrent.xyz
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-warning
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\controllers\torrent-controller.js:41 warning for torrent 2: connection error to wss://tracker.btorrent.xyz
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-warning
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseEnter []
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseLeave []
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-progress
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseEnter []
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseLeave []
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\controllers\torrent-controller.js:41 warning for torrent 1: connection error to wss://tracker.btorrent.xyz
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-warning

Thanks for sharing @Weedshaker. Two possibilities come to mind:

  1. Connection to the tracker is lost and webtorrent doesn't re-establish it for some reason, or

  2. All the trackers for the given torrent have gone offline for some reason (maybe wss://tracker.btorrent.xyz was the last one online) and for that reason no peer introductions can happen.

In the first case, that would be a bug in webtorrent. In the second, it wouldn't.