question

Tom avatar image
Tom asked

Problems with Echo speaking launch response

Hello, It simple returns ERROR with no other diagnostics. Please see the results in the log below. Suggestions? I can also post the schema, and sample utterances but I don't think they should matter on launch. As best I can see the code is sending a valid response when it should. Note that I intentionally obscured the app. and user ID's in the log. Thanks, Tom ----------------------------------------------------------- START RequestId: f509bda0-153e-11e5-915a-a5aef9bb31cd 2015-06-17T22:19:46.296Z f509bda0-153e-11e5-915a-a5aef9bb31cd event: { "version": "1.0", "session": { "new": true, "sessionId": "amzn1.echo-api.session.104174ba-efb4-4ef3-99bd-9805090c71b6", "application": { "applicationId": "amzn1.echo-sdk-ams.app.8..0-02bf-433e-a..d-f55....267c9" }, "user": { "userId": "amzn1.account.AGMZOOBB...........GLZRDAATA" } }, "request": { "type": "LaunchRequest", "requestId": "amzn1.echo-api.request.103731ce-e820-42f6-abb5-6646d1026751", "timestamp": "2015-06-17T22:19:44Z" } } 2015-06-17T22:19:46.297Z f509bda0-153e-11e5-915a-a5aef9bb31cd new session started, requestId: amzn1.echo-api.request.103731ce-e820-42f6-abb5-6646d1026751 2015-06-17T22:19:46.297Z f509bda0-153e-11e5-915a-a5aef9bb31cd LaunchRequest, requestId: amzn1.echo-api.request.103731ce-e820-42f6-abb5-6646d1026751 2015-06-17T22:19:46.298Z f509bda0-153e-11e5-915a-a5aef9bb31cd { version: '1.0', sessionAttributes: {}, response: { outputSpeech: { type: 'PlainText', text: 'Hello, you can this or that.' }, card: { type: 'Simple', title: 'Launch Card Title', subtitle: 'Launch Card Subtitle', content: 'Launch Card Content' }, shouldEndSession: false } } 2015-06-17T22:19:46.356Z f509bda0-153e-11e5-915a-a5aef9bb31cd event handler done END RequestId: f509bda0-153e-11e5-915a-a5aef9bb31cd REPORT RequestId: f509bda0-153e-11e5-915a-a5aef9bb31cd Duration: 157.00 ms Billed Duration: 200 ms Memory Size: 128 MB Max Memory Used: 9 MB START RequestId: f5fa1193-153e-11e5-912b-71ad74e4b1b1 2015-06-17T22:19:46.416Z f5fa1193-153e-11e5-912b-71ad74e4b1b1 event: { "version": "1.0", "session": { "new": false, "sessionId": "amzn1.echo-api.session.104174ba-efb4-4ef3-99bd-9805090c71b6", "application": { "applicationId": "amzn1.echo-sdk-ams.app.8..0-02bf-433e-a..d-f55....267c9" }, "user": { "userId": "amzn1.account.AGMZOOBB...........GLZRDAATA" } }, "request": { "type": "SessionEndedRequest", "requestId": "amzn1.echo-api.request.dc1d37e1-7422-44c3-b262-9af5c6ad07e7", "timestamp": "2015-06-17T22:19:46Z", "reason": "ERROR" } } 2015-06-17T22:19:46.416Z f5fa1193-153e-11e5-912b-71ad74e4b1b1 SessionEndedRequest, requestId: amzn1.echo-api.request.dc1d37e1-7422-44c3-b262-9af5c6ad07e7 2015-06-17T22:19:46.416Z f5fa1193-153e-11e5-912b-71ad74e4b1b1 { version: '1.0' } 2015-06-17T22:19:46.416Z f5fa1193-153e-11e5-912b-71ad74e4b1b1 event handler done END RequestId: f5fa1193-153e-11e5-912b-71ad74e4b1b1 REPORT RequestId: f5fa1193-153e-11e5-912b-71ad74e4b1b1 Duration: 44.73 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 9 MB
alexa skills kitsubmission testing certification
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

The Stig avatar image
The Stig answered
Try removing the "subtitle" variable from Card. I remember reading somewhere on the forums that "subtitle" was discontinued (or at least I [i]think[/i] I read that here, may have been somewhere else).
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Tom avatar image
Tom answered
Thanks but no joy -- same result.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

J.A. avatar image
J.A. answered
Thomas, I am experiencing the exact same issue. Did you figure out what was going on? Did you make sure your HTTP response headers are correct? Here is a dump of the requests and responses: Echo tells me "There was a problem communicating with your requested application" I am seeing amazon hit my server, but Echo is timing out and giving the error. Here's what my server has logged. Can someone point out what I'm returning that is incorrect? ============ BEGIN CONNECTION ============ FROM: 72.21.217.131 REQUEST HEADERS: Accept:application/json Accept-Charset:utf-8 Connection:Keep-Alive Host:[redacted] Signature:[redacted] Signaturecertchainurl:[redacted] User-Agent:Apache-HttpClient/4.3 (java 1.5) REQUEST BODY: "{\"version\":\"1.0\",\"session\":{\"new\":true,\"sessionId\":\"[redacted]\",\"application\":{\"applicationId\":\"[redacted]\"},\"user\":{\"userId\":\"[redacted]\"}},\"request\":{\"type\":\"LaunchRequest\",\"requestId\":\"[redacted]\",\"timestamp\":\"[redacted]\"}}" SERVER RESPONSE: HTTP/1.1 200 OK {"version":"1.0","sessionAttributes":{},"response":{"outputSpeech":{"type":"PlainText","text":"[redacted] better have my money."},"card":{"type":"Simple","title":"Gangster","content":"[redacted] better have my money."},"reprompt":{"outputSpeech":{"type":"PlainText","text":"[redacted] better have my money."}},"shouldEndSession":true}} ============= END CONNECTION ============= ============ BEGIN CONNECTION ============ FROM: 72.21.217.131 REQUEST HEADERS: Accept:application/json Accept-Charset:utf-8 Connection:Keep-Alive Host:[redacted] Signature:[redacted] Signaturecertchainurl:[redacted] User-Agent:Apache-HttpClient/4.3 (java 1.5) REQUEST BODY: "{\"version\":\"1.0\",\"session\":{\"new\":false,\"sessionId\":\"[redacted]\",\"application\":{\"applicationId\":\"[redacted]\"},\"user\":{\"userId\":\"[redacted]\"}},\"request\":{\"type\":\"SessionEndedRequest\",\"requestId\":\"[redacted]\",\"timestamp\":\"[redacted]\",\"reason\":\"ERROR\"}}" SERVER RESPONSE: HTTP/1.1 200 OK {"version":"1.0","sessionAttributes":{},"response":{"outputSpeech":{"type":"PlainText","text":"[redacted] better have my money."},"card":{"type":"Simple","title":"Gangster","content":"[redacted] better have my money."},"reprompt":{"outputSpeech":{"type":"PlainText","text":"[redacted] better have my money."}},"shouldEndSession":true}} ============= END CONNECTION ============= What tools are there to troubleshoot this?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

J.A. avatar image
J.A. answered
What HTPT Response headers are you sending? Content-Length response header needs to be present; and in bytes not bits! -- they resolved my issue. Launch the echo app on your android device, it sometimes gives you hints on why the response was erroring out.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ross@Amazon avatar image
Ross@Amazon answered
Check to make sure that you have added the Alexa Skills Kit as an event source to your lambda function. This step is often overlooked by developers. We are working on a knowledge base article to address the most common developers mistakes as well as updating the documentation to reflect the changes to the AWS console regarding the creation of lambda functions.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.