no_email_found is still a problem

AI-generated summary

Users Sander78 and clay reported a recurring bug where emails, specifically digest and user_mentioned types, fail to send due to a no_email_found error, despite the system running the latest version. The issue began on January 28, affecting standard users while admin emails remained functional. zogstrip investigated the discrepancy between production and development environments and added logging to trace the error. After a temporary fix was deployed, clay reported the issue ceased for 12+ hours, but Sander78 noted it persisted. zogstrip identified the root cause: when insufficient topics exist for a digest, a NullMail object is passed to the Email Sender class, a behavior incompatible with changes in Rails 4.2.0. A patch was applied to handle this scenario. Sander78 questioned if the fix also resolved user_posted failures. zogstrip investigated further, and by post 12, Sander78 confirmed that mailing_list and user_posted emails were successfully sending, suggesting the primary issues were resolved, though digest testing was still pending.

@zogstrip, I still have many mails not being sent because of no_email_found as reported earlier here:

1 „Gefällt mir“

1/ Are you running latest?

2/ What types of emails are not being sent?

Yes, running latest.

Types are digest and user_mentioned (there are no other types so far). However, mails to me (admin) do get through. This has been happening starting 28 January. The day before everything was fine.

I am also seeing A LOT of this.

2 „Gefällt mir“

I can definitely see that happening in production but not in development mode. So I added more logs to try to identify the source of the error

https://github.com/discourse/discourse/commit/4ad5660615a4026b332a137a3977cd4a0d6e3b63

Can you guys update and ping me in ~ 6 hours (or until the next digest job) with more info?

4 „Gefällt mir“

12+ hours on, I haven’t seen the issue again. I’ll keep checking.

2 „Gefällt mir“

@zogstrip, it happened many times again. No idea where you logged it, though. But you can use your admin login to see for yourself on my instance, if you like.

1 „Gefällt mir“

Thanks for your cooperation, I figured it out :wink: Turns out that when there are not enough topics to send a digest we pass a “NullMail” object to the “EmailSender” class. It didn’t help that the API changed in rails 4.2.0…

https://github.com/discourse/discourse/commit/52a66826907bebe81b13ea6bd417f13a05443507

3 „Gefällt mir“

Great that you found that out! But… it also happens with user_posted. Does your fix fix that as well?

I only checked for digest, checking now for user_posted (it might be another issue, but with the same result).

1 „Gefällt mir“

Not sure how to reproduce for user_posted. Might have been already fixed. Let me know if it happens again.

1 „Gefällt mir“

I think they’ve all been fixed. I just saw a whole bunch of mailing_list and user_posted mails go out successfully. No digests yet, btw…

1 „Gefällt mir“

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