Open dmonn opened 2 years ago
We are having the same issue. The problem is that rocketchat is awaiting content (as mentioned in the logs), see https://github.com/RocketChat/Rocket.Chat/blob/3b35f8bee550d6936a73e601146af7fb0c5739b8/apps/meteor/app/integrations/server/lib/triggerHandler.js#L780-L784 and https://github.com/RocketChat/Rocket.Chat/blob/3b35f8bee550d6936a73e601146af7fb0c5739b8/apps/meteor/app/integrations/server/lib/triggerHandler.js#L845-L869. To my knowledge this is in contrast to all standards. Webhooks should not be required to return any content.
This problem drives me mad.
I had the same problem with integrating rasa bot with rocketchat, the rasa bot answers multiple times, depending on the number of retry count set on "Outgoing Webhook Integration" in the Advanced Settings.
The problem was earlier mentioned in the forum here: https://forums.rocket.chat/t/rasa-rocketchat-integration-comms-issue/13558/11 https://forums.rocket.chat/t/rocket-chat-rasa-integration-rocket-chat-giving-multiple-times-same-response/13903
Took me hours to understand that disabling retry failed calls solves this issue.
Sending status 200 with body "{}" seems to solve the problem.
Any content will workaround the problem, but the fix is to have rocketchat accept empty bodies.
Description:
When turning on Webhook retry, the Integration will send retry attempts even if the first response was 200 / empty.
I see that the logs have received an empty response. It is not logged which status code it has received.
However in my own app, the signal was received and processed correctly, returned with status 200.
Steps to reproduce:
Expected behavior:
There should be no further retries after receiving a non-error response.
Actual behavior:
Request is retried three times.
Server Setup Information:
Docker
Client Setup Information
Desktop App or Browser Version: Browser, Chrome 99