# Sidekiq: Jobs::UserEmail.delayed\_perform failing for one user

**URL:** https://meta.discourse.org/t/sidekiq-jobs-useremail-delayed-perform-failing-for-one-user/36458
**Category:** Bug
**Created:** [9 בדצמבר,‏ 2015,‏ 2:11am UTC](https://meta.discourse.org/t/sidekiq-jobs-useremail-delayed-perform-failing-for-one-user/36458 "2015-12-09T02:11:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [9 בדצמבר,‏ 2015,‏ 2:11am UTC](https://meta.discourse.org/t/sidekiq-jobs-useremail-delayed-perform-failing-for-one-user/36458/1 "2015-12-09T02:11:42Z")

</div>

Running on latest, and the job appears to only be failing for the one user.

From Sidekiq:

**Job**  
`Jobs::UserEmail.delayed_perform`

**Arguments**  
`{:type=>:user_replied, :user_id=>84, :notification_id=>19276, :current_site_id=>"default"}`

**Error**  
`Jobs::HandledExceptionWrapper: Wrapped ArgumentError: uncaught throw :exception`

From /logs:

**Info** :  
`Job exception: uncaught throw :exception`

**Backtrace** :  
`/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/i18n-0.7.0/lib/i18n/backend/base.rb:37:in `throw' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/i18n-0.7.0/lib/i18n/backend/base.rb:37:in `translate' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/i18n-0.7.0/lib/i18n/backend/fallbacks.rb:38:in `translate' /var/www/discourse/lib/freedom_patches/translate_accelerator.rb:128:in `translate' /var/www/discourse/lib/email/message_builder.rb:100:in `body' /var/www/discourse/lib/email/message_builder.rb:113:in `build_args' /var/www/discourse/lib/email/message_builder.rb:9:in `build_email' /var/www/discourse/app/mailers/user_notifications.rb:323:in `send_notification_email' /var/www/discourse/app/mailers/user_notifications.rb:223:in `notification_email' /var/www/discourse/app/mailers/user_notifications.rb:99:in `user_replied' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/abstract_controller/base.rb:198:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/abstract_controller/callbacks.rb:20:in `block in process_action' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:88:in ` __run_callbacks__' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:81:in `run_callbacks' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/abstract_controller/callbacks.rb:19:in `process_action' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/abstract_controller/base.rb:137:in `process' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionview-4.2.4/lib/action_view/rendering.rb:30:in `process' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.4/lib/action_mailer/base.rb:596:in `block in process' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in `block in instrument' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in `instrument' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.4/lib/action_mailer/base.rb:593:in `process' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.4/lib/action_mailer/base.rb:584:in `initialize' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.4/lib/action_mailer/message_delivery.rb:25:in `new' /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.4/lib/action_mailer/message_delivery.rb:25:in ` __getobj__' /usr/local/lib/ruby/2.0.0/delegate.rb:70:in `method_missing' /var/www/discourse/lib/email/sender.rb:26:in `send' /var/www/discourse/app/jobs/regular/user_email.rb:69:in `execute' /var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'`

I don’t have further info on hand, but I believe I’ve seen this issue with this user before. They have a valid email address and can receive emails from Discourse generally, but this job doesn’t want to go through.

Insofar as it’s just the one user and (maybe) the one notification I’m not hugely worried, but I wanted to log this in and see if there’s anything I should/can do to remedy the situation. Thanks again for the time on this. 🙂

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [9 בדצמבר,‏ 2015,‏ 2:13am UTC](https://meta.discourse.org/t/sidekiq-jobs-useremail-delayed-perform-failing-for-one-user/36458/2 "2015-12-09T02:13:00Z")

</div>

this throwing of :exception is super duper weird … not sure why we are doing that and not raising like you are supposed to

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [9 בדצמבר,‏ 2015,‏ 6:12am UTC](https://meta.discourse.org/t/sidekiq-jobs-useremail-delayed-perform-failing-for-one-user/36458/3 "2015-12-09T06:12:18Z")

</div>

This is kind of tricky but I think this fixes it: cc @eviltrout

[https://github.com/discourse/discourse/commit/b8a47a11290584254c9a1a370b98c3cc3cbf633e](https://github.com/discourse/discourse/commit/b8a47a11290584254c9a1a370b98c3cc3cbf633e)

---

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [9 בדצמבר,‏ 2015,‏ 12:17pm UTC](https://meta.discourse.org/t/sidekiq-jobs-useremail-delayed-perform-failing-for-one-user/36458/4 "2015-12-09T12:17:42Z")

</div>

The failing job passed after updating. Thanks! ☀

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [11 בדצמבר,‏ 2015,‏ 6:13am UTC](https://meta.discourse.org/t/sidekiq-jobs-useremail-delayed-perform-failing-for-one-user/36458/5 "2015-12-11T06:13:27Z")

</div>

This topic was automatically closed after 2 days. New replies are no longer allowed.
