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

[webtorrent-cli] Uncaught exception in nodebmc from JSON.parse() #805

Closed
thanosme opened this issue May 17, 2016 · 4 comments
Closed

[webtorrent-cli] Uncaught exception in nodebmc from JSON.parse() #805

thanosme opened this issue May 17, 2016 · 4 comments
Labels
bug

Comments

@thanosme
Copy link

@thanosme thanosme commented May 17, 2016

Hello I' ve tried downloading a torrent file using the xbmc module and I got this error. I don' t understand the error my self nor did I find another issue like this. If this is a duplicate a will close it.
USER, HOSTNAME and IP are obviously masked.

{ addresses: [ 'IP' ],
query: [ '_xbmc-jsonrpc-h._tcp.local' ],
type:
[ { name: 'xbmc-jsonrpc-h',
protocol: 'tcp',
subtypes: [],
description: undefined } ],
txt: [ '' ],
port: 8080,
fullname: 'HOSTNAME._xbmc-jsonrpc-h._tcp.local',
host: 'HOSTNAME.local',
interfaceIndex: 0,
networkInterface: 'enp2s0' }

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

DEBUG INFO: webtorrent-cli 1.2.0, webtorrent 0.93.3, node v5.7.0, linux x64, exit 1
undefined:1

SyntaxError: Unexpected end of input
at Object.parse (native)
at IncomingMessage. (/home/USER/.nvm/v5.7.0/lib/node_modules/webtorrent-cli/node_modules/nodebmc/device.js:35:31)
at emitNone (events.js:85:20)
at IncomingMessage.emit (events.js:179:7)
at endReadableNT (_stream_readable.js:913:12)
at _combinedTickCallback (node.js:377:13)
at process._tickCallback (node.js:401:11)

  • WebTorrent version: 1.2.0 (webtorrent 0.93.3)
  • Node.js version: v5.7.0
  • Browser name/version (if using WebTorrent in the browser):
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented May 17, 2016

Thanks for the report! This is actually a bug in nodebmc which webtorrent-cli depends on.

They have a call to JSON.parse() which they need to wrap in a try-catch block to prevent uncaught exceptions like this one. I sent them a PR: gtuk/nodebmc#1

@feross feross changed the title UNEXPECTED ERROR [webtorrent-cli] Uncaught exception in nodebmc from JSON.parse() May 17, 2016
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented May 29, 2016

PR was merged, now waiting for it get published to npm.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented May 29, 2016

The fixed version is on npm now. This should be fixed.

@feross feross closed this May 29, 2016
@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
2 participants
You can’t perform that action at this time.