I tried to test email using Preview Summary and that errors out with
Server Error
while trying to load /admin/email/preview-digest.json
Error code: 500 error
My app.yml hasn’t changed. I use Mailgun, and all was well before the update.
(*) Edit: some 12 digests have gone out, but “There are 265 email jobs that failed.” Evidently the failure is sensitive to the content of the digest.
I think some data value seems to be nil or empty when it shouldn’t be - or it shouldn’t matter. Two tracebacks from the logs, one for preview and one for the sidekiq job, I think:
/var/www/discourse/lib/pretty_text.rb:440:in `block in strip_secure_media'
nokogiri-1.10.10/lib/nokogiri/xml/node_set.rb:238:in `block in each'
nokogiri-1.10.10/lib/nokogiri/xml/node_set.rb:237:in `upto'
nokogiri-1.10.10/lib/nokogiri/xml/node_set.rb:237:in `each'
/var/www/discourse/lib/pretty_text.rb:434:in `strip_secure_media'
/var/www/discourse/lib/email/styles.rb:347:in `replace_secure_media_urls'
/var/www/discourse/lib/email/styles.rb:281:in `to_html'
/var/www/discourse/lib/email/renderer.rb:31:in `html'
/var/www/discourse/lib/email/sender.rb:70:in `send'
/var/www/discourse/app/jobs/regular/user_email.rb:70:in `send_user_email'
/var/www/discourse/app/jobs/regular/user_email.rb:25:in `execute'
/var/www/discourse/app/jobs/base.rb:232:in `block (2 levels) in perform'
rails_multisite-2.5.0/lib/rails_multisite/connection_management.rb:76:in `with_connection'
/var/www/discourse/app/jobs/base.rb:221:in `block in perform'
/var/www/discourse/app/jobs/base.rb:217:in `each'
/var/www/discourse/app/jobs/base.rb:217:in `perform'
sidekiq-6.1.2/lib/sidekiq/processor.rb:196:in `execute_job'
sidekiq-6.1.2/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'
sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:138:in `block in invoke'
/var/www/discourse/lib/sidekiq/pausable.rb:138:in `call'
sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:140:in `block in invoke'
sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:143:in `invoke'
sidekiq-6.1.2/lib/sidekiq/processor.rb:163:in `block in process'
sidekiq-6.1.2/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_retry.rb:111:in `local'
sidekiq-6.1.2/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq.rb:38:in `block in <module:Sidekiq>'
sidekiq-6.1.2/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/processor.rb:257:in `stats'
sidekiq-6.1.2/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_logger.rb:13:in `call'
sidekiq-6.1.2/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_retry.rb:78:in `global'
sidekiq-6.1.2/lib/sidekiq/processor.rb:124:in `block in dispatch'
sidekiq-6.1.2/lib/sidekiq/logger.rb:10:in `with'
sidekiq-6.1.2/lib/sidekiq/job_logger.rb:33:in `prepare'
sidekiq-6.1.2/lib/sidekiq/processor.rb:123:in `dispatch'
sidekiq-6.1.2/lib/sidekiq/processor.rb:162:in `process'
sidekiq-6.1.2/lib/sidekiq/processor.rb:78:in `process_one'
sidekiq-6.1.2/lib/sidekiq/processor.rb:68:in `run'
sidekiq-6.1.2/lib/sidekiq/util.rb:15:in `watchdog'
sidekiq-6.1.2/lib/sidekiq/util.rb:24:in `block in safe_thread'
Just to note: my update failed when run from the browser, so I did a rebuild from the command line.
(Just in case that means this installation will somehow have got to a different place compared to one which was successfully updated. I have another forum on a different host, which was successfully updated, which isn’t failing to send emails or prepare a Preview Summary.)
I wonder if this could be a workaround: if the problem is the handling of (some) images in the digest emails, and if we’re happy to send out digests temporarily without images, we can set short email length to a very large number, so strip images from short emails will strip out all images.
Edit: no, I tried it and still the sidekiq jobs are piling up. No emails went out during the experiment, despite many jobs rerunning themselves.