postal icon indicating copy to clipboard operation
postal copied to clipboard

Postal server cannot send webhook API calls

Open belghitioth opened this issue 3 years ago • 4 comments

Describe the bug

Postal server cannot send webhook API calls.

To Reproduce

  1. Configure a Webhook endpoint

Screenshot from 2023-04-03 11-55-38

  1. Send an email through the UI or using SMTP Protocol

Screenshot from 2023-04-03 11-57-13

  1. Check Outgoing Messages Tab from Messages page

Screenshot from 2023-04-03 11-54-25

  1. There is an error after sending the email related to the webhook

Screenshot from 2023-03-30 11-00-45

  1. The webhook API call is not sent

Expected behaviour

Postal server is sending an API call to the endpoint configured in Postal UI with success.

Screenshots

Screenshot from 2023-03-30 11-00-45

Environment details

  • OS: Ubuntu
  • Browser : Chrome
  • Version : 110
  • Type : Desktop

Additional information/context

I checked the logs of postal-worker container and it seems to be related to the line 41 on app/models/webhook_request.rb when the payload is being serialized by Hash:

server.webhook_requests.create!(:event => event, :payload => payload, :webhook => webhook, :url => webhook.url)

I found this fix : https://stackoverflow.com/questions/72970170/upgrading-to-rails-6-1-6-1-causes-psychdisallowedclass-tried-to-load-unspecif

It seems to be related to the latest version of Postal.

belghitioth avatar Apr 03 '23 10:04 belghitioth

see also #2397

willpower232 avatar Apr 03 '23 11:04 willpower232

I've just tested and I can't reproduce this in the current version. It may have been fixed by the recent Rails 6.1 upgrade. Can you re-test? If there's still an issue, can you confirm the configuration of the webhook?

catphish avatar Apr 11 '23 19:04 catphish

Hello, I created the issue when it occurs after the new release of postal 2.1.3 two weeks ago Then it has been rollbacked to version 2.1.2 and it was ok. Didn't try yet with the latest new release 2.1.3 :) I will let you know

belghitioth avatar Apr 12 '23 09:04 belghitioth

Can't reproduce this

adamcooke avatar Jan 30 '24 11:01 adamcooke