slackapi/bolt-js

Message event payloads missing `team_id` in enterprise on mobile slack clients

Opened this issue · 9 comments

When I type anything in my workspace app from mobile Slack the event that I get the team_id is missing from the event payload but when I type from web/desktop Slack I receive the team_id in the event payload. It used to work on mobile as well 2-3 months back but I don't know what happened suddenly it stopped working.
Can anyone please help as it's a blocker for me?

Reproducible in:

The Slack SDK version:

"slack/events-api": "^2.3.4",
"slack/interactive-messages": "^1.7.1",
"slack/oauth": "^1.4.0",
"slack/logger": "^2.0.0",
"slack/types": "^1.10.0",
"slack/web-api": "^5.15.0",

Node version: 14.21.3

Steps to reproduce:

  1. Create any app in the enterprise grid.
  2. type any message and check the event
  3. The team_id will be missing from it.

Expected result:

We should receive the team_id on the event triggered from the mobile

{ "client_msg_id": "6c564b51-3312-4b83-93cc-7b14e7896bad", "type": "message", "text": "hi", "user": "<user_id>", "ts": "1707921031.568219", "blocks": [ { "type": "rich_text", "block_id": "a8bcU", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "hi" } ] } ] } ], "team": "<team_id>", "user_team": "<user_id>", "source_team": "<team_id>", "user_profile": { "avatar_hash": "ba68d4f1c35f", "image_72": "https://avatars.slack-edge.com/2022-12-06/4469061237205_ba68d4f1c35f2da9553f_72.jpg", "first_name": "<firstName>", "real_name": <real_name>", "display_name": "<name>", "team": "<team_id>", "name": "<name>", "is_restricted": false, "is_ultra_restricted": false }, "channel": "<channelId>", "event_ts": "<event_id>", "channel_type": "im" }

Actual result:

the event from mobile slack
{ "client_msg_id": "0637d92d-1484-4a3e-a0c5-3967ad0a27b5", "type": "message", "text": "Hii", "user": "<user_id>", "blocks": [ { "type": "rich_text", "block_id": "NsxuO", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "Hii" } ] } ] } ], "channel": "<channelId>", "event_ts": "<event_id>", "channel_type": "im" }

Questions:

  1. Why does it only fail in an enterprise grid but not in a non-enterprise grid?
  2. Do I need to upgrade the SDK, if yes will existing things break?

Hi @gs-ppatil - We've gotten reports of a similar vein and I've escalated previous issues internally, and at the moment, the issue seems related to mobile client.

I hate to bounce you around, but since root cause of this behavior isn't related to bolt-js, I would encourage you to report this behavior through the Slack help form.

I am happy to keep this open for now until you see a resolution your end!

Hi @srajiang
I tried to access the form that you've shared but seems like I don't have access to it
getting error
is there any other way to raise the issue ?

Screenshot 2024-02-21 at 4 28 49 PM

Hello @gs-ppatil are you still seeing the same issue with the mobile client? A BE fix has been deployed.

Hi @srajiang, yes we're still facing the issue.
Do we need to change the Slack SDK version (the existing versions are mentioned in this ticket)?
Do you need to remove the app and then add it again?

Whoops @gs-ppatil - I apologize I realized I shared the wrong link, here's the link to the help form.

I'm going to investigate a bit further. I thought perhaps it was related to another separate mobile client issue.

@gs-ppatil - Alright just so I have the details correct:

  1. You're subscribed to message events.
  2. From the mobile client on an enterprise grid, you don't receive the team_id.
  3. From the mobile client on a non-enterprise grid, you DO receive the team_id
  4. You always receive the team ID when not on a mobile client?

Questions for you:

  1. What mobile client are you consistently able to reproduce this with? Android? iOS
  2. Are your mobile clients on the latest supported version of Slack?

Your questions

  1. Do I need to upgrade the SDK, if yes will existing things break?

At this point in time, I don't see a reason why you'd need to upgrade the bolt-js SDK, but this does seems like an issue server-side, possibly with the mobile client.

I do recommend that you fill out that help form in addition to responding this thread with the details I've asked for above instead of responding to this thread. The customer experience team there is REALLY good at reproducing issues, and escalating to the right teams. They'll also be able to connect this issue you're having with any other reports. I'll keep this issue open for others in the community who might also be experiencing this. as well.

Hi @srajiang

  1. We're facing the issue both on Android and IOS
  2. Yes I tried after updating Slack still facing the same issue.

Thanks @gs-ppatil - Since the behavior seems related to the mobile Slack client, I'd recommend filling out the help form with the issue from here.

Thanks, @srajiang for the update. I'll reach out via the above mentioned form