webtorrent / webtorrent-desktop

❤️ Streaming torrent app for Mac, Windows, and Linux
https://webtorrent.io/desktop
MIT License
9.67k stars 1k forks source link

wss:// tracker connection error #2168

Closed henrixd7 closed 2 years ago

henrixd7 commented 2 years ago

Package: webtorrent-desktop (amd64) Version: 0.24.0 OS: Ubuntu 21.10

When I add a magnet link, I get connection error to console.

dispatch: backToList []
/usr/lib/webtorrent-desktop/resources/app.asar/build/renderer/main.js:363 webtorrent: sent wt-start-torrenting
/usr/lib/webtorrent-desktop/resources/app.asar/build/renderer/controllers/torrent-controller.js:15 got infohash for new torrent 4
/usr/lib/webtorrent-desktop/resources/app.asar/build/renderer/main.js:363 webtorrent: got wt-parsed
/usr/lib/webtorrent-desktop/resources/app.asar/build/renderer/controllers/torrent-controller.js:41 warning for torrent 4: connection error to wss://my.server.tracker.tld
/usr/lib/webtorrent-desktop/resources/app.asar/build/renderer/main.js:363 webtorrent: got wt-warning
/usr/lib/webtorrent-desktop/resources/app.asar/build/renderer/controllers/torrent-controller.js:41 warning for torrent 4: connection error to wss://tracker.btorrent.xyz
/usr/lib/webtorrent-desktop/resources/app.asar/build/renderer/main.js:363 webtorrent: got wt-warning
/usr/lib/webtorrent-desktop/resources/app.asar/build/renderer/main.js:363 webtorrent: got wt-progress

No connection seems to happen. I added debug option to bittorrent-tracker on server side and I don't see it making any requests. When I share the torrent with Instant.io it will download immidiately to Instant.io browser window and after that webtorrent-desktop is able to download it quickly too. I have also tested this using openwebtorrent-tracker on my server and results are same.

Instant.io webtorrent-client makes websocket connection instantly as expected:

 $ DEBUG=* node server.js
bittorrent-tracker:server new server {"udp":false,"http":true,"ws":true,"stats":true,"trustProxy":true} +0ms
bittorrent-tracker:server listen (port: 9090 hostname: 'localhost') +2ms
bittorrent-tracker:server listening +8ms
HTTP tracker: http://127.0.0.1:9090/announce
WebSocket tracker: ws://127.0.0.1:9090
bittorrent-tracker:server sent response {"complete":1,"incomplete":0,"action":"announce","interval":120,"info_hash":"\u0015_>-eh¤\r\\\u0001ýmoYݹÜ"} to 2d5757303031382d36454e517459766659486371 +21s
bittorrent-tracker:server got 5 offers from 2d5757303031382d36454e517459766659486371 +0ms
bittorrent-tracker:server got 0 peers from swarm 8f155f3e2d7f6568a40d925c01fd6d6f59ddb9dc +0ms
start 2d5757303031382d36454e517459766659486371

After this webtorrent-desktop is able to download the torrent. Is it maybe because of different (non anounced) tracker it's using? This is why I tested it with openwebtorrent-tracker too with same result. Because there doesn't seem to be any connection attempt initally, I thought it might be a bug in webtorrent-desktop.

I'm using these options when seeding the torrent:

opts = {
  private: true,
  announceList: [
    [ "wss://my.tracker.server.tld/tracker" ]
  ]
}

I expected download to happen, but got connection error instead. I don't think there was connection attempt.

github-actions[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?