"arguments expected to be an Array of individual string args" when sending mail for mastodon

I’m not sure which version started the issue, but I am using YNH 11.1.19 and Mastodon 4.1.2, on Debian 11. I noticed mail stopped working and have been getting lots of errors below:

May 11 07:11:24 yunohost bundle[503]: [ActiveJob] [ActionMailer::MailDeliveryJob] [0ebc52a8-deaf-4cfc-977d-429348b45a0f] Error performing ActionMailer::MailDeliveryJob (Job ID: 0ebc52a8-deaf-4cfc-977d-429348b45a0f) from Sidekiq(mailers) in 45.22ms: ArgumentError (:arguments expected to be an Array of individual string args):
May 11 07:11:24 yunohost bundle[503]: 2023-05-11T11:11:24.803Z pid=503 tid=3bz3z WARN: {"context":"Job raised exception","job":{"retry":true,"queue":"mailers","class":"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper","wrapped":"ActionMailer::MailDeliveryJob","args":[{"job_class":"ActionMailer::MailDeliveryJob","job_id":"0ebc52a8-deaf-4cfc-977d-429348b45a0f","provider_job_id":null,"queue_name":"mailers","priority":null,"arguments":["NotificationMailer","follow","deliver_now",{"args":[{"_aj_globalid":"gid://mastodon/Account/1"},{"_aj_globalid":"gid://mastodon/Notification/6104"}],"_aj_ruby2_keywords":["args"]}],"executions":0,"exception_executions":{},"locale":"en","timezone":"UTC","enqueued_at":"2023-04-28T02:57:28Z"}],"jid":"081ba507a1a964145aad7272","created_at":1682650648.2956002,"enqueued_at":1683803484.7293317,"error_message":":arguments expected to be an Array of individual string args","error_class":"ArgumentError","failed_at":1682650774.2855668,"retry_count":22,"retried_at":1683569141.8636749}}

I get the same error when I run something similar to below (when in my /var/www/mastodon/live folder), where this has previously worked for me when I need to test email functionality:

PATH=/opt/rbenv/versions/mastodon/bin
RAILS_ENV=production bundle exec rails c

m = UserMailer.new.mail to:'test@mydomain.com', subject: 'test', body: 'hello'
m.deliver

Perhaps some sort of ruby or rails incompatibility? I was not sure if this is a YNH or mastodon issue. Thanks!

For anyone having this issue, I was able to resolve it using this blog post: Incompatibility rails 5.2 and mail gem: ArgumentError (:arguments expected to be an Array of individual string args) – Gamecreatures' Blog

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.