Jira Plugin: Crash when uploading to Jira

Description

While attempting to upload a screenshot to Jira, I received the following error.

Steps:

  • Capture Window

  • Open in image editor

  • Clicked the 'Upload to Jira' toolbar button

  • Signed in successfully

  • Jira filter list shows, selected a filter and Jira item

  • left the comment field blank

  • clicked upload

Crash!

Software version: 1.2.9.112-RELEASE-9bc62ac42bd37d7ba2b19946b70d40a599332b75 (64 bit)
.NET runtime version: 4.0.30319.42000+
Time: 2017-01-24 11:31:30 -08:00
OS: unknown (x64) 10.0 build 14393 revision 0
GDI object count: 112
User object count: 84

Exception: System.Runtime.Serialization.SerializationException
Message: Invalid JSON string

Stack:
at Dapplo.HttpExtensions.SimpleJson.DeserializeObject(String json)
at Dapplo.HttpExtensions.SimpleJson.DeserializeObject(String json, Type type, IJsonSerializerStrategy jsonSerializerStrategy)
at Dapplo.HttpExtensions.ContentConverter.SimpleJsonHttpContentConverter.<ConvertFromHttpContentAsync>d__15.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Dapplo.HttpExtensions.HttpContentExtensions.<GetAsAsync>d__2.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Dapplo.HttpExtensions.HttpResponseMessageExtensions.<GetAsAsync>d__1`1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Dapplo.HttpExtensions.HttpRequestMessageExtensions.<SendAsync>d__3`1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Dapplo.HttpExtensions.HttpClientExtensions.<PostAsync>d__6`1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Dapplo.HttpExtensions.UriActionExtensions.<PostAsync>d__6`1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Dapplo.Jira.JiraApi.<AttachAsync>d__26`1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GreenshotJiraPlugin.JiraConnector.<AttachAsync>d__27.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GreenshotJiraPlugin.Forms.JiraForm.<UploadAsync>d__12.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GreenshotJiraPlugin.JiraDestination.<>c_DisplayClass17_1.<<ExportCapture>b_1>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

Configuration dump:
{\code}

Environment

OS: Windows 10 Pro (1607) 64-bit
Greenhost: 1.2.9.112
Jira: Atlassian JIRA (v6.1.3#6158-sha1:b5b5eab)

Attachments

2

Gliffy Diagrams

Activity

Show:

Robin Krom January 25, 2017 at 6:23 PM

Thanks for the feedback!!!

I think I will publish the release at Sunday or Monday, all tickets in our "sprint" that haven't been solved (mainly due to no feedback) will move to the next timeline.

As the update check runs every ~14 days you might want to check our download page for it.
https://getgreenshot.org/downloads

I advice you not to check the github releases: first they might confuse you into loading something untested, second we might publish a release but this doesn't mean it's checked (when it's on the download button, we checked it) and third we can move the location.

Thomas Coleman January 25, 2017 at 6:10 PM

That worked!
What is the timeline to the next "stable" release with this fix?

Robin Krom January 25, 2017 at 6:01 PM

The version here should solve the problem, I hope you are able to test this:
https://github.com/greenshot/greenshot/releases/tag/Greenshot-UNSTABLE-1.2.9.123

Robin Krom January 25, 2017 at 3:55 PM

P.S.
I deleted the log, just to be on the safe side that there is nothing in there which other people should not see.

Robin Krom January 25, 2017 at 3:54 PM

Now, that IS interesting... The answer from the server is "XSRF check failed".
I am probably able to do something with that.

THANKS

Fixed

Details

Assignee

Reporter

Components

Priority

Time tracking

3h logged

Sprint

Created January 24, 2017 at 7:52 PM
Updated January 25, 2017 at 6:23 PM
Resolved January 25, 2017 at 6:01 PM