-
Notifications
You must be signed in to change notification settings - Fork 393
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
link_shared does not seem to be automatically calling ack() #2144
Comments
Hey @achlee888 👋 Does your |
Yes, we do see link_shared events being received in the logs |
Oh interesting... I remember finding something about Could you check that these unfurl domains match what you'd expect? Not sure if that's the cause, but this might've happened 😬 |
Yes, failure conditions (not responding to ack within 3 seconds) is what is causing our events being turned off. The unfurl domains are set up correctly (works when testing individually and our customers are using the feature). I believe the issue here is that slack is sending us link_shared events, and we are using app.event. However, the interface doesn't allow us to ack() directly from within app.event. This us unlock app.view or app.action where the callback params have ack available. |
Meaning I tested this on both the latest version [DEBUG] socket-mode:SocketModeClient:0 Received a message on the WebSocket: {"envelope_id":"662045ef-0c07-4b1f-9bdc-11bf88590d14","payload":{"token":"example","team_id":"T01234","api_app_id":"A01234","event":{"type":"link_shared","user":"U01234","channel":"C01234","message_ts":"1719027000.313859","links":[{"url":"https:\/\/example.com","domain":"example.com"}],"source":"conversations_history","unfurl_id":"C01234.1719027000.313859.0123456789","is_bot_user_member":true,"event_ts":"1719027000.729587"},"type":"event_callback","event_id":"Ev0799PVABCD","event_time":1719027000,"authorizations":[{"enterprise_id":null,"team_id":"T01234","user_id":"U01234","is_bot":true,"is_enterprise_install":false}],"is_ext_shared_channel":false,"event_context":"4-example"},"type":"events_api","accepts_response_payload":false,"retry_attempt":0,"retry_reason":""}
[DEBUG] socket-mode:SocketModeClient:0 Calling ack() - type: events_api, envelope_id: 662045ef-0c07-4b1f-9bdc-11bf88590d14, data: undefined Is it possible that just the first log is appearing in logs? Or do logs only show the message that an "incoming event was not acknowledged within 3 seconds"? |
Yes, as far as we can tell app.event is handling things fine and everything works until Slack API disables our events. When we had followed up they said link_shared is causing these. Not sure how these are happening since from our end in our service logs, everything looks ok. How do we enable debug logging? That could be helpful. All we know is that link_shared supposedly is having a high failure rate. But we can't find out where and the one area we can think of is ack's not happening automatically. The handler calls a service that generates an image that takes more than 3 seoncds...but that shouldn't matter if ack's are happening immediately. |
I'm not so sure what might be causing this either - the image generation doesn't sound like it'd be a problem 📸 🤕 Using debug logs for a few attempts with the event might reveal something helpful! I'd be interested if you find things that seem strange or odd things otherwise 👀 const { App, LogLevel } = require('@slack/bolt');
const app = new App({
...
logLevel: LogLevel.DEBUG,
}); |
Curious. Is it normal for POST request body to the events endpoint to be I'm getting when i set
After the second one, then we see our logs on our |
@bsoe003 an
This sounds good to me! The |
👋 @zimeg,
I had to manually override |
👋 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. |
Recently Slack API has been turning off events for our app. Following up with developer support, they indicated that link_shared is timing out. Additionally, looking at our error logs, we do see these errors:
According to the bolt-js documentation, Event API events should automatically be acknowledged. There's also no way to ack from within the event listener callback.
@slack/bolt
version3.7.0
Your
App
and Receiver ConfigurationNode.js runtime version
v18.19.1
Steps to reproduce:
(Share the commands to run, source code, and project settings)
Expected result:
ack() should be handled automatically
Actual result:
Seeing ack timeout errors:
The text was updated successfully, but these errors were encountered: