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

ActionsBlock containing StaticMultiSelectElement fails with API error #1631

Open
chet-manley opened this issue Jan 10, 2025 · 4 comments
Open

Comments

@chet-manley
Copy link

chet-manley commented Jan 10, 2025

The Slack SDK version

slack-bolt==1.18.1
slack_sdk==3.33.1

Python runtime version

Python 3.11.10

OS info

Linux 1557001f30f5 6.8.4-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 4 20:45:21 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Steps to reproduce:

Likely related issue: slackapi/node-slack-sdk#1299

Attempt to open a modal View (client.views_open(...)) with view's blocks containing an ActionsBlock, which itself contains an StaticMultiSelectElement.
or
Using https://app.slack.com/block-kit-builder modal preview or home preview options, insert this for blocks:

	"blocks": [
		{
			"type": "actions",
			"elements": [
				{
					"type": "multi_static_select",
					"options": [
						{
							"text": {
								"type": "plain_text",
								"text": "*plain_text option 0*",
								"emoji": true
							},
							"value": "value-0"
						},
						{
							"text": {
								"type": "plain_text",
								"text": "*plain_text option 1*",
								"emoji": true
							},
							"value": "value-1"
						},
						{
							"text": {
								"type": "plain_text",
								"text": "*plain_text option 2*",
								"emoji": true
							},
							"value": "value-2"
						}
					],
					"action_id": "multi_static_select-action"
				}
			]
		}
	]

Dynamic link to Block Kit Builder with this payload.

Expected result:

Slack (or Block Kit Builder) renders a modal with a multiselect element.
This is supported per documentation: https://api.slack.com/reference/block-kit/block-elements#multi_select
Works with block types: Actions

Actual result:

No errors when creating new ActionsBlock with StaticMultiSelectElement block, but the request returns an API error:

SlackApiError: The request to the Slack API failed. (url: https://xxx.enterprise.slack.com/api/views.open, status: 200)
The server responded with: {'ok': False, 'error': 'invalid_arguments', 'response_metadata': {'messages': ['[ERROR] unsupported element: multiselect [json-pointer:view/blocks/4]']}}

or if using Block Kit Builder:
No error text is displayed, but an alert icon is rendered instead of a modal.
image

Requirements

For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

@seratch
Copy link
Member

seratch commented Jan 14, 2025

Hi @chet-manley, thank you for taking the time to report this and we're sorry for the disruption. It seems the server-side rendering logic may have some issues with this pattern. Since this issue tracker is for the client-side SDKs, we're unable to track this type of bug reports here.

We also will escalate this issue internally, but could you please contact our customer support team via /feedback in your corporate Slack workspace or at https://my.slack.com/help/requests/new ? They'll relay the issue to relevant backend engineering teams quickly. It'd be appreciated if you could understand this.

@chet-manley
Copy link
Author

OK, I have opened a support request as you described.

@chet-manley
Copy link
Author

chet-manley commented Jan 16, 2025

The Slack backend engineering team has confirmed that any *MultiSelectElement will not work inside an ActionsBlock. Given this information, would it be possible to make doing this raise an exception when creating an ActionsBlock?

Edit: Slack Support Request #5956154

@seratch
Copy link
Member

seratch commented Jan 17, 2025

Thanks for sharing this. Indeed, it's technically feasible to add some validations on this client SDK side like you suggest, but for this use case, we prefer having input validation on the servert-side instead. We will communciate with the teams to make the enhancement happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants