Closed andyfitter closed 5 years ago
Which version of node.js are you running?
Wow. Thanks for the quick reply. All these web technologies are a bit obscure to me coming from an iPhone iOS native background.
I think I’m running 10.6? It’s running on a Raspberry Pi Stretch install. It’s a complete clean install as of this morning following the instructions given. Is this even correct that I have both these binaries and they’re different versions?
pi@utility:~/serverorig $ node --version v10.6.0
pi@utility:~/serverorig $ nodejs --version v8.11.1
I’m not even sure I know the difference between nodejs and node at this point as I just jumped in.
Thanks for your help.
On 18 Jul 2018, at 12:57, Jimmy Shimizu notifications@github.com wrote:
Which version of node.js are you running?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jishi/node-sonos-web-controller/issues/64#issuecomment-405905488, or mute the thread https://github.com/notifications/unsubscribe-auth/AArNQjQvdu3PX4hn7ULbWL5nPfI6WNfpks5uHyKOgaJpZM4VUc28.
nodejs
is the debian maintained packaging of node.js. Both of them should work with this, but I haven't ran this web-controller in a while. Looking at the code, I don't understand that error, but also the line reference seems wrong (I'm assuming you checked out the files to /home/pi/serverorig
?)
I would need to start it up at home to check it out.
Thanks for looking. I did check it out into that directory as I already had a different forked version in the original directory. Sadly the fork has the same problem too.
On 18 Jul 2018, at 13:15, Jimmy Shimizu notifications@github.com wrote:
nodejs is the debian maintained packaging of node.js. Both of them should work with this, but I haven't ran this web-controller in a while. Looking at the code, I don't get that error, but also the line reference seems wrong (I'm assuming you checked out the files to /home/pi/serverorig?)
I would need to start it up at home to check it out.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jishi/node-sonos-web-controller/issues/64#issuecomment-405910313, or mute the thread https://github.com/notifications/unsubscribe-auth/AArNQh6Y-L_Eu0DJaBmBeZ8AvhNhEpbuks5uHybbgaJpZM4VUc28.
Hi Jimmy,
I rebuilt a fresh Pi install and dropped back to an older version of Node - Does 8.11.3 seem reasonable?
All runs fine now. Thanks for all your help.
Andy.
On 18 Jul 2018, at 14:52, Andrew Fitter andy@fittersystems.com wrote:
Thanks for looking. I did check it out into that directory as I already had a different forked version in the original directory. Sadly the fork has the same problem too.
On 18 Jul 2018, at 13:15, Jimmy Shimizu <notifications@github.com mailto:notifications@github.com> wrote:
nodejs is the debian maintained packaging of node.js. Both of them should work with this, but I haven't ran this web-controller in a while. Looking at the code, I don't get that error, but also the line reference seems wrong (I'm assuming you checked out the files to /home/pi/serverorig?)
I would need to start it up at home to check it out.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jishi/node-sonos-web-controller/issues/64#issuecomment-405910313, or mute the thread https://github.com/notifications/unsubscribe-auth/AArNQh6Y-L_Eu0DJaBmBeZ8AvhNhEpbuks5uHybbgaJpZM4VUc28.
I don't see why it wouldn't run in 10.x as well, but makes a good point to make sure it does, thanks for reporting it.
It seemed pretty conclusive. I installed 10.6 using instructions from from here:
http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/#install-node http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/#install-node
Ran the App and it gave me this.
pi@utility:~/sonos-web $ node server.js no settings file found, will only use default settings http server listening on port 8080 queue-changed Office queue-changed Bedroom queue-changed Lounge fetching album art from undefined fetching album art from undefined fetching album art from undefined fetching album art from undefined fetching album art from undefined fetching album art from undefined 200 fs.js:133 throw new ERR_INVALID_CALLBACK(); ^
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:133:9)
at Object.exists (fs.js:201:3)
at ClientRequest.
Installed NVM and downgraded 8.11.3 (lts/carbon?)
Updated all the packages, and ran again
pi@utility:~/sonos-web $ node server.js no settings file found, will only use default settings http server listening on port 8080 queue-changed Office queue-changed Bedroom queue-changed Lounge fetching album art from undefined fetching album art from undefined fetching album art from undefined fetching album art from undefined fetching album art from undefined fetching album art from undefined 404 404 'linking' '/home/pi/sonos-web/cache/86b9d7c3ff5e309dff2237b4b20348e9' 404 404 'linking' '/home/pi/sonos-web/cache/e4d53b0fe4b8a9a58b6b70fc04a22f19' serving /getaa?u=x-file-cifs%3a%2f%2fSynology%2fmusic%2fiTunes%2520New%2fiTunes%2520Media%2fMusic%2fCompilations%2fAt%2520The%2520Controls%2520%255bDisc%25201%255d%2f1-07%2520Michelle.m4a&v=71 serving /getaa?u=x-file-cifs%3a%2f%2fSynology%2fmusic%2fiTunes%2520New%2fiTunes%2520Media%2fMusic%2fCompilations%2fAt%2520The%2520Controls%2520%255bDisc%25201%255d%2f1-06%2520El%2520Encuentro.m4a&v=71 404
All fine.
One last quick question - Im looking at the mobile ’skin’. It seems to default to one on my Sonos Zones. Is there any way currently to switch which zone it controls?
On 18 Jul 2018, at 15:42, Jimmy Shimizu notifications@github.com wrote:
I don't see why it wouldn't run in 10.x as well, but makes a good point to make sure it does, thanks for reporting it.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/jishi/node-sonos-web-controller/issues/64#issuecomment-405955920, or mute the thread https://github.com/notifications/unsubscribe-auth/AArNQiBC13wwmXXZG11fbwZk2innXIyuks5uH0lxgaJpZM4VUc28.
Any ideas? Maybe the API signature has changed for the .get method in more recent versions of Node?
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function at maybeCallback (fs.js:133:9) at Object.exists (fs.js:201:3) at ClientRequest.http.get (/home/pi/serverorig/server.js:58:19) at Object.onceWrapper (events.js:273:13) at ClientRequest.emit (events.js:182:13) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:546:21) at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17) at Socket.socketOnData (_http_client.js:432:20) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:283:12) at readableAddChunk (_stream_readable.js:264:11) at Socket.Readable.push (_stream_readable.js:219:10) at TCP.onread (net.js:638:20)
Thanks.