echo-sonos icon indicating copy to clipboard operation
echo-sonos copied to clipboard

Cannot read property 'System' of undefined

Open dlenz opened this issue 6 years ago • 2 comments

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.

dlenz avatar Dec 28 '17 21:12 dlenz

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 } } } }

dlenz avatar Dec 29 '17 19:12 dlenz

You rock, thank you!

m0nk3yd0g avatar Jan 05 '19 01:01 m0nk3yd0g