Cannot Send Digest Emails: Jobs::UserEmail Deprecation Notice / No Emails After Enqueue via Rails

Unable to send digest. Digest are enqueuing but not sending in real. I can’t see any email log.

  • I see digest jobs enqueued in Sidekiq
  • No actual digest emails are sent
  • Each job logs:
Deprecation notice: Jobs::UserEmail was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than the ones supplied to `enqueue`. Argument values should be strings, booleans, numbers, or nil (or arrays/hashes of those value types). (deprecated since Discourse 2.9) (removal in Discourse 3.0)
  • No SMTP or Sidekiq process issue is present
  • All non-digest emails (and test emails) send and deliver correctly

Here is full error log
Info:

[privateinvestigator] Deprecation notice: Jobs::UserEmail was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than the ones supplied to `enqueue`. Argument values should be strings, booleans, numbers, or nil (or arrays/hashes of those value types). (deprecated since Discourse 2.9) (removal in Discourse 3.0) 
At (discourse):89:in `block (3 levels) in <main>`

Backtrace

activesupport-8.0.3/lib/active_support/broadcast_logger.rb:218:in `block in dispatch' 
activesupport-8.0.3/lib/active_support/broadcast_logger.rb:217:in `map' 
activesupport-8.0.3/lib/active_support/broadcast_logger.rb:217:in `dispatch' 
activesupport-8.0.3/lib/active_support/broadcast_logger.rb:129:in `warn' 
/var/www/discourse/lib/discourse.rb:1053:in `deprecate' 
/var/www/discourse/app/jobs/base.rb:407:in `enqueue' 
(discourse):89:in `block (3 levels) in <main>'
activerecord-8.0.3/lib/active_record/relation/batches.rb:88:in `each' 
activerecord-8.0.3/lib/active_record/relation/batches.rb:88:in `block in find_each' 
activerecord-8.0.3/lib/active_record/relation/batches.rb:172:in `block in find_in_batches' 
activerecord-8.0.3/lib/active_record/relation/batches.rb:461:in `block in batch_on_unloaded_relation' 
<internal:kernel>:187:in `loop'
activerecord-8.0.3/lib/active_record/relation/batches.rb:434:in `batch_on_unloaded_relation' 
activerecord-8.0.3/lib/active_record/relation/batches.rb:289:in `in_batches' 
activerecord-8.0.3/lib/active_record/relation/batches.rb:171:in `find_in_batches' 
activerecord-8.0.3/lib/active_record/relation/batches.rb:87:in `find_each' 
(discourse):86:in `with_index'
(discourse):86:in `block (2 levels) in <main>'
rails_multisite-7.0.0/lib/rails_multisite/connection_management.rb:203:in `with_connection'
rails_multisite-7.0.0/lib/rails_multisite/connection_management.rb:17:in `with_connection'
(discourse):55:in `block in <main>'
(discourse):54:in `each'
(discourse):54:in `<main>'
irb-1.15.2/lib/irb/workspace.rb:101:in `eval' 
irb-1.15.2/lib/irb/workspace.rb:101:in `evaluate' 
irb-1.15.2/lib/irb/context.rb:591:in `evaluate_expression' 
irb-1.15.2/lib/irb/context.rb:557:in `evaluate' 
irb-1.15.2/lib/irb.rb:201:in `block (2 levels) in eval_input' 
irb-1.15.2/lib/irb.rb:512:in `signal_status' 
irb-1.15.2/lib/irb.rb:193:in `block in eval_input' 
irb-1.15.2/lib/irb.rb:272:in `block in each_top_level_statement' 
<internal:kernel>:187:in `loop'
irb-1.15.2/lib/irb.rb:269:in `each_top_level_statement' 
irb-1.15.2/lib/irb.rb:192:in `eval_input' 
irb-1.15.2/lib/irb.rb:173:in `block in run' 
irb-1.15.2/lib/irb.rb:172:in `catch' 
irb-1.15.2/lib/irb.rb:172:in `run' 
railties-8.0.3/lib/rails/commands/console/irb_console.rb:113:in `start' 
railties-8.0.3/lib/rails/commands/console/console_command.rb:59:in `start' 
railties-8.0.3/lib/rails/commands/console/console_command.rb:8:in `start' 
railties-8.0.3/lib/rails/commands/console/console_command.rb:87:in `perform' 
thor-1.4.0/lib/thor/command.rb:28:in `run' 
thor-1.4.0/lib/thor/invocation.rb:127:in `invoke_command' 
railties-8.0.3/lib/rails/command/base.rb:178:in `invoke_command' 
thor-1.4.0/lib/thor.rb:538:in `dispatch' 
railties-8.0.3/lib/rails/command/base.rb:73:in `perform' 
railties-8.0.3/lib/rails/command.rb:65:in `block in invoke' 
railties-8.0.3/lib/rails/command.rb:143:in `with_argv' 
railties-8.0.3/lib/rails/command.rb:63:in `invoke' 
railties-8.0.3/lib/rails/commands.rb:18:in `<main>' 
/usr/local/lib/ruby/3.3.0/bundled_gems.rb:69:in `require'
/usr/local/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'
bootsnap-1.18.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' 
script/rails:8:in `<top (required)>'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli/exec.rb:59:in `load'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli/exec.rb:59:in `kernel_load'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli.rb:452:in `exec'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor.rb:538:in `dispatch'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli.rb:35:in `dispatch'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli.rb:29:in `start'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/exe/bundle:28:in `block in <top (required)>'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/exe/bundle:20:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'

Have anyone else faced same issue?
How can I fix this?

1 like