-
Notifications
You must be signed in to change notification settings - Fork 240
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
Messages are received four times #75
Comments
Hi @alexattia! Sorry to hear you've bumped up against the same issue. Let's see if we can get it sorted. Can you provide similar information as you did in the cf issue you've referenced -- specifically, the Steps to reproduce/code snippet? |
Of course. Thank you in advance Reproducible in:
Steps to reproduce:
Expected result:I am sending a message to the bot and I am supposed to receive one answer. Actual result:I received 4 times the same answer (3 times in a row and 6 minutes later a fourth time). If I send two different messages, I received two different answers (but with still 3 times for each answer) |
@alexattia Thanks for sharing this! However, it seems the code in |
Sorry for the mistakes in the code. I just edited it. |
@alexattia I tried your code and it doesn't successfully handle requests.
I found that, in this case, the current implementation of Bolt for Python returns either 200 OK or 404 Not Found. It depends on the timing the exception is raised. If the app returns 404 to Slack, Slack retries the same request. Can you check if your app is working as you expect? I will be changing this behavior to avoid confusion in the next patch version. Thanks for sharing this pattern. |
@alexattia I just released a new alpha version including the fix for 404 errors I mentioned above: v0.5.2a0...v0.5.3a0 Please run If you still receive retried events, it may not be an issue on the API client-side. In the case, I'm sorry for bothering you but please contact our developer support agent team: https://my.slack.com/help/requests/new The team helps you out by deeper investigations with your app/workspace information and its server-side logs. |
Sorry for the mistake, Alright, I am testing with the update. I will keep you updated However, with v0.5.2a0, I still received retried events as shown in these logs :
|
@alexattia Hmm, it seems your app always returns 200 OK. Would you mind contacting our support team as I mentioned above? We, Slack SDK maintainers, are unable to help you out by accessing your app/workspace information as this issue tracker is a public place. |
Indeed, with the update, I still have this
Alright, I am sending them a message. |
Hello, |
I see the above in your comment. I guess you're using It's totally fine to use For running a long-lived process, I recommend using a production-ready WSGI server (e.g., gunicorn). Here is a simple Dockerfile using Flask along with Gunicorn. https://github.com/slackapi/bolt-python/blob/v0.5.3a0/samples/google_cloud_run/flask-gunicorn/Dockerfile It may be easier if you use managed services such as Heroku, container services (ECS, etc), or whatever you prefer. |
As I've already answered all questions here, let me close this issue now. Please feel free to write in if you have anything further related to this. |
Hello,
I have a similar error I had with the regular slack client : cf issue .
I switched to bolt in order to solve this issue and it was working for a couple of days but now I received the same message three to four times each time.
When I look at the logs, I have this for the same message:
And when I look at the IP sent, there are different.
Thank you in advance.
The text was updated successfully, but these errors were encountered: