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

bug: Issues with path-to-regexp after Bolt-JS upgrade to 3.21.4 #2267

Open
nivr4 opened this issue Sep 19, 2024 · 4 comments
Open

bug: Issues with path-to-regexp after Bolt-JS upgrade to 3.21.4 #2267

nivr4 opened this issue Sep 19, 2024 · 4 comments
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

Comments

@nivr4
Copy link

nivr4 commented Sep 19, 2024

Hey,

Recently, we upgraded Bolt-JS in our Slack app to version 3.21.4. Since then, we've been encountering the following error:

/ticketing-system/node_modules/path-to-regexp/dist/index.js:136
        throw new TypeError(`Unexpected ${nextType} at ${index}, expected ${type}: ${DEBUG_URL}`);
              ^
              
TypeError: Unexpected ? at 36, expected END: https://git.new/pathToRegexpError
    at Iter.consume (ticketing-system/node_modules/path-to-regexp/dist/index.js:136:15)
    at consume (ticketing-system/node_modules/path-to-regexp/dist/index.js:193:16)
    at parse (ticketing-system/node_modules/path-to-regexp/dist/index.js:197:20)
    at ticketing-system/node_modules/path-to-regexp/dist/index.js:308:74
    at Array.map (<anonymous>)
    at pathToRegexp (ticketing-system/node_modules/path-to-regexp/dist/index.js:308:25)
    at match (ticketing-system/node_modules/path-to-regexp/dist/index.js:278:30)
    at Server.<anonymous> ticketing-system/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js:104:71)
    at Server.emit (node:events:515:28)
    at parserOnIncoming (node:_http_server:1143:12)

Do you have any suggestions for fixing this from our side, or should we downgrade to a previous version until the issue is resolved?

Thank you!

@filmaj filmaj 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 Sep 19, 2024
@filmaj
Copy link
Contributor

filmaj commented Sep 19, 2024

If you could help us reproduce the problem, that would be helpful to understand what is happening.

It seems the stack trace points to code that runs in the default error handler in the Socket Mode receiver.

Can you share your App configuration, and steps on how to reproduce? What event triggers this error? Do you have any handlers defined in your for the particular event?

@ShaiHalfon96
Copy link

Hi, I am working with Niv on this project.
Currently we revert bolt version to 3.21.3 to avoid this errors.
This is our app configuration:

const app = new App({
    token: config.SLACK_BOT_TOKEN,
    signingSecret: config.SLACK_SIGNING_SECRET,
    port: config.PORT,
    appToken: config.SLACK_APP_TOKEN,
    socketMode: true,
    customRoutes: customRoutes,
    logLevel: config.LOG_LEVEL,
    deferInitialization: true,
    logger: logger,
  });

@filmaj
Copy link
Contributor

filmaj commented Oct 7, 2024

@ShaiHalfon96 how can I reproduce the error? Please provide reproduction instructions. If I cannot reproduce the error, I cannot help 😢

Does it happen on app startup? Does it happen when a specific event occurs? etc.

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
Projects
None yet
Development

No branches or pull requests

3 participants