Undefined method `downcase' for nil:NilClass when processing mail

I’m getting (using ~ yesterdays build):

when importing a specific email. I can post the email privately if needed:

Unrecognized error type (NoMethodError: undefined method `downcase' for nil:NilClass) when processing incoming email

Backtrace:
  /var/www/discourse/lib/email/receiver.rb:254:in `parse_from_field'
  /var/www/discourse/lib/email/receiver.rb:378:in `process_forwarded_email'
  /var/www/discourse/lib/email/receiver.rb:324:in `process_destination'
  /var/www/discourse/lib/email/receiver.rb:102:in `block in process_internal'
  /var/www/discourse/lib/email/receiver.rb:100:in `yield'
  /var/www/discourse/lib/email/receiver.rb:100:in `yield'
  /var/www/discourse/lib/email/receiver.rb:100:in `each'
  /var/www/discourse/lib/email/receiver.rb:100:in `each'
  /var/www/discourse/lib/email/receiver.rb:100:in `each'
  /var/www/discourse/lib/email/receiver.rb:100:in `each'
  /var/www/discourse/lib/email/receiver.rb:100:in `each'
  /var/www/discourse/lib/email/receiver.rb:100:in `each'
  /var/www/discourse/lib/email/receiver.rb:100:in `process_internal'
  /var/www/discourse/lib/email/receiver.rb:43:in `process!'
  /var/www/discourse/lib/email/processor.rb:17:in `process!'
  /var/www/discourse/lib/email/processor.rb:11:in `process!'
  /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:25:in `process_popmail'
  /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:43:in `block (2 levels) in poll_pop3'
  /usr/local/lib/ruby/2.3.0/net/pop.rb:689:in `block in delete_all'
  /usr/local/lib/ruby/2.3.0/net/pop.rb:688:in `each'
  /usr/local/lib/ruby/2.3.0/net/pop.rb:688:in `delete_all'
  /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:42:in `block in poll_pop3'
  /usr/local/lib/ruby/2.3.0/net/pop.rb:532:in `start'
  /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:41:in `poll_pop3'

/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/logster-1.2.5/lib/logster/logger.rb:76:in `add_with_opts'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/logster-1.2.5/lib/logster/logger.rb:37:in `add'
/usr/local/lib/ruby/2.3.0/logger.rb:507:in `error'
/var/www/discourse/lib/email/processor.rb:84:in `handle_failure'
/var/www/discourse/lib/email/processor.rb:27:in `rescue in process!'
/var/www/discourse/lib/email/processor.rb:15:in `process!'
/var/www/discourse/lib/email/processor.rb:11:in `process!'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:25:in `process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:43:in `block (2 levels) in poll_pop3'
/usr/local/lib/ruby/2.3.0/net/pop.rb:689:in `block in delete_all'
/usr/local/lib/ruby/2.3.0/net/pop.rb:688:in `each'
/usr/local/lib/ruby/2.3.0/net/pop.rb:688:in `delete_all'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:42:in `block in poll_pop3'
/usr/local/lib/ruby/2.3.0/net/pop.rb:532:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:41:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:16:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'
1 Like

Any chances you could send me the raw version of said email via PM?

3 Likes

The e-mail is missing a From: address. I’ve seen that problem when sending hand-crafted test e-mails and forgetting to put in a From: line in the headers.

3 Likes

I sent @zogstrip the mail, it did have a From: field.

3 Likes