question

newuser-7e3dbb27-576f-4129-a2ae-c236ec7f4fee avatar image

Alexa terminating the session even though "shouldEndSession": false

I am facing this issue only some times. Even though sessionEndSession attribute set to false, alexa terminating the session for the user. Below here I am pasting the debugger logs. It will be very helpful if guys tell me the reason for this particular issue.

127.0.0.1 - - [13/Aug/2018 10:24:02] "POST / HTTP/1.1" 200 -
{"context": {"AudioPlayer": {"playerActivity": "IDLE"}, "Display": {"token": ""}, "System": {"apiAccessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJhdWQiOiJodHRwczovL2FwaS5hbWF6b25hbGV4YS5jb20iLCJpc3MiOiJBbGV4YVNraWxsS2l0Iiwic3ViIjoiYW16bjEuYXNrLnNraWxsLmE4ZDdkNjRmLWY5N2EtNDRiYy1iYmE2LWYyYjE0OTJkMDhlMSIsImV4cCI6MTUzNDEzOTY0MiwiaWF0IjoxNTM0MTM2MDQyLCJuYmYiOjE1MzQxMzYwNDIsInByaXZhdGVDbGFpbXMiOnsiY29uc2VudFRva2VuIjpudWxsLCJkZXZpY2VJZCI6ImFtem4xLmFzay5kZXZpY2UuQUVZQ0lZSFQzTFYzS0hHRUdEUVFKU0dTUFdXRzI2TlFNTTRMWlozTUw2UEVMSzRWVzRaTVJSN1BQWFJKTU4zRTRKWUdMRkROTVZXVUo3R0ZTRU5aNElHRTNTQ1RHQ01MS1BYNk1aQzVBQVRLSEhGTFBXV0xDSEtQNkJYQkVJNU00SEFOVzdPSkhPVERHUTVPVVZFUTJBSVVVM0NRIiwidXNlcklkIjoiYW16bjEuYXNrLmFjY291bnQuQUhMWElaMktTMklWRURWQzJOMzZMM1VRWEc2Wk9KRUhOTE9HWTZUVjUzR0NCM0pLUUU3T1ZFRDc2QzVaWTZTSlZKTVdQSEdUVFRINVhVSUZCNEdNTlhIS09BVllXU1ZOUENZRUdSQVRDSVJFUzREUzVYUjZKSEFJQ1hBR1ZBRzJLNFdIRlZURlQ2WktORkpIVk9UMlpLUkZXWDJXNUxFRFRCUURESEtOSTNRTE9QQlRBUkJXNUVNN05PVUdUV1ZWTjVHM1RJQ05UUkFKVlVBIn19.IVjh3Ol39KQ5aUUg_pkd8UIQDVwRUW1QmOZBQZ65CmK7Qz14AoYB8cUoqP9ovXSHw5qn5-kmmePBIN0kf8-NcW5c_jGoul8__HFfOlgWhQJdZLN8ihEKCGV-5ygdXp3XJhxGl4fa5AsAZZVKbUkV-nKlghp_bXoC1ij3EN76S75YqytmRU8WxZDfinBX5yzM_SXH8TNemCophaXO2bXNr-Lj6BA-3K64Z3yRBeOZ03ajzXmQD_vWC3ni-UIUufcGYr9nMRaFqr4m24xkyZYfejkiahzqtU0Q41y9Kwn4ptCRfnScbP1X5UosJc7BJF_3KTz2X3mNMsPiemqxMwERDw", "apiEndpoint": "https://api.eu.amazonalexa.com", "application": {"applicationId": "amzn1.ask.skill.a8d7d64f-f97a-44bc-bba6-f2b1492d08e1"}, "device": {"deviceId": "amzn1.ask.device.AEYCIYHT3LV3KHGEGDQQJSGSPWWG26NQMM4LZZ3ML6PELK4VW4ZMRR7PPXRJMN3E4JYGLFDNMVWUJ7GFSENZ4IGE3SCTGCMLKPX6MZC5AATKHHFLPWWLCHKP6BXBEI5M4HANW7OJHOTDGQ5OUVEQ2AIUU3CQ", "supportedInterfaces": {"AudioPlayer": {}, "Display": {"markupVersion": "1.0", "templateVersion": "1.0"}}}, "user": {"userId": "amzn1.ask.account.AHLXIZ2KS2IVEDVC2N36L3UQXG6ZOJEHNLOGY6TV53GCB3JKQE7OVED76C5ZY6SJVJMWPHGTTTH5XUIFB4GMNXHKOAVYWSVNPCYEGRATCIRES4DS5XR6JHAICXAGVAG2K4WHFVTFT6ZKNFJHVOT2ZKRFWX2W5LEDTBQDDHKNI3QLOPBTARBW5EM7NOUGTWVVN5G3TICNTRAJVUA"}}}, "request": {"error": {"message": "An exception occurred while dispatching the request to the skill.", "type": "ENDPOINT_TIMEOUT"}, "locale": "en-US", "reason": "ERROR", "requestId": "amzn1.echo-api.request.7299c06d-397e-4462-9528-70e3b4f2458d", "timestamp": "2018-08-13T04:54:02Z", "type": "SessionEndedRequest"}, "session": {"application": {"applicationId": "amzn1.ask.skill.a8d7d64f-f97a-44bc-bba6-f2b1492d08e1"}, "new": false, "sessionId": "amzn1.echo-api.session.7c5eeefb-8e8e-494b-87c5-3c702858c2c0", "user": {"userId": "amzn1.ask.account.AHLXIZ2KS2IVEDVC2N36L3UQXG6ZOJEHNLOGY6TV53GCB3JKQE7OVED76C5ZY6SJVJMWPHGTTTH5XUIFB4GMNXHKOAVYWSVNPCYEGRATCIRES4DS5XR6JHAICXAGVAG2K4WHFVTFT6ZKNFJHVOT2ZKRFWX2W5LEDTBQDDHKNI3QLOPBTARBW5EM7NOUGTWVVN5G3TICNTRAJVUA"}}, "version": "1.0"}
{"playerActivity": "IDLE"}
--------------------------------------------------------------------------------
DEBUG in alexaFlask [alexaFlask.py:33]:
user session stopped
--------------------------------------------------------------------------------
127.0.0.1 - - [13/Aug/2018 10:24:03] "POST / HTTP/1.1" 200 -
alexa skills kitpythonsession
10 |3000 characters needed characters left characters exceeded

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

1 Answer

KAIYIN@AMAZON.COM avatar image
KAIYIN@AMAZON.COM answered

It looks like you are using the alexaFlask which is an external library that not supported officially by Amazon. We just launched our Beta Python SDK, would you like that use that instead? https://github.com/alexa-labs/alexa-skills-kit-sdk-for-python

10 |3000 characters needed characters left characters exceeded

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