-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Empty "state" Value in AppHomeOpened Event Causes Parsing Error #943
Comments
Dug into this some more, the issue seems that slack-go expects the empty state be a nil JSON obj and not an empty JSON array.
You can test this by modifying
|
Sent an email to slack support on this one because between what I'm receiving in responses, what they document, and what their API tester returns - the expected return behavior (nil json obj or empty array) is unclear. Will update once cleaned up. |
Heard back from Slack support, it is a bug.
|
@HunterL Thank you for your investigation. |
Received a note from Slack support that this issue has been fixed. |
Hey there- I am actually seeing this exact behavior, and it started happening out of nowhere mid-testing earlier this morning. Up until recently I had been receiving full view_submission responses with view.state.values containing my submitted text responses. But suddenly I started receiving: "state": { I am incredibly confused because I did not change anything in my original views.open modal. The response JSON... just changed? Happy to share any additional info to help troubleshoot what could have happened here. |
I re-open this issue for investigation. Thanks. |
What happened
&{Cause:parsing Events API event: EventsAPI Error parsing inner event: unmarshalling_error, json: cannot unmarshal array into Go struct field ViewState.view.state.values of type map[string]map[string]slack.BlockAction
The client is recieving the following JSON (as part of a larger event...):
And attempting to marshal it into
Versions
Work Around
Thought I should add an edit on how we're working around this until there is clarity from Slack and we can merge a fix into slack-go
edit: Realized there is some ambiguity on "h.Client.Events". The "h.Client" is of type
*socketmode.Client
The text was updated successfully, but these errors were encountered: