mafintosh / peerflix

Streaming torrent client for node.js
MIT License
6.17k stars 674 forks source link

Getting BAD_PORT_RANGE on node v17.0.1 #385

Open Just-Moh-it opened 2 years ago

Just-Moh-it commented 2 years ago

I'm running the command:

peerflix "magner_uri..." -a --vlc

and getting the error:

node:internal/validators:216
    throw new ERR_SOCKET_BAD_PORT(name, port, allowZero);
    ^

RangeError [ERR_SOCKET_BAD_PORT]: Port should be > 0 and < 65536. Received 69692710.
    at new NodeError (node:internal/errors:371:5)
    at validatePort (node:internal/validators:216:11)
    at Socket.send (node:dgram:629:12)
    at send (/opt/homebrew/lib/node_modules/peerflix/node_modules/bittorrent-tracker/lib/client/udp-tracker.js:186:12)
    at UDPTracker._request (/opt/homebrew/lib/node_modules/peerflix/node_modules/bittorrent-tracker/lib/client/udp-tracker.js:92:3)
    at UDPTracker.announce (/opt/homebrew/lib/node_modules/peerflix/node_modules/bittorrent-tracker/lib/client/udp-tracker.js:38:8)
    at /opt/homebrew/lib/node_modules/peerflix/node_modules/bittorrent-tracker/client.js:230:13
    at Array.forEach (<anonymous>)
    at Client._announce (/opt/homebrew/lib/node_modules/peerflix/node_modules/bittorrent-tracker/client.js:228:18)
    at Client.start (/opt/homebrew/lib/node_modules/peerflix/node_modules/bittorrent-tracker/client.js:166:8) {
  code: 'ERR_SOCKET_BAD_PORT'
}

Node.js v17.0.1

Environment:

Hope this helps, I'm unable to debug the problem