question

J.A. avatar image
J.A. asked

Echo via HTTPS not working "Problem communicating"... but receiving request

I am writing a web service for communicating with Echo; and I'm having trouble getting a response. 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?
alexa skills kitdebugging
10 |5000

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

1 Answer

J.A. avatar image
J.A. answered
Figured it out! Content-Length response header needs to be present; and in bytes not bits!
10 |5000

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