Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JiraPS fails to upload attachments to cloud server #248

Closed
lipkau opened this issue May 10, 2018 · 3 comments
Closed

JiraPS fails to upload attachments to cloud server #248

lipkau opened this issue May 10, 2018 · 3 comments
Assignees
Milestone

Comments

@lipkau
Copy link
Member

lipkau commented May 10, 2018

Expected Behavior

Add-JiraIssueAttachment should just work

Current Behavior

Command fails on Cloud server with error

org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly

Possible Solution

Your Environment

 I ♥ PS> Get-JiraServerInfo

ServerTitle    : JIRA
BuildNumber    : 100083
DeploymentType : Cloud
BuildDate      : 2018-05-09 02:00:00
BaseURL        : https://powershell.atlassian.net
Version        : 1001.0.0-SNAPSHOT
ScmInfo        : 62e6e97535da03ead836c827d2a0c3e114a33919
ServerTime     : 2018-05-10 15:35:00
@RealWorldPowerShell
Copy link

Tried to add a attachment.

Add-JiraIssueAttachment -Issue STS-11582 -FilePath "C:\temp\out.txt" -Verbose
VERBOSE: [Add-JiraIssueAttachment] Function started
VERBOSE: [Get-JiraIssue] Function started
VERBOSE: [Get-JiraConfigServer] Function started
VERBOSE: [Get-JiraConfigServer] Complete
VERBOSE: [Get-JiraIssue] Processing [STS-11582]
VERBOSE: [Invoke-JiraMethod] Function started
VERBOSE: [Get-JiraSession] Function started
VERBOSE: [Get-JiraSession] Using Session saved in PrivateData
VERBOSE: [Get-JiraSession] Complete
VERBOSE: [Invoke-JiraMethod] Get https://jira.someserver.se/rest/api/latest/issue/STS-11582?expand=transitions
VERBOSE: [Test-ServerResponse] Checking response headers for authentication errors
VERBOSE: [Invoke-JiraMethod] Status code: 200
VERBOSE: [Invoke-JiraMethod] Function ended
VERBOSE: [Get-JiraIssue] Complete
VERBOSE: Performing the operation "Adding attachment ''." on target "STS-11582".
VERBOSE: [Invoke-JiraMethod] Function started
VERBOSE: [Get-JiraSession] Function started
VERBOSE: [Get-JiraSession] Using Session saved in PrivateData
VERBOSE: [Get-JiraSession] Complete
VERBOSE: [Invoke-JiraMethod] Post https://jira.someserver.se/rest/api/latest/issue/38154/attachments
VERBOSE: [Invoke-JiraMethod] Failed to get an answer from the server
VERBOSE: [Test-ServerResponse] Checking response headers for authentication errors
VERBOSE: [Invoke-JiraMethod] Status code: InternalServerError
WARNING: Jira returned HTTP error 500 - InternalServerError
VERBOSE: [Invoke-JiraMethod] Retrieved body of HTTP response for more information about the error ($responseBody)
VERBOSE: [Invoke-JiraMethod] Function ended
VERBOSE: [Add-JiraIssueAttachment] Complete

@RealWorldPowerShell
Copy link

Hmm, seem to be working if i install 2.5.17.

Add-JiraIssueAttachment -Issue $issue -FilePath "C:\temp\out.txt" -Verbose
VERBOSE: [Add-JiraIssueAttachment] Function started
VERBOSE: Performing the operation "Adding attachment 'out.txt'." on target "STS-11582".
VERBOSE: [Invoke-JiraMethod] Function started
VERBOSE: [Get-JiraSession] Function started
VERBOSE: [Get-JiraSession] Using Session saved in PrivateData
VERBOSE: [Get-JiraSession] Complete
VERBOSE: [Invoke-JiraMethod] Using WebSession (Username=[sUser1@someserver.se])
VERBOSE: [Invoke-JiraMethod] POST https://jira.someserver.se/rest/api/latest/issue/38154/attachments
VERBOSE: [Invoke-JiraMethod] Function ended
VERBOSE: [Add-JiraIssueAttachment] Complete

@lipkau
Copy link
Member Author

lipkau commented Jun 5, 2018

Will be fixed with the next release

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

No branches or pull requests

2 participants