Most email notifications not being sent due to events plugin

I’m back, with more trouble to be caused.

After updating to v.2.4.0.beta2+183, email notifications seem to have hit shrunk & email jobs are failing right & left. We are using mailgun.org as an smtp server & this issue began right after we upgraded to this new version.I’m seeing the errors in the Sidekiq logs.

Is this a known issue or is there anything I can provide to get help troubleshooting?

Are you using any plugins? Check your logs for errors.

Can you provide a copy of the logs here? Make sure to remove any passwords or API keys before posting.

This is the most recent log error titled “Job exception: undefined method `with_view_paths’ for UserNotifications::UserNotificationRenderer:Class Did you mean? with_options

What’s interesting is a small amount of emails are still being sent out, but I believe notifications are not.

/var/www/discourse/app/mailers/user_notifications.rb:599:in `send_notification_email'
/var/www/discourse/plugins/discourse-events/plugin.rb:579:in `send_notification_email'
/var/www/discourse/app/mailers/user_notifications.rb:450:in `notification_email'
/var/www/discourse/app/mailers/user_notifications.rb:300:in `user_posted'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.3/lib/abstract_controller/base.rb:194:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.3/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:98:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.3/lib/abstract_controller/callbacks.rb:41:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.3/lib/abstract_controller/base.rb:134:in `process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionmailer-5.2.3/lib/action_mailer/rescuable.rb:25:in `block in process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionmailer-5.2.3/lib/action_mailer/rescuable.rb:17:in `handle_exceptions'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionmailer-5.2.3/lib/action_mailer/rescuable.rb:24:in `process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionview-5.2.3/lib/action_view/rendering.rb:32:in `process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionmailer-5.2.3/lib/action_mailer/base.rb:607:in `block in process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionmailer-5.2.3/lib/action_mailer/base.rb:606:in `process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionmailer-5.2.3/lib/action_mailer/message_delivery.rb:123:in `block in processed_mailer'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionmailer-5.2.3/lib/action_mailer/message_delivery.rb:122:in `tap'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionmailer-5.2.3/lib/action_mailer/message_delivery.rb:122:in `processed_mailer'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionmailer-5.2.3/lib/action_mailer/message_delivery.rb:29:in `__getobj__'
/usr/local/lib/ruby/2.6.0/delegate.rb:80:in `method_missing'
/var/www/discourse/lib/email/sender.rb:37:in `send'
/var/www/discourse/app/jobs/regular/user_email.rb:63:in `execute'
/var/www/discourse/app/jobs/base.rb:232:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rails_multisite-2.0.7/lib/rails_multisite/connection_management.rb:63: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'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:192:in `execute_job'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:165:in `block (2 levels) in process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
/var/www/discourse/lib/sidekiq/pausable.rb:138:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:164:in `block in process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:137:in `block (6 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/job_retry.rb:109:in `local'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:136:in `block (5 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq.rb:37:in `block in <module:Sidekiq>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:132:in `block (4 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:250:in `stats'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:127:in `block (3 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/job_logger.rb:8:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:126:in `block (2 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/job_retry.rb:74:in `global'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:125:in `block in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/logging.rb:48:in `with_context'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/logging.rb:42:in `with_job_hash_context'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:124:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:163:in `process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:83:in `process_one'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:71:in `run'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/util.rb:16:in `watchdog'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/util.rb:25:in `block in safe_thread'

Most Sidekiq logs show the errors below:

  • Jobs::HandledExceptionWrapper: Wrapped NoMethodError: undefined method `with_view_paths’ for UserNotifications::UserNotificationRenderer:Class Did you mean? with_options
  • Jobs::HandledExceptionWrapper: Wrapped RuntimeError: Not implemented.

We have a few plugins, and they are up to date. I’m not seeing any error logs that points to them being the culprit. I’ve also had another issue related to this specific version of Discourse, but that was identified as a bug already.

Try removing the events plugin.

2 Likes

So after that, it ended up working. Thanks.

1 Like