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

Intermittent modal rendering failure due to auth.test latency and button id expiry #2353

Open
sanjay1909 opened this issue Dec 3, 2024 · 9 comments
Assignees
Labels
auto-triage-stale needs info An issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info question M-T: User needs support to use the project

Comments

@sanjay1909
Copy link

@slack/bolt version

^3.19.0

Your App and Receiver Configuration

export const getSlackApp = (token: string, receiver: AwsLambdaReceiver) => { const options: AppOptions = { token, receiver, }; return new App(options); };

Node.js runtime version

v18.20.2

Issue Description:

We are encountering intermittent latency when rendering modal triggered by button clicks in our Slack app.

Observation

  1. The modal is triggered on Button Click
  2. Occasionally, the modal is not rendered as expected.
  3. Upon Investigation , the auth.test call made by the BoltSDK is experiencing Latency of up to 2.7 secs in these instances.
  4. Since the Button Id has TTL of only 3 seconds, the latency caused by the auth.test call leads to the button ID expiring eventually API call to render Modal fails.

Request for Support

Can you help us understand:

  1. What circumstance might cause the auth.test call to experience high latency
  2. Are there any best practices or configurations we can apply to mitigate this delay?
@hello-ashleyintech
Copy link
Contributor

Hi, @sanjay1909! Thanks for submitting this question.

Some more follow ups so I can get a better idea - what are you passing into your app initialization for options? Also, is the app a single-workspace app or are you using OAuth?

@hello-ashleyintech hello-ashleyintech self-assigned this Dec 3, 2024
@hello-ashleyintech hello-ashleyintech added needs info An issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info and removed untriaged labels Dec 3, 2024
@sanjay1909
Copy link
Author

sanjay1909 commented Dec 3, 2024

HI
Yes Its a Single Workspace APP.

We are passing the token and awsLambdaReceiver instance
const awsLambdaReceiver = new AwsLambdaReceiver({ signingSecret: secret.slackSigningSecret, });

@hello-ashleyintech
Copy link
Contributor

@sanjay1909 Ah, I see. Thank you for sharing that!

Have you tried the solution suggested here?

Possible solutions are to move a your topic_event_handlers to be an async operation by calling another Lambda or queuing the task to be triggered by another Lambda function. Unfortunately, while we have a nice out-of-the-box lazy listener implementation for Bolt Python, we haven't migrated it to the Bolt JS Lambda adapter.

@sanjay1909
Copy link
Author

Hi I guess thats for ack to respond back in 3 sec, yes we do have two lambda approach for that.
This is for auth.test call which is triggered by the Bolt JS AwsLambdaReceiver i guess, before the middleware call.
This auth.test call normally takes less than 1 sec, but occasionally taking close to 3 sec

@hello-ashleyintech
Copy link
Contributor

@sanjay1909 understood! Since it sounds like an intermittent issue with the auth.test API, it may not necessarily be an issue from the Slack or SDK side. Could it be related to your device connectivity? Do you have any firewalls or proxies running that could slow this call down?

if the "auth.test" function takes a long time to run, it usually indicates a problem with your network connection, potentially due to a slow internet connection, firewall restrictions, proxy issues, or even a problem with Slack's servers themselves

@sanjay1909
Copy link
Author

No, we don't have that

@sanjay1909
Copy link
Author

Hi Do you have any findings here ? Thank you

@seratch
Copy link
Member

seratch commented Dec 11, 2024

Hope my comment at your new issue helps: #2361 (comment)

@seratch seratch added the question M-T: User needs support to use the project label Dec 11, 2024
Copy link

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-triage-stale needs info An issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info question M-T: User needs support to use the project
Projects
None yet
Development

No branches or pull requests

3 participants