VultureZZ / nzbFamilyHub

19 stars 0 forks source link

adding CP errors out with api-cal #3

Open henkjanvries opened 9 years ago

henkjanvries commented 9 years ago

after setting up the config and running the start command, it errors out directly after going to the url.

undefined:0

^ SyntaxError: Unexpected end of input at Object.parse (native) at IncomingMessage. (/Applications/nzbFamilyHub/lib/apiCP.js:31:30) at IncomingMessage.emit (events.js:117:20) at _stream_readable.js:943:16 at process._tickCallback (node.js:419:13)

npm ERR! Darwin 13.4.0 npm ERR! argv "node" "/usr/local/bin/npm" "start" npm ERR! node v0.10.32 npm ERR! npm v2.7.1 npm ERR! code ELIFECYCLE npm ERR! application-name@0.1.0 start: node app npm ERR! Exit status 8 npm ERR! npm ERR! Failed at the application-name@0.1.0 start script 'node app'. npm ERR! This is most likely a problem with the application-name package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node app npm ERR! You can get their info via: npm ERR! npm owner ls application-name npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Applications/nzbFamilyHub/npm-debug.log

it seems to me that it hangs on the CP api, but that works and has no issues, imho. if i set CP to false, it runs as it supposes to run. without CP of course.

VultureZZ commented 9 years ago

Can you add the following line to lib/apiCP.js line 31 just prior to "callback( null, JSON.parse( data ) );"

"console.log ("data:", data);"

Then save it and run "node app.js" instead of "npm start". You should get an output that says something "data: ?", paste that string in this issue and I should be able to determine what is up.

Also, are you using HTTP or HTTPS?