Defect #15267

Error when receiving pop email: undefined method `string' for plain/text

Added by Sang Tan about 9 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email receiving
Target version:-
Resolution: Affected version:2.2.3

Description

Error occur on receiving email with attachment. I am not sure the cause. Some emails made errors, some didn't.

I attach the email with error.

Environment:
Redmine version 2.2.3.stable
Ruby version 1.9.3 (i686-linux)
Rails version 3.2.12
Database adapter Mysql2

Attachments:
- Attached file caused error
- Mail header

Log:

** Invoke redmine:email:receive_pop3 (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:email:receive_pop3
rake aborted!
undefined method `string' for plain/text; name=applog-2013.11.05-t0lte.gz:Mail::UnstructuredField
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/field.rb:133:in `method_missing'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/parts_list.rb:48:in `get_order_value'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/parts_list.rb:38:in `block in sort!'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/parts_list.rb:30:in `sort'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/parts_list.rb:30:in `sort'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/parts_list.rb:34:in `sort!'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/message.rb:1690:in `ready_to_send!'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/message.rb:1707:in `encoded'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/actionmailer-3.2.12/lib/action_mailer/base.rb:434:in `set_payload_for_mail'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/actionmailer-3.2.12/lib/action_mailer/base.rb:403:in `block in receive'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/notifications.rb:123:in `block in instrument'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/notifications.rb:123:in `instrument'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/actionmailer-3.2.12/lib/action_mailer/base.rb:401:in `receive'
/home/linhdinh/redmine-2.2.3-0/apps/redmine/htdocs/app/models/mail_handler.rb:44:in `receive'
/home/linhdinh/redmine-2.2.3-0/apps/redmine/htdocs/lib/redmine/pop3.rb:39:in `block (2 levels) in check'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/1.9.1/net/pop.rb:665:in `each'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/1.9.1/net/pop.rb:665:in `each_mail'
/home/linhdinh/redmine-2.2.3-0/apps/redmine/htdocs/lib/redmine/pop3.rb:36:in `block in check'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/1.9.1/net/pop.rb:533:in `start'
/home/linhdinh/redmine-2.2.3-0/apps/redmine/htdocs/lib/redmine/pop3.rb:31:in `check'
/home/linhdinh/redmine-2.2.3-0/apps/redmine/htdocs/lib/tasks/email.rake:166:in `block (3 levels) in <top (required)>'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/linhdinh/redmine-2.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/linhdinh/redmine-2.2.3-0/ruby/bin/rake:23:in `load'
/home/linhdinh/redmine-2.2.3-0/ruby/bin/rake:23:in `<main>'
Tasks: TOP => redmine:email:receive_pop3

mail header.txt Magnifier (2.89 KB) Sang Tan, 2013-11-06 02:57

applog-2013.11.05-t0lte.gz (28.6 KB) Sang Tan, 2013-11-06 02:57

Also available in: Atom PDF