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

Message event payloads missing team_id in enterprise on mobile slack clients #2062

Open
gs-ppatil opened this issue Feb 16, 2024 · 15 comments
Open
Labels
auto-triage-skip Prevent this issue from being closed due to lack of activity bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented server-side-issue

Comments

@gs-ppatil
Copy link

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?
@srajiang
Copy link
Member

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!

@srajiang srajiang added server-side-issue auto-triage-skip Prevent this issue from being closed due to lack of activity and removed untriaged labels Feb 19, 2024
@gs-ppatil
Copy link
Author

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

@srajiang
Copy link
Member

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

@gs-ppatil
Copy link
Author

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?

@srajiang
Copy link
Member

srajiang commented Feb 22, 2024

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.

@srajiang
Copy link
Member

@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.

@srajiang srajiang changed the title My workspace App in not responding in case of Mobile Slack App but working fine with web/Desktop Slack. Message event payloads missing team_id in enterprise on mobile slack clients Feb 23, 2024
@gs-ppatil
Copy link
Author

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.

@srajiang
Copy link
Member

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.

@gs-ppatil
Copy link
Author

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

@jbwc
Copy link

jbwc commented Jun 11, 2024

Having the same issue

@kumarahul98
Copy link

facing the same issue

@filmaj filmaj added the bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented label Sep 15, 2024
@devstein
Copy link

@filmaj @srajiang is there a recommended workaround for this issue? Is there another way to fetch the team_id from event metadata?

@filmaj
Copy link
Contributor

filmaj commented Sep 17, 2024

If you're being affected by this issue, please email [email protected] and let them know you are upvoting the bug to be addressed. Sorry, on the SDK side there is not much we can do.

@devstein
Copy link

For others running into this issue

The greater body payload does still include the Team ID so you should be able to grab from that level. You may need to reach out to the developers of that to see if it can be configured to output more of the body than just the event object.

-From Slack Support

@sersorrel
Copy link

This also seems to prevent the user_profile from being included in messages from mobile, which means an extra users.info call is required to get things like "the display name of the message author".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-triage-skip Prevent this issue from being closed due to lack of activity bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented server-side-issue
Projects
None yet
Development

No branches or pull requests

7 participants