rgraciano / echo-sonos

Amazon Echo integration with Sonos
Other
712 stars 234 forks source link

Advanced mode - Unable to select music by Artist, Album or Track, other features work #123

Closed petebanham closed 7 years ago

petebanham commented 7 years ago

Hi, I am hoping someone can help me. I have this working well when advanced mode is off but when I turn it on, the music selection stops working. I have added the extra role permissions and the advances mode features work, I can play, pause, change room and volume and also change the default room on the fly and it reminders the current room from the last command, but..... When I try and start music either by Track, Artist or Album I get an error. I am using the service simulator to test and the command "play track XXXX in the kitchen" works fine with advanced mode off but as soon as I turn it on the simulator gives the error "The remote endpoint could not be called, or the response it returned was invalid." but resume, pause, volume up/down all work fine. I am using Spotify as the music source. Any help /ideas appreciated. Thanks

pheintzelman commented 7 years ago

Can you post the logs from the time of the error?

petebanham commented 7 years ago

Hi, Thanks for the response, which logs are you after please?

petebanham commented 7 years ago

Sorry had a brain fart! Here are lambda logs with the ID removed . I only expand the section that errored. Any insight/advise would be greatly appreciated. Thanks START RequestId: 92c7754a-ebb2- Version: $LATEST 14:51:30 2017-02-05T14:51:30.847Z 92c7754a-ebb2 session applicationId: amzn1.ask.skill.3 14:51:30 2017-02-05T14:51:30.847Z 92c7754a-ebb2- dispatch intent = ArtistIntent 14:51:30 2017-02-05T14:51:30.848Z 92c7754a-ebb2- MusicIntent received for room extension 14:51:30 2017-02-05T14:51:30.848Z 92c7754a-ebb2- Advanced Mode = true 14:51:31 2017-02-05T14:51:31.587Z 92c7754a-ebb2- Reading current settings 14:51:312017-02-05T14:51:31.807Z 92c7754a-ebb2- room=extension newRoom= service=undefined newService=

14:51:312017-02-05T14:51:31.866Z 92c7754a-ebb2-1TypeError: Cannot read property 'toLowerCase' of undefined at musicHandler (/var/task/index.js:367:50) at /var/task/index.js:45:13 at Response. (/var/task/index.js:637:25) at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:355:18) at Request.callListeners (/var/runtime/node_modules/aw 2017-02-05T14:51:31.866Z 92c7754a-ebb23 TypeError: Cannot read property 'toLowerCase' of undefined at musicHandler (/var/task/index.js:367:50) at /var/task/index.js:45:13 at Response. (/var/task/index.js:637:25) at Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:355:18) at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:668:14) at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10) at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12) at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10

14:51:31 END RequestId: 92c7754a-ebb2-

pheintzelman commented 7 years ago

Thanks. Looks like the issue is "service=undefined". Do you have a default service set? Also try using change service before the artist intent.

petebanham commented 7 years ago

Thank you very much, that sorted it! I had the DEFAULT_MUSIC_SERVICE set to spotify via a Lambda variable, however changing and reverting it from Alexa seems to have fixed it. I assume that now the service=spotify will be sorted and it will continue to work. Thanks again for your help and work on this great skill.

pheintzelman commented 7 years ago

Glad that helped! It should keep working but it sounds like there is a bug with Advanced mode and getting the default service.