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

Cannot read property 'System' of undefined #195

Open
dlenz opened this issue Dec 28, 2017 · 2 comments
Open

Cannot read property 'System' of undefined #195

dlenz opened this issue Dec 28, 2017 · 2 comments

Comments

@dlenz
Copy link

dlenz commented Dec 28, 2017

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
Copy link
Author

dlenz commented Dec 29, 2017

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

@m0nk3yd0g
Copy link

You rock, thank you!

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

2 participants