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

Invalid Music Service #180

Open
loftgren opened this issue Jun 14, 2017 · 7 comments
Open

Invalid Music Service #180

loftgren opened this issue Jun 14, 2017 · 7 comments

Comments

@loftgren
Copy link

Hello,

All was working well, but now when I change the music service and try to play something there npm gives me ... Error: Invalid music service.

Help greatly appreciated!

@loftgren
Copy link
Author

2017-06-15T18:22:15.927Z 8ec3fc1b-51f7-11e7-96b6-73db4dc77164 Error: Failed to retrieve data, status code: 500
at ClientRequest.lib.get (/var/task/sonosProxy/httpClient.js:13:17)
at ClientRequest.g (events.js:291:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at HTTPParser.parserOnIncomingClient (_http_client.js:473:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
at Socket.socketOnData (_http_client.js:362:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)

@loftgren
Copy link
Author

Please help...

@loftgren
Copy link
Author

I'm begging here... please help. All else works fine... I can do everything else... I just can't actually get it to play anything with the "Invalid Music Service" appearing.

@esakowski
Copy link

Are you by chance using Spotify? I had a similar issue that modifying one line of code corrected.

@loftgren
Copy link
Author

I am using Spotify. What was the line of code that you changed?

@SeanNazareth
Copy link

I was having a similar problem with Spotify.

I tracked it down to the fact that the Amazon Alexa Skill was outputting a line like:
"http://raspberrypi:5005/house/musicsearch/Spotify/song/artist:Coldplay"

Where the "service" was capitalized as "Spotify", but the javascript is looking for all lower case.

I patched the file "lib/actions/musicSearch.js" with the following:

----patch below----
196c196
< const service = values[0].toLowerCase();

const service = values[0];
----patch above----

which just makes the musicSearch use lowercase for the music Service.

Sean

@edwindotcom
Copy link

This is a critical patch to get spotify working. Note lib/actions/musicSearch.js is in the node-sonos-http-api library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants