echo-sonos
echo-sonos copied to clipboard
Cannot read property 'System' of undefined
It seems that the instruction in the README differ slightly from what is presented in Lambda portion. I have tried to set things up as best as I can and think I have competed all of the necessary steps. However, when I try to test through Lambda, I get the following error:
{ "errorMessage": "Cannot read property 'System' of undefined", "errorType": "TypeError", "stackTrace": [ "EchoSonos.setEchoId (/var/task/index.js:43:40)", "AlexaSkill.execute (/var/task/AlexaSkill.js:101:14)", "EchoSonos.intentHandlers.NextTrackIntent.PreviousTrackIntent.WhatsPlayingIntent.promise.then.catch.promise.then.catch.exports.handler (/var/task/index.js:796:15)" ] }
Does anyone have an idea where I can start troubleshooting? I've started from scratch 2x, but with the same results.
Thanks.
It appears that the Alexa Skills session must be invoked prior to running the test. This version of play_intent_testreq.json should work:
{ "session": { "new": true, "sessionId": "session1234", "attributes": {}, "user": { "userId": null }, "application": { "applicationId": "YOUR_ECHO_AWS_APP_ID_HERE" } }, "version": "1.0", "request": { "intent": { "slots": { "Preset": { "name": "Preset", "value": "test" } }, "name": "PlayPresetIntent" }, "type": "IntentRequest", "requestId": "request5678" }, "context": { "AudioPlayer": { "playerActivity": "IDLE" }, "System": { "device": { "supportedInterfaces": { "AudioPlayer": {} } }, "application": { "applicationId": "YOUR_ECHO_AWS_APP_ID_HERE" }, "user": { "userId": null } } } }
You rock, thank you!