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

AWS Lex + QnA stack lambda 424 error when coupled with Interactions #229

Closed
tabrza opened this issue Nov 2, 2020 · 3 comments
Closed

AWS Lex + QnA stack lambda 424 error when coupled with Interactions #229

tabrza opened this issue Nov 2, 2020 · 3 comments

Comments

@tabrza
Copy link

tabrza commented Nov 2, 2020

I'm building a question and answer bot using the QnA launch stack. After training some questions in the bot designer, I am able to interact with it there as well as directly within lex indicating that the lambda function associated with QnA is working as intended. However, when creating a react app and setting it up with interactions, I get a lambda 424 errors. This works with sample bots (orderflower, booktrip etc.) and with bots I have made previously using the same launch stack.

Going through the logs i get the following invoke error:

{
    "errorType": "TypeError",
    "errorMessage": "Cannot convert undefined or null to object",
    "stack": [
        "TypeError: Cannot convert undefined or null to object",
        "    at Array.preprocess (/var/task/lib/middleware/2_preprocess.js:130:31)"
    ]
}

See image of logs here

This points me to the following code on github. What I gather from here is that interactions is not sending a jwt? I'm not sure how to resolve this as I haven't encountered this error previously with my bots and it is working with bots i've built previously using the same launch stack. I deployed across different regions jsut to confirm it wasn't a deployment issue but encountered the same 424 error..

Any help/guidance would be appreciated!

@bobpskier
Copy link
Contributor

The initial request from the amplify chatbot appears to not set Lex sessionAttributes. The code in question attempts delete properties assuming sessionAttributes is available causing the exception. Working on a resolution in the code and will push an update shortly that should address the issue.

@tabrza
Copy link
Author

tabrza commented Nov 4, 2020

Thanks @bobpskier - look forward to this

@bobpskier
Copy link
Contributor

@tabrza QnABot version 4.3.2 was pushed out last night. Could you upgrade to this version and/or try a fresh install to confirm resolution of this issue?

@ihmaws ihmaws closed this as completed Apr 6, 2023
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

3 participants