-
Notifications
You must be signed in to change notification settings - Fork 2
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
Error invoking play when device name has a space in it #2
Comments
I cant reproduce this - it works fine for me when I send a play or pause command to the endpoint whether the room name is one or two words. Can you include the path and verb you are sending the request to when it crashes. If you cant get it from the calling application, it should appear in the node.js logs - eg
|
http command is : http://192.168.1.128:10010/players/Dining%20Room/state Have attached log file of the node.js app. |
Thanks for that - attaching the log was really helpful. I can reproduce this now by turning a sonos off then on again so the queue is empty and then trying to send a play command to the sonos and I get the same error. Can you confirm this is the same for you. You can check this in the sonos app - the play button should be disabled for you when you get this error I will have a look into it so it can return a more meaningful error |
I have pushed a change so that it returns a 500 error with message saying it cant play if this happens. Can you try it out and see if it fixes your issue |
There seems to be an error when invoking the play command when a device name has a space in it, eg
"Dining Room"
{"playbackState": "play"}
The error returned is
{"message":"Got status 500 when invoking /MediaRenderer/AVTransport/Control","stack":"Error\n at Object.invoke (/home/pi/sonos-swagger-api-master/node_modules/sonos-discovery/lib/helpers/soap.js:95:10)\n at Player.play (/home/pi/sonos-swagger-api-master/node_modules/sonos-discovery/lib/models/Player.js:442:15)\n at Promise.resolve.then.then (/home/pi/sonos-swagger-api-master/api/helpers/playpause.js:32:39)\n at bound (domain.js:280:14)\n at runBound (domain.js:293:12)\n at tryCatcher (/home/pi/sonos-swagger-api-master/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/home/pi/sonos-swagger-api-master/node_modules/bluebird/js/release/promise.js:512:31)\n at Promise._settlePromise (/home/pi/sonos-swagger-api-master/node_modules/bluebird/js/release/promise.js:569:18)\n at Promise._settlePromise0 (/home/pi/sonos-swagger-api-master/node_modules/bluebird/js/release/promise.js:614:10)\n at Promise._settlePromises (/home/pi/sonos-swagger-api-master/node_modules/bluebird/js/release/promise.js:693:18)\n at Async._drainQueue (/home/pi/sonos-swagger-api-master/node_modules/bluebird/js/release/async.js:133:16)\n at Async._drainQueues (/home/pi/sonos-swagger-api-master/node_modules/bluebird/js/release/async.js:143:10)\n at Immediate.Async.drainQueues (/home/pi/sonos-swagger-api-master/node_modules/bluebird/js/release/async.js:17:14)\n at runCallback (timers.js:672:20)\n at tryOnImmediate (timers.js:645:5)\n at processImmediate [as _immediateCallback] (timers.js:617:5)","code":"error"}
This error does not happen when the device name is a single word, eg "Lounge"
Also - when invoking a pause command, there is no error and it works, the issue is just the play command.
The text was updated successfully, but these errors were encountered: