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

noAckTimeoutId is not cleared when no handlers match the request #2284

Closed
Pouja opened this issue Oct 9, 2024 · 4 comments
Closed

noAckTimeoutId is not cleared when no handlers match the request #2284

Pouja opened this issue Oct 9, 2024 · 4 comments
Assignees
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented
Milestone

Comments

@Pouja
Copy link

Pouja commented Oct 9, 2024

noAckTimeoutId is not cleared at https://github.com/slackapi/bolt-js/blob/main/src/receivers/AwsLambdaReceiver.ts#L262

If no handler is listening to an incoming request from Slack. The library properly makes a 404 message. But it does not clear the timeout. Causing an open handle.

@slack/bolt version

4.0.0-rc.3

Your App and Receiver Configuration

    this.app = new App({
      token: this.options.apiToken,
      receiver: this.awsLambdaReceiver,
      agent: proxyAgent,
      signingSecret: this.options.signingSecret,
      endpoints: this.options.apiEndpoint,
      logger: this.mapLogger(),
      botId: 'XXXX',
      botUserId: 'XXXX',
    });

Node.js runtime version

v20.11.1

Steps to reproduce:

(Share the commands to run, source code, and project settings)

  1. Create a new app with AwsLambdaReceiver as receiver.
  2. Dont add any handlers.

Expected result:

No timeouts are leaked outside the execution

Actual result:

Timeout being cleared.

Requirements

For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

@Pouja Pouja added the untriaged label Oct 9, 2024
@filmaj filmaj added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented and removed untriaged labels Oct 9, 2024
@filmaj filmaj added this to the 4.0.0 milestone Oct 9, 2024
@filmaj filmaj self-assigned this Oct 9, 2024
@filmaj
Copy link
Contributor

filmaj commented Oct 9, 2024

Thanks for filing this. I've confirmed the issue in a test. Should have a fix for it shortly. It will get merged into the bolt v4 branch and will be released in 4.0.0-rc.4.

PR up for this here: #2285

filmaj pushed a commit that referenced this issue Oct 9, 2024
…hen using the `AwsLambdaReceiver`, do not log out an error related to `ack` timeout. fixes #2284.

- also, expose `unhandledRequestTimeoutMillis` receiver option on `AwsLambdaReceiver`, just like `HTTPReceiver` has (to ease testing of timeouts, mainly)
- expose a `logger` getter on `AwsLambdaReceiver` (to ease testing, mainly)
@filmaj
Copy link
Contributor

filmaj commented Oct 9, 2024

Hey @Pouja I just released bolt version 4.0.0-rc.4 that addresses this issue. I will leave this issue open until we merge and release the final 4.0.0 non-RC version.

@filmaj
Copy link
Contributor

filmaj commented Oct 17, 2024

Hello! Bolt v4 is live on npm, and a fix for this issue is available in that version.

@filmaj filmaj closed this as completed Oct 17, 2024
@Pouja
Copy link
Author

Pouja commented Oct 20, 2024

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented
Projects
None yet
Development

No branches or pull requests

2 participants