Skip to content
This repository has been archived by the owner on Mar 6, 2018. It is now read-only.

undefinied method charset for nil:nilClass #6

Open
peterbeck opened this issue Apr 6, 2016 · 1 comment
Open

undefinied method charset for nil:nilClass #6

peterbeck opened this issue Apr 6, 2016 · 1 comment

Comments

@peterbeck
Copy link

Using Redmine 3.2.1 with this plugin. While sendig updates from tickets via webinterface, everything's fine and inline images are displayed.
But when I try to send/update an issue via mail I get this error and the mail stucks in the queue, even if there is no inline (or any other) image attached but (in this case) a pdf document:

mailqueue:

(temporary failure. Command output: Failed to contact your Redmine server (500). Posting to http://localhost:80/mail_handler... Response received: 500)

redmine log:

NoMethodError (undefined method `charset' for nil:NilClass):
  plugins/redmine_email_images/lib/email_receive_inline_patch.rb:43:in `decode_part_body'
  plugins/redmine_email_images/lib/email_receive_inline_patch.rb:28:in `decoded_html'
  plugins/redmine_email_images/lib/email_receive_inline_patch.rb:15:in `add_attachments_with_remove_inline_images'
  app/models/mail_handler.rb:243:in `receive_issue_reply'
  app/models/mail_handler.rb:166:in `dispatch'
  app/models/mail_handler.rb:150:in `receive'
  app/models/mail_handler.rb:49:in `block in receive'
  app/models/mail_handler.rb:46:in `receive'
  app/controllers/mail_handler_controller.rb:29:in `index'

is that a bug or is something wrong with my database (encoding, whatever ?)

some further details about my environment (running on Debian Jessie 8.4):

Environment:
  Redmine version                3.2.1.stable
  Ruby version                   2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
  Rails version                  4.2.5.2
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.1.4
  Filesystem                     
Redmine plugins:
  due_date_reminder              0.3.2
  periodictask                   2.0.0
  recurring_tasks                2.0.0-pre
  redmine_checklists             3.1.3
  redmine_email_images           0.1.1
  redmine_ics_export             3.0.1.dev
  redmine_issue_completion       0.0.2
  redmine_lightbox2              0.2.5
  redmine_local_avatars          1.0.0
  redmine_mail_reminder          3.0.0.0001
  redmine_monitoring_controlling 0.1.1
  redmine_silencer               0.4.1
  redmine_stats                  0.0.3
  redmine_target_client_project  0.1.0
  redmine_timesheet_plugin       0.7.0
  vault                          0.0.5

Regards
Peter

@jared-gs
Copy link

Peter,

I was having the same issue with this plugin. Redmine was importing emails successfully but was returning non-zero, which meant Postfix would mark them as deferred and would keep retrying the command (which would create multiple new tickets).

I ended up resolving this issue by using the INSANEWORKS fork of this plugin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants