Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeError('Port should be > 0 and < 65536') #572

Closed
luisnomad opened this issue Jan 13, 2016 · 8 comments
Closed

RangeError('Port should be > 0 and < 65536') #572

luisnomad opened this issue Jan 13, 2016 · 8 comments
Labels

Comments

@luisnomad
Copy link

@luisnomad luisnomad commented Jan 13, 2016

It happens after 10 minutes of streaming to --vlc:

UNEXPECTED ERROR: If this is a bug in WebTorrent, report it!
OPEN AN ISSUE: https://github.com/feross/webtorrent/issues

DEBUG INFO: webtorrent 0.72.1, node v4.0.0, darwin x64, exit 1
dgram.js:278
throw new RangeError('Port should be > 0 and < 65536');
^

RangeError: Port should be > 0 and < 65536
at Socket.send (dgram.js:278:11)
at RPC.send (/usr/local/lib/node_modules/webtorrent/node_modules/bittorrent-dht/node_modules/k-rpc/node_modules/k-rpc-socket/index.js:129:15)
at RPC.query (/usr/local/lib/node_modules/webtorrent/node_modules/bittorrent-dht/node_modules/k-rpc/node_modules/k-rpc-socket/index.js:173:8)
at RPC._query (/usr/local/lib/node_modules/webtorrent/node_modules/bittorrent-dht/node_modules/k-rpc/index.js:146:17)
at RPC.query (/usr/local/lib/node_modules/webtorrent/node_modules/bittorrent-dht/node_modules/k-rpc/index.js:113:8)
at DHT._sendPing (/usr/local/lib/node_modules/webtorrent/node_modules/bittorrent-dht/client.js:94:13)
at DHT.addNode (/usr/local/lib/node_modules/webtorrent/node_modules/bittorrent-dht/client.js:84:8)
at Wire. (/usr/local/lib/node_modules/webtorrent/lib/torrent.js:583:23)
at emitOne (events.js:77:13)
at Wire.emit (events.js:169:7)

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 13, 2016

Thanks, @mafintosh says he'll fix it.

@mafintosh

This comment has been minimized.

Copy link

@mafintosh mafintosh commented Jan 14, 2016

@feross this comes from addNode according to the stack. Is webtorrent manually adding nodes somewhere?

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 14, 2016

Ah, good catch. It's coming from the PORT message which lets peers tell each other about their DHT ports. See: https://github.com/feross/webtorrent/blob/master/lib/torrent.js#L576-L584

The old DHT used to disregard addNode calls with invalid ports. That's fine, I can fix it in webtorrent with a guard.

@mafintosh

This comment has been minimized.

Copy link

@mafintosh mafintosh commented Jan 14, 2016

nice. yea i think its best to solve it in webtorrent then.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 14, 2016

Fixed in 0.72.2.

@feross feross closed this in 1b021d8 Jan 14, 2016
@luisnomad

This comment has been minimized.

Copy link
Author

@luisnomad luisnomad commented Jan 18, 2016

@feross hey! Thanks for the fix! Has it made it to the master branch? I have reinstalled webtorrent and I still have the same issue. For now I have overwritten the changed file myself and it works, but people installing the script will have the same problem.

Cheers!

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 19, 2016

This is published on npm as v0.72.2 now. Sorry for the delay, folks!

@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.