Service Management Email Request "Unexpected error while running action as user" Error

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Problem

Jira Service Management Email Request would not be able to process the Email with an error like below shown in Jira Administration Page > Application > Email Requests > View Log of the affected Email Address then move to the Processing Tab:

(Auto-migrated image: description temporarily unavailable)

The following appears in the atlassian-jira.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2019-02-22 09:39:22,256 ERROR [] Caesium-1-1 anonymous Exception when MailHandlerWorker handles message: java.lang.RuntimeException: Unexpected error while running action as user 'xxxx.yyyy@zzzzz.com' at com.atlassian.pocketknife.internal.util.runner.AuthenticationContextUtilImpl.runAs(AuthenticationContextUtilImpl.java:60) [?:?] at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailServiceImpl.inEmailContext(IncomingEmailServiceImpl.java:506) [?:?] at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailServiceImpl.lambda$doCreateNewOrCommentOnIssueWithMailChannel$15(IncomingEmailServiceImpl.java:187) [?:?] at io.atlassian.fugue.Either$Right.fold(Either.java:620) [fugue-4.5.0.jar:?] at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailServiceImpl.doCreateNewOrCommentOnIssueWithMailChannel(IncomingEmailServiceImpl.java:185) [?:?] at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailServiceImpl.lambda$createNewOrCommentOnIssueWithMailChannel$6(IncomingEmailServiceImpl.java:155) [?:?] at com.atlassian.pocketknife.step.EitherStep2.lambda$null$0(EitherStep2.java:20) [?:?] at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:886) [fugue-4.5.0.jar:?] at io.atlassian.fugue.Either.flatMap(Either.java:231) [fugue-4.5.0.jar:?] ....List continues.... Caused by: java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:148) [?:1.8.0_181] at java.util.AbstractList.add(AbstractList.java:108) [?:1.8.0_181] at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentServiceImpl.validateMailAttachmentsToAdd(InternalServiceDeskCommentServiceImpl.java:533) [?:?] at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentServiceImpl.addEmailAttachmentsToIssue(InternalServiceDeskCommentServiceImpl.java:511) [?:?] at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentServiceImpl.addAttachmentsAndBuildComment(InternalServiceDeskCommentServiceImpl.java:398) [?:?] ....

Diagnosis

Cause

One of the cause is due to the Workflow Property set on a particular status which is "jira.issue.editable" that would not allow any Editing operation including adding an attachment.

Solution

Resolution

Edit the Workflow and remove the property from the affected Status. Publish it to take an effect.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.