postal: Sending error can't modify frozen String
Describe the bug
Once in a while an e-mail is not send and instead we are faced with a FrozenError: can't modify frozen String
error. A manual or automated retry normally fixefs it.
To Reproduce
I have unfortunately not found a way to reproduce it yet. It seems to happen once in a while.
Expected behaviour
Proper sending of the e-mail.
Screenshots
Environment details
Ubuntu 20.04.3, Postal v2.1.2 in Docker
Additional information/context
[9] [2022-09-13T10:27:13.191] INFO -- : [CE3RLMAKUD] Started processing \u001b[34mUnqueueMessageJob\u001b[0m job
[9] [2022-09-13T10:27:13.338] INFO -- : [CE3RLMAKUD] Lock acquired for queued message 1179032
[9] [2022-09-13T10:27:13.969] INFO -- : [CE3RLMAKUD] Found 0 associated messages to process at the same time (batch key: outgoing-hotmail.co.uk)
[9] [2022-09-13T10:27:13.995] INFO -- : [CE3RLMAKUD] [98::11381 1179032] Got queued message with exclusive lock
[9] [2022-09-13T10:27:14.292] INFO -- : [CE3RLMAKUD] [98::11381 1179032] Parsing message content as it hasn't been parsed before
[9] [2022-09-13T10:29:16.534] INFO -- : [CE3RLMAKUD] [98::11381 1179032] Internal error: FrozenError: can't modify frozen String
[9] [2022-09-13T10:29:16.534] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /opt/postal/app/lib/postal/message_db/delivery.rb:53:in `force_encoding'
[9] [2022-09-13T10:29:16.534] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /opt/postal/app/lib/postal/message_db/delivery.rb:53:in `webhook_hash'
[9] [2022-09-13T10:29:16.535] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /opt/postal/app/lib/postal/message_db/delivery.rb:44:in `send_webhooks'
[9] [2022-09-13T10:29:16.535] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /opt/postal/app/lib/postal/message_db/delivery.rb:11:in `create'
[9] [2022-09-13T10:29:16.535] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /opt/postal/app/lib/postal/message_db/message.rb:128:in `create_delivery'
[9] [2022-09-13T10:29:16.535] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /opt/postal/app/app/jobs/unqueue_message_job.rb:419:in `block in perform'
[9] [2022-09-13T10:29:16.535] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /opt/postal/app/app/jobs/unqueue_message_job.rb:30:in `each'
[9] [2022-09-13T10:29:16.535] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /opt/postal/app/app/jobs/unqueue_message_job.rb:30:in `perform'
[9] [2022-09-13T10:29:16.535] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /opt/postal/app/lib/postal/worker.rb:55:in `receive_job'
[9] [2022-09-13T10:29:16.535] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /opt/postal/app/lib/postal/worker.rb:88:in `block in join_queue'
[9] [2022-09-13T10:29:16.536] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /usr/local/bundle/gems/bunny-2.14.4/lib/bunny/consumer.rb:56:in `call'
[9] [2022-09-13T10:29:16.536] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /usr/local/bundle/gems/bunny-2.14.4/lib/bunny/channel.rb:1768:in `block in handle_frameset'
[9] [2022-09-13T10:29:16.536] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /usr/local/bundle/gems/bunny-2.14.4/lib/bunny/consumer_work_pool.rb:108:in `block (2 levels) in run_loop'
[9] [2022-09-13T10:29:16.537] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /usr/local/bundle/gems/bunny-2.14.4/lib/bunny/consumer_work_pool.rb:103:in `loop'
[9] [2022-09-13T10:29:16.537] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /usr/local/bundle/gems/bunny-2.14.4/lib/bunny/consumer_work_pool.rb:103:in `block in run_loop'
[9] [2022-09-13T10:29:16.538] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /usr/local/bundle/gems/bunny-2.14.4/lib/bunny/consumer_work_pool.rb:102:in `catch'
[9] [2022-09-13T10:29:16.538] INFO -- : [CE3RLMAKUD] [98::11381 1179032] /usr/local/bundle/gems/bunny-2.14.4/lib/bunny/consumer_work_pool.rb:102:in `run_loop'
[9] [2022-09-13T10:29:16.549] INFO -- : [CE3RLMAKUD] [98::11381 1179032] Queued message was unlocked
[9] [2022-09-13T10:29:16.668] INFO -- : [CE3RLMAKUD] Finished processing \u001b[34mUnqueueMessageJob\u001b[0m job in 123.477191951s
Related to #1363, but as this one is closed I’m opening a new one.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 21 (2 by maintainers)
Is there a new version release planned for this?
I encountered this issue, and would be great if there is a new release which contains the fix.
In the meantime I patched the image, and pushed a new image, see https://github.com/nicksellen/postal-fix
Thanks for the fix, I ran into this issue after updating to the current release (v2.1.4), for now I have manually patched the fix into the clusters containers, looking forward to the next release to avoid building a custom image.