Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-41320

Duplicate Issues Created by Mail Handler When Attachment is not processed correctly

    XMLWordPrintable

Details

    Description

      Summary:

      How mail handler normally works:

      1. detect the email in the inbox
      2. create issue
      3. if it detects attachment, it will try to add the attachment to the issue
      4. once the attachment was successfully added, delete the email from inbox

      How it works here (happens occasionally):
      When the attachment was not added successfully, the same email stays in the inbox. This cause the mail handler to re-process the email and re-create an issue again out of it

      Steps to reproduce:

      This is not reproducible.

      Error causing the email not being deleted (failed to add the attachment):

      2014-12-11 19:58:57,489 QuartzScheduler_Worker-3 DEBUG ServiceRunner    XX.YYYY [mail.incoming.CreateOrCommentHandler.3] Checking if attachment should be added to issue:
      2014-12-11 19:58:57,489 QuartzScheduler_Worker-3 DEBUG ServiceRunner    XX.YYYY [mail.incoming.CreateOrCommentHandler.3] 	Content-Type: image/png; name="XYXY.png"
      2014-12-11 19:58:57,490 QuartzScheduler_Worker-3 DEBUG ServiceRunner    XX.YYYY [mail.incoming.CreateOrCommentHandler.3] 	Content-Disposition: attachment
      2014-12-11 19:58:57,491 QuartzScheduler_Worker-3 ERROR ServiceRunner    XX.YYYY [atlassian.mail.incoming.mailfetcherservice] XX.YYYY[XYXYX]: Exception: null
      java.lang.NegativeArraySizeException
      	at com.sun.imageio.plugins.png.PNGImageReader.readMetadata(Unknown Source)
      	at com.sun.imageio.plugins.png.PNGImageReader.getImageMetadata(Unknown Source)
      	at com.atlassian.jira.plugins.mail.handlers.GeneratedAttachmentRecogniser.containsJiraMetadata(GeneratedAttachmentRecogniser.java:64)
      	at com.atlassian.jira.plugins.mail.handlers.GeneratedAttachmentRecogniser.<init>(GeneratedAttachmentRecogniser.java:32)
      	at 
      

      Suggestion

      If deleting the unsuccessfully processed email is not an option (perhaps for integrity reason), then maybe mail handler could mark it as read and notify the reporter to resend an email for creating issue (while the read email will not be processed anymore).

      Attachments

        Activity

          People

            Unassigned Unassigned
            azuhra Aqqiela
            Votes:
            3 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated: