Problems with mailcatcher in dev environment


(Gerhard Schlager) #1

I’ve setup my development environment according to this howto:

Up until now I could receive mails using mailcatcher. Today I noticed that mails sent by Discourse do not work anymore. I see the following error in the Sidekiq dashboard:
Jobs::HandledExceptionWrapper: Wrapped Net::ReadTimeout: Net::ReadTimeout

Sending mails using telnet works and they show up in mailcatcher.
Any thoughts what could be wrong and how I could fix this?

I’m not aware of any changes I made except of pulling Discourse master.


Beginners Guide to Install Discourse on Ubuntu for Development
(Jeff Atwood) #2

Any ideas on this @techapj?


(cpradio) #3

Just want to say I’m having this issue too. I’ve had it happening over a week and thought it was my setup…


(Arpit Jalan) #4

Just tested, can confirm this is happening. Looking into it.


(Gerhard Schlager) #5

I hope you’ll find a solution soon.

Is there a workaround so that I can activate new users in my dev environment? The following doesn’t work since it still expects me to validate the account by clicking on a link in the email I didn’t get. :frowning:

RAILS_ENV=development bundle exec rails c
u = User.last
u.admin = true
u.save

(Robin Ward) #6

I spent some time on this today and confirmed we’re seeing this bug:

https://github.com/sj26/mailcatcher/issues/182

Seems to be a bug in mailcatcher itself. The workaround until they release an update is to run it in the foreground instead (-f option).


Beginners Guide to Install Discourse on macOS for Development
(Robbo) #7

Is there a better fix for this yet? Same issue for me (and solution) as of writing.


(Gerhard Schlager) #8

There’s a new version of mailcatcher which fixes this problem:


(S4 Kh) #9

Mailcatcher is still not working. Even with updated version (0.6.1)

Alternate solution:

  1. Access to your email_tokens table
  2. Copy value in the token column which is in the same row as your username
  3. Paste http://localhost:3000/users/activate-account/your_token_value on your browser address bar
  4. Will able to activate your account

(Gerhard Schlager) #10

Not true. It’s working fine since 0.6.0.
What error are you getting? Is sidekiq running?