airsonos icon indicating copy to clipboard operation
airsonos copied to clipboard

Error when launching airsonos

Open bdsousa opened this issue 8 years ago • 63 comments

Hi,

i'm getting this message after installing airsonos on my mac. (i tried many ways and i really don't know if it's correctly installed)

Can you help ?

$ airsonos Searching for Sonos devices on network...

/usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise.js:677 throw e; ^ Error: Internal Server Error at maybeWrapAsError (/usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/util.js:70:12) at /usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise_resolver.js:41:50 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:112:20 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:106:22 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:251:17 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:248:21 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:572:34 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/events/volumeListener.js:24:14 at Listener. (/usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/events/listener.js:123:9) at Request.self.callback (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/request/request.js:129:22)

bdsousa avatar Sep 14 '15 22:09 bdsousa

mee too

mgregor avatar Sep 19 '15 03:09 mgregor

Exactly the same as @bdsousa on OS X 10.11 open beta. Tried with node v0.12 and v4.1.1.

My SONOS system is on build/version 29699020 (6.0).

scherii avatar Sep 29 '15 19:09 scherii

I also have the same issue on Ubuntu 14.04

dsarel10 avatar Nov 05 '15 02:11 dsarel10

I also get this error on OS X 10.11.1 with node v0.12.7 after installing with:

sudo npm install airsonos -g

dsarel10 avatar Nov 06 '15 01:11 dsarel10

I am also getting this error.

mjm8975 avatar Nov 06 '15 14:11 mjm8975

I also get the error

benstegink avatar Nov 10 '15 17:11 benstegink

Having the same issues using git checkout @50d70ce1213567005b106f74c1a33203ab0bdbd9 on osx 10.10 with node v4.2.1

optixx avatar Nov 15 '15 12:11 optixx

same

Christophers-MacBook-Pro:~ chris$ airsonos
Searching for Sonos devices on network...


/usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise.js:677
            throw e;
                  ^
Error: Internal Server Error
    at maybeWrapAsError (/usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/util.js:70:12)
    at /usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise_resolver.js:41:50
    at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:112:20
    at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15)
    at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16
    at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:106:22
    at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15)
    at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16
    at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:251:17
    at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15)
    at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16
    at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:248:21
    at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:572:34
    at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/events/volumeListener.js:24:14
    at Listener.<anonymous> (/usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/events/listener.js:123:9)
    at Request.self.callback (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/request/request.js:129:22)
Christophers-MacBook-Pro:~ chris$ node -v
v0.12.0
Christophers-MacBook-Pro:~ chris$ npm -v
2.5.1
Christophers-MacBook-Pro:~ chris$ airsonos --version
0.2.4
Christophers-MacBook-Pro:~ chris$ uname -a
Darwin Christophers-MacBook-Pro.local 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64

ChristopherJoonMiller avatar Nov 25 '15 00:11 ChristopherJoonMiller

Me too! :(

thomascjohnson avatar Nov 27 '15 14:11 thomascjohnson

Me too. same issue. It was working fine until I upgraded Sonos to the latest firmware a few days ago. Not sure if this is related, but this is my impression of causality here.

B1tMaster avatar Dec 02 '15 09:12 B1tMaster

Yes, I can confirm. My laptop was not updated with new airsonos install for a while and it was also working, but now that fails also. So it is should be related to a firmware upgrade of Sonos.

B1tMaster avatar Dec 02 '15 09:12 B1tMaster

Just want to give an update to my situation. At least in my case, it seems like the Sonos bridge was to blame.

I was able to finally get it to work by removing my bridge and hard wiring one of my Sonos speakers directly through ethernet. After pulling out the bridge, Airsonos started working flawlessly.

I started this test by unplugging every Sonos speaker (and the bridge) and then ran Airsonos. I obviously didn't find any speakers, but I also didn't get the error. I then plugged in ONLY the bridge, ran Airsonos again and immediately got the error.

I unplugged the bridge and hard wired one of my Play:1's. Worked fine. I then plugged in all the rest of my speakers and it's back to working like it used to. Not sure why the bridge is causing it to throw the error, but that's what seems to be happening.

I'm currently running it on Ubuntu 14.04 with Node 0.12.7 and Sonos version 6.0. Hope this helps some of the rest of you.

dsarel10 avatar Dec 03 '15 03:12 dsarel10

I don't have the bridge, but have the error. So bridge maybe involved, but not the only reason. all my speakers are directly hardwired into the ethernet or wi-fi

B1tMaster avatar Dec 03 '15 03:12 B1tMaster

Hmm, so maybe not the bridge per se, but something about the way they're connected? Sorry I don't have a better suggestion.

dsarel10 avatar Dec 03 '15 03:12 dsarel10

I suspect it is the latest firmware upgrade from Sonos. Are your speakers up to the latest firmware? I think the latest firmware update had to do with support for more internet radio stations. Which is exactly HOW airsonos works. They added support for more radio stations formats and probably broke the hack airsonos was using.

B1tMaster avatar Dec 03 '15 04:12 B1tMaster

Yes, I believe they are running the latest firmware. My speakers are running "Version: 6.0 (build 31322220)".

I've also encountered another person who says they're running version 6.0, who confirmed that AirSonos was working for them.

All I can say is that unplugging the bridge immediately fixed the problem for me. So something about the way it was reporting back to AirSonos (the formatting, the order...) was causing it to choke. It may be related to something that changed in version 6.0.

dsarel10 avatar Dec 03 '15 04:12 dsarel10

Latest firmware is 6.0.1 . Maybe your bridge is on the latest firmware while the speakers are not. Anyway, on Dec 15, we will have Sonos Beta that supports Apple Music. This may mean that this project may never get updated again and official support is coming soon.

B1tMaster avatar Dec 03 '15 04:12 B1tMaster

I just updated all the speakers to Version: 6.1 (build 31823140) right now. Still working for me. Didn't plug the bridge back in though.

What makes you think official support may be coming?

dsarel10 avatar Dec 03 '15 05:12 dsarel10

http://blog.sonos.com/news/sonos-welcomes-apple-music/

B1tMaster avatar Dec 03 '15 06:12 B1tMaster

That's just Apple Music thought, that doesn't accomplish the same thing as airsonos does which is to stream the audio from your computer to the speaker via AirPlay....I don't see the news about Apple Music being anything that removes the need for something like airsonos.

FYI...I'm still getting errors as well, haven't tried unplugging my bridge yet but may give it a shot in the next few days when I have some time to play with it.

benstegink avatar Dec 03 '15 13:12 benstegink

ben, I was kind of the same opinion at first, just wanting airplay. But after having done some research it seems that AirPlay is really sucky and outdated technology that badly needs revamp. Sonos approach is very solid and their protocol is much more sophisticated . In addition, Airplay require your computer to be on and stream the data from computer to a speaker. Sonos play 5 will instead be playing music directly from AppleMusic server. Once you start the play, you will be able to walk away, turn off your iPhone or iMac and speaker will continue playing. you can leave the house and stop/start speaker and it will re-connect to AppleMusic with your credentials and play. So no middleman in between the speaker and the streaming service. Can you see the advantage. ? So, if they do not make it airplay, I am no longer as concerned as I was before.

B1tMaster avatar Dec 04 '15 09:12 B1tMaster

Here is an opinion on Airplay: http://9to5mac.com/2015/08/26/opinion-airplay-future/

B1tMaster avatar Dec 04 '15 09:12 B1tMaster

I agree that if all you want it for is Apple Music the Sonos approach is much better. I have speakers around the house already and use them with Amazon music. However, the advantage of airsonos is you can use it for ALL computer sounds. I'm interested in this project in order to be able to replace my computer speakers with Sonos speakers. So that ever computer sounds is play through the sonos speaker, not simply music :) That's why I don't see the Sonos approach as making this project obsolete as there are still people that want a true computer speaker replacement, not just to be able to play Apple Music.

benstegink avatar Dec 08 '15 00:12 benstegink

same problem here

paolodenti avatar Dec 09 '15 18:12 paolodenti

same for me. Sonos 6.1.1 (31824160) Bridge and Playbar still wired, all other devices are wireless.

fate2001 avatar Jan 08 '16 21:01 fate2001

same here..

landerss0n avatar Feb 05 '16 15:02 landerss0n

+1

craigtsmith avatar Feb 09 '16 14:02 craigtsmith

Also for me same problem, it seems that as soon as I added two players 1as surround system, airsonos give me the throw e error. Any one in the meantime found out a solution?

xuncia avatar Feb 11 '16 08:02 xuncia

no solution yet? i have the same problem

alin-simionoiuDE avatar Feb 17 '16 01:02 alin-simionoiuDE

Well, I used a workaround that works fine for me. First you need to check which one of your speakers are on WM:0 (sonosnetwork), if you cannot setup them in your network (to be in your network they must be WM:1) for example in my case when I enable the surrond between the soundbar and two players 1 the two players 1 go directly on WM:0 (sonos network). When you check which speakers are on sonos network you need to switch them off, wait 1 minute and then you can launch airsonos and you can switch on again the speakers that you just switch off, it works perfect. PS: (WM:0 WM:1 could be checked on the SONOS app through settings -> about this system)

xuncia avatar Feb 17 '16 09:02 xuncia

All of my devices are WM:0. How do you get them into WM:1? Do you mean I need to disconnect all my bridges to get them off my sonosnetwork?

jackrichins avatar Feb 20 '16 05:02 jackrichins

Disconnecting all my bridges worked. Guess this means airsonos doesn't work with sonosnetwork, only wifi?

jackrichins avatar Feb 20 '16 05:02 jackrichins

I also have the same error here after having bought a playbar recently. As soon as I have connected two play:1 devices for surround airsonos stopped working and return the crash report mentioned here. Any help in debugging this situation would be appreciated. Might this be a problem in airsonos or in one of the associated node modules it uses? I still have limited javascript experience but could help in debugging this situation if necessary.

jens-maus avatar Feb 20 '16 11:02 jens-maus

Wow, it works now for me! I just did ports self update, followed by upgrade outdated, followed by reinstall of air-sonos with NPM. To my surprise, it built fine and now I am streaming to all my sonos devices in the house again. I am not sure what changed between 2 days ago and today, but it is now seem to be working. !!

B1tMaster avatar Feb 23 '16 04:02 B1tMaster

An update:

It stopped working and I was stunned to see an error message I seen before. Then I started looking on what did I do to cause it to fail. And I think I found a potential issue. I invite all others to try and see if you replicate it and if you can fix it the same way I did again.

What I have done was I reinstalled airsonos and it worked perfectly. To break it again, what I have done was this: I started the Sonos Controller while running air-sonos. And it could NOT connect to speakers. I think airsonos negotiates a different port to connect to speakers. and Sonos Controller was displaying a different port.

So I killed airsonos. But Sonos controller still could not connect to my speakers.

So I restarted the speakers . that made Sonos controller work. I created a new queue on my Play5 with some songs. played for a while stopped the Sonos controller and tried to start the airsonos again. This is when it started throwing error you see below.

Then I removed all songs from the QUEUE on a speaker and restarted it. And that immediately FIXED the airsonos error and it is Working again.

My conclusion is that airsonos error below have something to do with an existing music queue on a speaker. Try to clean up the queues on Sonos speakers before starting airsonos and see if that fixes error below.

Error: myidko$ airsonos Searching for Sonos devices on network...

/opt/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise.js:677 throw e; ^ Error: Internal Server Error at maybeWrapAsError (/opt/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/util.js:70:12) at /opt/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise_resolver.js:41:50

B1tMaster avatar Feb 23 '16 06:02 B1tMaster

Removing all songs from the queue and exiting sonos controller app worked for me aswell

landerss0n avatar Feb 23 '16 07:02 landerss0n

I emptied my queue and exited the sonos controller app and still no luck for me. I don't know if it's also something to do with the boost as I have that on my network as well? Do those of you that have it working also have the Sonos Boost? Or just speakers?

benstegink avatar Feb 23 '16 11:02 benstegink

Im only using the speakers without bridge or boost

landerss0n avatar Feb 23 '16 11:02 landerss0n

I have 2 play1, 1 play5, sonos TV bar + subwoofer. All latest firmware . Also I just upgraded all my MacPorts And re-installed airsonos. Also, for good measure, after you empty the queue and exit sonos controller, restart all speakers. If that does not help, try without a boost to see if that makes a difference.

Works like a charm for me now.

B1tMaster avatar Feb 23 '16 14:02 B1tMaster

If anyone still have the problem I've figure out a little workaround that could help, at least I hope so. You can use this bash script:

#!/usr/bin/bash

# Switch off wifi controller for left Player 1
curl http://airsonos_play1:1400/wifictrl?wifi=off

# Switch off wifi controller for right Player 1
curl http://airsonos_play1(2):1400/wifictrl?wifi=off 


sleep 60

airsonos


# Switch on wifi controller for left Player 1
curl http://airsonos_play1:1400/wifictrl?wifi=on 

# Switch on wifi controller for right Player 1
curl http://airsonos_play1(2):1400/wifictrl?wifi=on 

In my case it's the surround system with the two play1 that creates the problem, so I switch off the wifi chip of the two play1 sonos speakers, I wait about 60 seconds (maybe I can wait less let's try) and then I launch airsonos and switch on the two player1.

xuncia avatar Mar 08 '16 13:03 xuncia

Found a solution to this. The problem has multiple roots, one being the bridge (IF YOU RENAMED IT) or your boost (again, IF YOU RENAMED IT). Second problem is airsonos is trying to hook up to speakers that are part of groups, without themselves being the coordinator of said group. The problem comes from the fact that the groupId is no longer the same for all speakers in the group. Go figure... Sonos!

I have modified line 86 in /path_to_node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js to the following:

if (device.coordinator === 'false' || device.name === 'ady624' || device.name === 'BRIDGE' || device.name === 'BOOST') return; // devices to ignore in search

I have added device.coordinator === 'false' to make sure airsonos leaves those grouped non-coordinating speakers alone. I also added device.name === 'ady624' which is the name of my bridge. The code looks for 'BRIDGE' which is the default name. You need to find the name of your own bridge and put it in there. The easy way is to add a console.log(device) right after line 104: async.forEach(logicalDevices, function(device, done) { and that should list the devices that airsonos is trying to initialize. Then use curl 'http://<ip goes here>:1400/xml/device_description.xml' on each of the devices until you find your bridge in the XML that is returned. Or perhaps you recognize the name you gave it in the list...

Good luck!

ady624 avatar Mar 22 '16 16:03 ady624

A more "professional" fix for module sonos referenced above, where the bridge and the boost are automatically ignored, no need to figure out their names.

I am confused as to which version this is, it says I got version 0.12.0 but the package.json says 0.7.0. Besides that, version 0.12.0 does not seem to have a logicalDevice.js file... Make a backup before doing anything.

It appears npm installs airsonos 0.2.6 along with private node modules, among which the sonos 0.7.0 module. Check to make sure you're using the sonos module version 0.7.0 before doing anything.

Here's the full logicalDevice.js file after the changes:

logicalDevice.zip

ady624 avatar Mar 22 '16 16:03 ady624

@ady624 Thank you for posting this fix. Worked great for me in solving this issue.

carlpoole avatar Apr 01 '16 04:04 carlpoole

Works great thanks @ady624. Nice find.

alansaul avatar Apr 02 '16 14:04 alansaul

@ady624 Great Fix. It works for me too. My method was working and then not working again.. Your fix did it. Thank you.

B1tMaster avatar Apr 02 '16 15:04 B1tMaster

I could also verify that the fix suggested by @ady624 works great. Here I have a PLAYBAR + two PLAY:1 and airsonos was showing this "maybeWrapAsError" Error as soon as I installed the PLAYBAR with the two PLAY:1 devices.

Here I have applied the following change:

--- /usr/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js  2016-04-05 10:37:13.000000000 +0200
+++ /usr/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js_org  2016-04-05 10:39:18.407701883 +0200
@@ -83,7 +83,7 @@
         // bucket devices by groupid
         devices.forEach(function(device) {

-          if (device.name === 'BRIDGE' || device.name === 'BOOST') return; // devices to ignore in search
+          if (device.coordinator === 'false' || device.name === 'BRIDGE' || device.name === 'BOOST') return; // devices to ignore in search

           if (!groups[device.group]) groups[device.group] = { members: [] };

So all I had to do is add device.coordinator === 'false' to the logicalDevice.js file. And then airsonos stopped crashing.

I also tried figuring out how and where to submit a pull request to get this fix integrated, but I actually didn't find the logicalDevice.js file in recent node-sonos sources on github (not in https://github.com/stephen/node-sonos nor in https://github.com/bencevans/node-sonos).

Perhaps @stephen can come up with an update that fixes this issue at the right places.

jens-maus avatar Apr 05 '16 09:04 jens-maus

Ok, I finally found the right branch where the fix to logicalDevice.js has to be applied. Let's hope @stephen will merge it as ASAP.

jens-maus avatar Apr 05 '16 09:04 jens-maus

Great! I confirm it's working also for me...one playbar and 2 play 1. Thanks!

xuncia avatar Apr 05 '16 13:04 xuncia

@jens-maus I want to stress out that people who purchase a bridge or a boost are given the opportunity to change their name during setup. They are initially called BRIDGE and BOOST respectively and the code is setup to avoid those names, but in order to ensure all will "pass" the error, the code needs to be able to identify the boost and the bridge by means other than just the name. The file I uploaded does just that, otherwise, you're fixing it halfway. Or rather, for only those who either don't have a bridge or a boost, or they didn't care to change their default names.

Glad I could help.

ady624 avatar Apr 05 '16 21:04 ady624

I wanted to just leave a quick comment. Just as the Bridge and/or Boost can cause the app to fail to start, also the (EOL'd) Sonos Dock being present in the Sonos Network will also cause the app to fail to launch, same error message as above. Once I unplugged my Dock, the app started fine, and has been playing music and running with no errors for over 24 hours ...

mjt5282 avatar May 04 '16 17:05 mjt5282

Hi, just trying to apply this fix as I have a Playbar with two Play1s set up and I'm getting the same maybeWrapAsError above. I've tried applying @ady624 file and I've also tried manually updated the logicalDevice.js file manually with @jens-maus changes but I'm still getting the same maybeWrapAsError. Any ideas? Here's the error:

Searching for Sonos devices on network...

/usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise.js:677 throw e; ^ Error: Internal Server Error at maybeWrapAsError (/usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/util.js:70:12) at /usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise_resolver.js:41:50 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:112:20 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:106:22 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:251:17 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:248:21 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:572:34 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/events/volumeListener.js:24:14 at Listener. (/usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/events/listener.js:123:9) at Request.self.callback (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/request/request.js:129:22)

seanbetts avatar May 25 '16 21:05 seanbetts

Unplug all sonos devices that cannot play music (bridge, dock etc) and wait 30 minutes. Would be great to have this work better in a more heterogeneous environment.

On May 25, 2016, at 5:32 PM, seanbetts [email protected] wrote:

Hi, just trying to apply this fix as I have a Playbar with two Play1s set up and I'm getting the same maybeWrapAsError above. I've tried applying @ady624 file and I've also tried manually updated the logicalDevice.js file manually with @jens-maus changes but I'm still getting the same maybeWrapAsError. Any ideas? Here's the error:

Searching for Sonos devices on network...

/usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise.js:677 throw e; ^ Error: Internal Server Error at maybeWrapAsError (/usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/util.js:70:12) at /usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise_resolver.js:41:50 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:112:20 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:106:22 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:251:17 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:248:21 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:572:34 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/events/volumeListener.js:24:14 at Listener. (/usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/events/listener.js:123:9) at Request.self.callback (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/request/request.js:129:22)

— You are receiving this because you commented. Reply to this email directly or view it on GitHub

mjt5282 avatar May 25 '16 22:05 mjt5282

Hi, thanks for your reply. I've tried that and still have the same problem. Any ideas? Thanks

seanbetts avatar May 26 '16 21:05 seanbetts

There's two comments with a working solution earlier in this thread: https://github.com/stephen/airsonos/issues/216#issuecomment-199882664, https://github.com/stephen/airsonos/issues/216#issuecomment-199904569

lucdetellis avatar Jun 01 '16 18:06 lucdetellis

Hi, thanks for your help. I've tried that solution a few times and still can't get it to work. I've tried manually changing the logicalDevice.js file as described as well as replacing the file with the one shared by @ady624. Any other ideas?

seanbetts avatar Jun 02 '16 16:06 seanbetts

@seanbetts There are some devices filtered out by that if statement. Among them, the bridge. I believe there are other devices there too, like the Dock. If you have any non-speaker devices, try and find out their names and try and add them to that if as to exclude them. See if that works?

ady624 avatar Jun 02 '16 21:06 ady624

Thank you @ady624. I don't have any other non-speaker devices other than the BRIDGE. I'm pretty sure this is still a problem with my 'Living Room' room set up as I have the Soundbar and two Play:1's as surround speakers

seanbetts avatar Jun 03 '16 19:06 seanbetts

Actually, I've just noticed that I'm getting a different error now - any ideas?:

Searching for Sonos devices on network...

/usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise.js:677 throw e; ^ Error: Method Not Allowed at maybeWrapAsError (/usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/util.js:70:12) at /usr/local/lib/node_modules/airsonos/node_modules/bluebird/js/main/promise_resolver.js:41:50 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:112:20 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js:106:22 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:251:17 at done (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:126:15) at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:32:16 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:248:21 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/async/lib/async.js:572:34 at /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/events/volumeListener.js:24:14 at Listener. (/usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/events/listener.js:123:9) at Request.self.callback (/usr/local/lib/node_modules/airsonos/node_modules/sonos/node_modules/request/request.js:129:22)

seanbetts avatar Jun 03 '16 19:06 seanbetts

@seanbetts I was getting the "Method Not Allowed" error before I switched to Node 0.12.14. After I switched I got the "Internal Server Error" which replacing logicalDevice.js fixed.

However, it seems like there's a problem with the Sonos Bridge. Replacing that file did get airsonos working, but I can only control speakers that aren't going through the Bridge. It's weird because the version of airsonos I was using this past summer worked fine.

lucdetellis avatar Jun 04 '16 02:06 lucdetellis

@lucdetellis I got fix that error by installing npm install -g bluebird now the issue is that I don't see any sonos in my network.

RodrigoViolante avatar Jun 18 '16 01:06 RodrigoViolante

@ady624 's solution fixes the error in my rather complex Sonos setup, great work!

apeeters avatar Sep 21 '16 05:09 apeeters

For those still struggling with the original error reported by @bdsousa, adding "device.coordinator === 'false' ||" in /usr/local/lib/node_modules/airsonos/node_modules/sonos/lib/logicalDevice.js as suggested by @ady624 did it for me:

if (device.coordinator === 'false' || device.name === 'BRIDGE' || device.name === 'BOOST') return; // devices to ignore in search

iamontheinet avatar Jan 24 '17 20:01 iamontheinet

@ady624's solution works for me. Thanks so much!

I have one soundbar and two play1 connected with ethernet cable and one amp on wifi.

islanderman avatar Mar 06 '17 22:03 islanderman