Closed briankurilko closed 1 year ago
Hi @briankurilko, could you double-check if you've configured Interactivity & Shortcuts section in the app configuration page (meaning https://api.slack.com/apps/{you app ID here}
). You need to enable the interactivity and set a valid Request URL to handle interactive user action requests. The "dispatch_failed" error code indicates Slack API server does not know where to send a request.
Hi @seratch, the following is a screenshot of my Interactivity & Shortcuts page:
Also, here's what the configuration for the (working) slash command looks like:
As you can see, both the slash command and the interactivity and shortcuts request URL are the same (https://outpost.labs.ford.com/slack/events). I'm unsure why it works for slash commands, but does not for interactivity commands.
Here is a simple working example app for Spring Boot 3 users. Checking the difference in your app may be helpful to figure the cause out: https://github.com/slackapi/java-slack-sdk/tree/main/bolt-spring-boot-examples/spring-boot-3
@seratch one thing we tried was deploying our application to a separate server running on Pivotal Cloud Foundry instead of GCP - when we did this, all block actions worked. Similarly, when using ngrok to test our app, the block actions work as well. Could there be some kind of weird routing thing that Slack is trying to do when trying to connect to GCP application?
@briankurilko Some aspect in your GCP environment may prevent your app from properly receiving the request data, but I cannot guess anything so far. We are unable to help you out for GCP-specific questions. Please head to their communities or forum spaces. It seems that I don't have anything further I can do for you. Would you mind if I close this issue now?
@seratch Ok sure, you can close it.
I have a slack app that displays a button with a block action after running a slash command. The slash command works, but the block action returns a 403. The request that the button push makes does not make it to my Java Spring Boot Bolt servlet, it receives a 403 without ever making a request to my Java application.
When running Slack from within the browser, I receive the following error in the network tab when I try to execute the slack action:
Does anyone know why this might be happening? Not sure if it matters, but I'm also running this app behind a corporate proxy (I've set up the correct
http.proxyHost
,http.proxyPort
, andhttp.nonProxyHosts
system properties to work with the proxy with the Bolt API, though).The Slack SDK version
Java Runtime version
OS info
Spring Boot versions:
Steps to reproduce:
Here's my code for building the view:
Here's my code for registering the button action:
And here's my code for the event handler itself:
Lastly, here is my servlet code, which should be the entrypoint of my project:
Expected result:
I expect the button to make a call to the block action I've configured in my Spring Boot backend and do the block action.
Actual result:
A call is never made to my Spring Boot backend (at least for the block action - the slash action works), and by looking at the network tab, the request fails with the following payload:
Does anyone have any ideas as to why this is happening?