tulleuchen / jirastopwatch

Not MORE timetracking - just EASIER timetracking
http://jirastopwatch.com
Apache License 2.0
141 stars 96 forks source link

Cannot submit worklog to Jira with Windows 10 #42

Closed mklaine closed 7 years ago

mklaine commented 7 years ago

Hi

My colleagues with Windows 10 machines can't submit their work to Jira through stop watch. They are able to connect to the Jira, add filter and select tasks from the filter, but when they are trying to submit their work to Jira the icon just briefly blinks gray and then comes back to green without never sending the actual worklog to Jira. With Windows 7 and 8.1 devices they have been able to do this successfully.

Personally I don't have access to windows 10 device. I have windows 7 and for me everything works.

Markus

carstengehling commented 7 years ago

Hi Markus,

I've just made a pre-release of Jira StopWatch 1.9.0. This version contains an option for running with debug logging of all communication with Jira API (no sensitive information is stored).

image

Try to enable the logging, test the submitting again, and then send me the logfile. If you don't want to publish the logfile here, you can send it directly to me at carsten@sarum.dk

You can download the pre-release here: https://github.com/carstengehling/jirastopwatch/releases/tag/1.9.0-pre1

mklaine commented 7 years ago

Hi Carsten

We tested the tool with logs enabled. Here are the results: 16.12.2016 8.55.28 Request: https://jira01.devtools.intel.com/rest/api/2/issue/IIITS-2574 16.12.2016 8.55.29 Response: OK - {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"1195313","se 16.12.2016 8.55.33 Request: https://jira01.devtools.intel.com/rest/api/2/issue/IIITS-2574?fields=timetracking 16.12.2016 8.55.33 Response: OK - {"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"1195313","se 16.12.2016 8.55.34 Request: https://jira01.devtools.intel.com/rest/api/2/issue/IIITS-2574/worklog?adjustEstimate=auto 16.12.2016 8.55.34 Response: InternalServerError - {"errorMessages":["Internal server error"],"errors":{}}

At least for me the error doesn't tell too much :)

Markus

carstengehling commented 7 years ago

Sorry for the very late answer. As I read the log, some error happens in your Jira application server:

16.12.2016 8.55.34 Response: InternalServerError - {"errorMessages":["Internal server error"],"errors":{}}

You will need to look at the server logs, to see what that is.

carstengehling commented 7 years ago

Please let me know, if you've found the source of the problem.

Tontza commented 7 years ago

I'm having the same problem and error message with Windows 10. With my colleague time logging seems to work with no problems although he's also using Windows 10.

Here's some server logs:

2017-01-20 08:27:57,122 http-bio-443-exec-2229 ERROR antti.argillander 507x533311x1 u4a565 10.0.3.222 /rest/api/2/issue/GILLA-1/worklog [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192) ... 4 filtered at com.atlassian.jira.rest.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:55) ... 1 filtered at com.atlassian.jira.rest.v2.issue.scope.RequestScopeInterceptor.intercept(RequestScopeInterceptor.java:39) ... 15 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154) ... 1 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68) ... 86 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 15 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37) ... 74 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: Error parsing time: 2017-01-20T06.17.29.269+0000 at com.atlassian.jira.rest.Dates.fromTimeString(Dates.java:77) at com.atlassian.jira.issue.fields.rest.json.beans.WorklogJsonBean.getStarted(WorklogJsonBean.java:267) at com.atlassian.jira.rest.v2.issue.worklog.WorklogOperation$1.prepareData(WorklogOperation.java:83) at com.atlassian.jira.rest.v2.issue.worklog.IssueWorklogResource.doOperation(IssueWorklogResource.java:101) at com.atlassian.jira.rest.v2.issue.worklog.IssueWorklogResource.addWorklog(IssueWorklogResource.java:83) ... 211 more Caused by: java.text.ParseException: Unparseable date: "2017-01-20T06.17.29.269+0000" at java.text.DateFormat.parse(DateFormat.java:366) at com.atlassian.jira.rest.Dates.fromTimeString(Dates.java:75) ... 216 more

carstengehling commented 7 years ago

I noticed this one:

Caused by: java.text.ParseException: Unparseable date: "2017-01-20T06.17.29.269+0000" at java.text.DateFormat.parse(DateFormat.java:366)

Just for the sake of debugging: Could you check if you are using the same "regional settings" in Windows as your colleagues? Especially the date/time formats.

Meanwhile I'll have a look at how I post dates to Jira - it's only one place I do this: the "start time" for the worklog

Tontza commented 7 years ago

We saw the same ParseException earlier and checked regional settings and date/time formats and they match.

carstengehling commented 7 years ago

I've made a version of StopWatch that does extensive logging of Jira communications. All request/response data - except anything related to user authentication (username/password).

Could you try with this? Then send me the log. Just unzip to a folder and run the exe. stopwatch190-logging.zip

Tontza commented 7 years ago

Here's a new log: jira_log_20170130.txt

carstengehling commented 7 years ago

Could you send me the log from StopWatch? Go into the settings dialog and enable logging. Then try again. From the settings dialog there is also a link to the log location.

Tontza commented 7 years ago

Sorry, I didn't notice that open log folder link and thought you meant server log. Here's logs from today: jirastopwatch_20170130.txt

carstengehling commented 7 years ago

I've found some discrepancy between your datetime format and mine:

Yours: "started":"2017-01-30T07.01.40.820+0000" Mine: "started":"2017-01-30T13:19:51.566+0000"

Your time-values are separated by "dot" (.) - mine by semikolon (;). That IS probably because of your regional settings. I'll try to make the formatting of datetime values independent of any regional settings.

Tontza commented 7 years ago

For some reason I got only HH.mm on my Finnish formatting on regional settings. I changed it to english (UK), HH:mm and the stopwatch worked fine.

carstengehling commented 7 years ago

I'm glad, that you got it to work. I will still make sure, that StopWatch is not vulnerable to regional settings.

mklaine commented 7 years ago

Hi

Sorry for not driving this actively, I was busy with other stuff. Anyway it seems like we had the exact same problem: the Finnish localization (not the first time it's causing pain). Anyway with the latest commits everything seems to be working. Thanks.

carstengehling commented 7 years ago

You're welcome! I'm working on some improvements (keyboard shortcuts, moving login info to settings dialog). When they are done, I'll make a new release, that also contains this bugfix.