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
TypeError: Cannot read property 'coordinator' of null #77
Comments
Sounds like it doesn't find your players. Could you please try and specify the following in settings.json (create it if it doesn't exists): { disableIpDiscovery: true } |
Closing until feedback arrives. |
While I don't see the verbose dump above, when I start with npm start or node server.js (so I can use settings.json) I do receive the error that my system has not yet been discovered. I tried the disableIpDiscovery. No system has yet been discovered. Please see #77 if it doesn't resolve itself in a few seconds. My Sonos setup is is a cabled Bridge (old school). So the bridge acquired 192.168.1.2, then I have two speakers coming in through wireless: 192.168.1.9 (Master Bedroom) and 192.168.1.12 (TV Room). My Server is wired-only if that makes any difference, 192.168.1.200. Does the bridge have to be in discovery mode or anything like that? |
@pmonday No, there is no special setup required. The bridge in itself would not require an IP anyway, since it forwards traffic transparently. My first check would be if your centos installation comes with any form of default ip-tables rules, or some configuration that blocks multicast traffic. |
I too get the error: No system has yet been discovered. Please see #77 if it doesn't resolve itself in a few seconds. I'm running the docker image on a Synology NAS. Synology has the option of using a Gui/Wizard to launch the images/create the containers, or to specify the Docker Run parameters. Unfortunately, the --net --restart options do not seem available (according to the IMAGE section here --net=host --restart ). However, I also tried to start the Docker from SSH using the docker run --net=host --restart=always -d <your container/image name> command and I didn't see a different behavior. Running the current code (from git) on my Windows laptop, I am able to control my Sonos (although there are issues with TTS). When I open a terminal on my Docker image (using Synology's Docker platform) and try something like curl http://localhost:5005/zones I get the same error described in the previous comment: "No system has yet been discovered. Please see #77 if it doesn't resolve itself in a few seconds." This is my first experience with Docker, so my learning curve it steep, but if I can share logs or anything here, I'll be happy to do it. How can I debug this further? Is there a way to confirm is it is a problem of multicast packets not reaching my docker? Thanks. I tried to |
@dolphinkite Since this is related to Docker, could you please file a new issue and reference @riemers in it? I haven't tested the Docker image myself, but he might have some answers. |
Not sure for whom this will be useful. |
@eg33 What are the steps to make network "discoverable"? I'm alson on Win 10PC and seeing this issue. I have added { disableIpDiscovery: true } to settings.json to no avail. Thanks for your help. Actually. Got it. Sorry for the trouble! |
For future reference, please test the beta branch if you have connectivity issues. It has been drastically improved when it comes to discovery. |
I am actively having this issue with release and beta channel. I do not have the issue on my mac at home though, only my work laptop. I have full admin rights so nothing restricting usage. |
@aaronmfisherSYP With your work laptop, at home, or at work? Is it intermittent or permanent? Is it Windows or OS X? Are you using some sort of VPN? |
@jishi work laptop at work, same issue occurs with it at home. No issues on home Mac at home. Permanent error at work on machine, which is running OS X. No VPN usage. Network allows cross IP traffic and nothing on the network is preventing it. |
Solved. |
@aaronmfisherSYP Please share the solution if you think it can benefit others, since I refer people to this issue. |
@aaronmfisherSYP Can you share your solution? Having issue with RPI setup. Everything seems to work in my MAC. |
@tundal How is it connected to your network? What Linux dist are you running? |
@jishi: My failure did not have exact signature as this issue but looked similar. Solution provided in #39 addressed my issue where node wasn't starting at all for me. @csteenwyk's solution allows node to start. I will look through issues to make sure my comments are correctly added to right issue. |
@tundal I suggest you file a new issue with the output of your startup. You can also start it with |
So - turns out I don't get this error over ethernet, only wifi. On Wed, Sep 14, 2016 at 8:55 AM, Jimmy Shimizu notifications@github.com
|
@Dratsum Then it's probably the driver at fault, unless you have a weird WiFi setup at home. Some routers may block certain traffic between WiFi and wired LAN. |
I got the same error on my raspberry pi until this morning everything worked fine. I restarted the node-server and after that a http-request just prints this:
I made no changes at all on the raspberry pi. Any idea? EDITReboot fixed the issue. Sorry! :) |
I get the same error when I go to http://192.168.0.201:5151/zones:
I am using port 5151 because I am using node.js in a Docker which port 5006 to external ip 5151. I am using the lasted version. I think oprt 5005 is already used in my network. When I go to the url http://192.168.0.201:5151/ I get the Sonos API screen. I also tried adding this on the settings.json with the same results:
Any idea what I could try to make it work? This is what gets displayed when I do npm start:
Many thanks, ps - Crazy thought. I have the Sonos as devices in my SmartThings hub. Could this be the culprit? |
@hernandito You ca not run this with docker without using bridge networking (thus, no NAT port binding allowed, |
Thank you Jishi... I hardly can understand your explanation, but luckily I run unRAID which makes Dockers very easy. I switched from "bridge" mode to "host" mode and I get the following in /zones (copied only a part):
I assume it is all good now? I am off to try to create an Alexa Skill for this. Thank you very much for your help and for creating this! H. |
Thanks, this worked for me also using unraid! |
Thanks @jishi . If anyone else is trying to run node inside a VM, make sure your network settings are configured as "bridged" instead of the default NAT. |
Using the latest version of node-sonos-http-api, recently it cannot find my sonos. Perhaps a recent sonos update? I wondered if anyone else is having a similar issue? I"ve restarted all sonoses, wireless router, server, but still no good. Haven't changed anything else recently that I can think of. Factory reset sonos and re-setup. No help. |
Hi There, ERROR: cmd: Any pointers will be great, end game is that I might just have to host it on a basic box somewhere on the network. |
@throweggs port-forwarding won't be enough, and if you use NAT, it won't work because the discovery protocol relies on the source IP to know where to connect back to. Sonos (or rather, UPnP) uses bi-directional sockets, which means they need to be addressable and connectable both ways. It also requires either broadcast or multicast traffic to be forwarded, which is rarely the case. But I would be surprised if Hyper-V doesn't support a bridge network, where the virtual interface will get an IP from your local DHCP like it's own dedicated machine? See this article (first section, regarding standard bridged networking) https://smudj.wordpress.com/2015/05/14/windows-10-hyper-v-setting-up-networking-shared-and-bridged-options/ Please open up a new issue or enter the chat as well, because posting comments here notifies anyone subscribing to this topic which is a bit annoying for them :) |
Having issues as well, then all the sudden it works (seemingly) but after a reboot it doesn't. "M-SEARCH" is being sent, used "disableIpDiscovery: true" and without, both with no changes. Sonos controller works fine, also assigned sonos fixed IP's to prevent other things. Can I set these in the settings.json in some way? |
It happened to me too, running API on Pi. Restart of Pi and Sonos did nothing. Restarting the router (Airport Express) helped. |
I'm hitting this as well. It's as if something has changed and node-sonos-http-api can't seem to recover. Doing the CTRL+C and restarting this server solves the issue momentarily. |
On CentOS 7, this error was caused by the firewall. Running these commands fixed my issue.
|
I'm seeing this issue also. But not all the time. So it's unclear to me what options I have to work-around the problem.
What are folks doing for this to get this to work reliably? |
I know how to recreate the problem. It's when I join my work's VPN:
|
Run it with NODE_LOG_LEVEL=debug and I think it prints out the discovery
flow. I know multi-adapter discovery (like running VirtualBox or similar)
was problematic, but I made corrections for those.
…On Tue, 29 Sep 2020, 23:50 curious-attempt-bunny, ***@***.***> wrote:
I know how to recreate the problem. It's when I join my work's VPN:
$ sudo ifconfig > ifconfig.novpn.txt
# I connect to the VPN, and then:
$ sudo ifconfig > ifconfig.vpn.txt
$ diff ifconfig.novpn.txt ifconfig.vpn.txt
93a94,98
> utun2: flags=80d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1390
> inet REDACTED --> REDACTED netmask 0xffffff00
> inet6 REDACTED%utun2 prefixlen 64 scopeid 0x11
> inet6 fREDACTED%utun2 prefixlen 128 scopeid 0x11
> nd6 options=201<PERFORMNUD,DAD>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYE2I55FBO5P23LYCURNC3SIJJEHANCNFSM4BTMLE3A>
.
|
One solution I found when running this on my Pi is to just I've hit this error when I reboot my routers, and rebooting my Pi has been the easiest solution. I'm sure you could stop and restart this Node.JS service instead if you didn't want to do a full reboot. For me logging into hombridge and doing a sudo reboot is my fastest path to getting up and running. |
Applying the firewall configuration by @mrdvt92 on my Debian system fixed the issue for me 👍 |
My problem was that the Windows Firewall setting was set to Public, not Private. After I changed the setting to Private, the detection worked. |
Above, you instruct: Could you detail how to create settings.json? |
Just create an empty file with the name settings.json (mind the file
ending) with the content specified.
…On Mon, 13 Sep 2021, 19:14 DJT1423, ***@***.***> wrote:
Above, you instruct:
"Sounds like it doesn't find your players. Could you please try and
specify the following in settings.json (create it if it doesn't exists):
{ disableIpDiscovery: true }
Could you detail how to create settings.json?
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYE2I26MUQZWM2U6H2UKCDUBYWPTANCNFSM4BTMLE3A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Perfect, thx. That did the trick |
Really weird - this script was working last week - then over the weekend it died... When I restart it I get:
no settings file found, will only use default settings
http server listening on port 5005
no preset file, ignoring...
Then when I hit port 500f with next, it doesn't work and I get this error:
/Users/sonos/Documents/node_modules/node-sonos-http-api-master/lib/actions/nextprevious.js:2
player.coordinator.nextTrack();
^
TypeError: Cannot read property 'coordinator' of null
at Object.next (/Users/sonos/Documents/node_modules/node-sonos-http-api-master/lib/actions/nextprevious.js:2:9)
at handleAction (/Users/sonos/Documents/node_modules/node-sonos-http-api-master/lib/sonos-http-api.js:65:28)
at HttpAPI.requestHandler (/Users/sonos/Documents/node_modules/node-sonos-http-api-master/lib/sonos-http-api.js:47:5)
at /Users/sonos/Documents/node_modules/node-sonos-http-api-master/server.js:51:13
at Server.finish (/Users/sonos/Documents/node_modules/node-sonos-http-api-master/node_modules/node-static/lib/node-static.js:111:13)
at finish (/Users/sonos/Documents/node_modules/node-sonos-http-api-master/node_modules/node-static/lib/node-static.js:170:14)
at /Users/sonos/Documents/node_modules/node-sonos-http-api-master/node_modules/node-static/lib/node-static.js:144:17
at FSReqWrap.oncomplete (fs.js:82:15)
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! sonos-http-api@0.16.0 start:
node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sonos-http-api@0.16.0 start script 'node server.js'.
npm ERR! This is most likely a problem with the sonos-http-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls sonos-http-api
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/sonos/Documents/node_modules/node-sonos-http-api-master/npm-debug.log
The text was updated successfully, but these errors were encountered: