bolt-js
bolt-js copied to clipboard
Conversation not found error while using breakpoints
Description
Describe your issue here.
Debugging Action listener's with breakpoints throws following error in a Node JS app:
Logs:
Exception has occurred: Error: Conversation not found
at /home/user/Mounts/app/node_modules/@slack/bolt/src/conversation-store.ts:41:14
at new Promise (<anonymous>)
at MemoryStore.get (/home/user/Mounts/app/node_modules/@slack/bolt/src/conversation-store.ts:31:12)
at Array.<anonymous> (/home/user/Mounts/app/node_modules/@slack/bolt/src/conversation-store.ts:65:44)
at invokeMiddleware (/home/user/Mounts/app/node_modules/@slack/bolt/src/middleware/process.ts:23:47)
at Object.next (/home/user/Mounts/app/node_modules/@slack/bolt/src/middleware/process.ts:24:21)
at Array.<anonymous> (/home/user/Mounts/app/node_modules/@slack/bolt/src/middleware/builtin.ts:320:16)
at invokeMiddleware (/home/user/Mounts/app/node_modules/@slack/bolt/src/middleware/process.ts:23:47)
at processMiddleware (/home/user/Mounts/app/node_modules/@slack/bolt/src/middleware/process.ts:35:10)
at App.processEvent (/home/user/Mounts/app/node_modules/@slack/bolt/src/App.ts:996:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /home/user/Mounts/app/node_modules/@slack/bolt/src/receivers/HTTPReceiver.ts:476:9
What type of issue is this? (place an x
in one of the [ ]
)
- [x ] bug
- [ ] enhancement (feature request)
- [ ] question
- [ ] documentation related
- [ ] example code related
- [ ] testing related
- [ ] discussion
Requirements (place an x
in each of the [ ]
)
- [ x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [ x] I've read and agree to the Code of Conduct.
- [ x] I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
package version: "@slack/bolt": "^3.11.3"
node version: 18.2.0
OS version(s): Windows Host - Remote Development - POS OS (Linux) dev server
Steps to reproduce:
- Place a break point inside a listener that is exposed to the slack app
- Start debugging and trigger a action on Slack App, which will hit the listener function
- Error Displayed
note: This issue is not seen if breakpoints/debugging is not used or if debugged using simple console log statements
Expected result:
What you expected to happen : No exceptions should be thrown
Actual result:
What actually happened: Exception thrown
Attachments:
see above for logs Logs, screenshots, screencast, sample project, funny gif, etc.
Hi @rexdavid! We are discussing amongst maintainers about whether to throw this exception for this pattern, or making the conversationStore a noop.
Not entirely sure why you're seeing the exception when debugging with a breakpoint and not when allowing the code to execute normally, but we've a theory that there's a timing-related codepath that causes the exception to be thrown when breakpoints are used. Where have you placed your breakpoint? And for context, are you trying to use the conversation store in this case or trying to debug another issue?
@srajiang : Thanks for reaching out. I also think its timing related because it works when I am not in debug mode. I was not debugging any slack related code, it was an app logic related issue. Also, It doesn't matter where I put the break points, as long as the break point is after the slack action listener code is triggered, I see the exception
👋 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.
As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.