-
Notifications
You must be signed in to change notification settings - Fork 402
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
@slack/bolt App using AWSLambdaReceiver not handling events/messages/etc. #1480
Comments
Hi @mrowles,
The handler is an async function. Adding |
@seratch Thanks but unfortunately that did not fix it. Also, the docs suggest that you just return the handler as I've done originally. Additionally, reference here as to why we probably don't need this. I'm stumped! |
@mrowles I may be able to find time to check this issue tomorrow in my timezone (+09:00) but before that, I would like to suggest the following first:
For the first one, the following code should provide more info to you (I haven't verified if this really works - if not, please adjust the code as necessary): const result = await handler(event, context, callback); // <--no errors, runs to completion
console.log(JSON.stringify(result));
return result; |
Thanks, I tried this and got some more information:
The event that I print out looks well constructed, the headers are all there and the body looks well represented in terms of data. I'm going to look into how the Slack env vars are being populated, I'm using secrets manager to retrieve them so I assume they're fine, but let me double check. |
One thing that I was confused about is what Bot token to use - the docs suggest using the app specific one, but it would make more sense if I'm using the team/workspace specific bot token who sent the message (the one we receive when the OAuth exchange happens). |
This indicates your
If your app serves the OAuth flow for multiple workspace installation, your |
That's weird, it's showing that it's correct. I'll regenerate, redeploy and test. Perhaps we could make a change to the body response when signing secret doesn't work - would this be a security issue to add some more verbosity to the 401 response? It could be any number of things that needs attention :/ Thanks for your help so far btw. |
@mrowles We prefer adding info-level logging rather than adding more details to the response data. I will work on it later. I think that everything is clear so far. Let me close this issue now but if you find anything further to ask / discuss, please feel free to reopen or write in. |
Now I am getting the following errors:
I have exposed the issue by doing this here:
|
Description
EDIT by @seratch - This seems to be copied from #781 (comment)
I'm in this exact same boat - it's seemingly all set up correctly, but the app + awsLambdaReceiver just don't respond to any of the middleware event types. I feel as though it's exiting early. Am I doing something wrong?
Note: the team has been OAuth'd separately, should I be passing in my installation store to either app or awsLambdaReceiver?
Bonus OAuthv2 manual process because Express store didn't work well:
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
package version:
@slack/bolt: 3.11.0
@slack/oauth: 2.5.2
node version:
16
OS version(s):
Local: MacOS 12.4
Production: AWS Linux
Steps to reproduce:
Expected result:
Our AWS Lambda would respond in Slack chat
Actual result:
Nothing happens in Slack
Attachments:
Logs, screenshots, screencast, sample project, funny gif, etc.
The text was updated successfully, but these errors were encountered: