pbauerochse / youtrack-worklog-viewer

A tool to keep track of the work hours you spent on issues in the YouTrack issue management system
MIT License
39 stars 10 forks source link

Error with Youtrack version 2018.2 #27

Closed mingalll closed 6 years ago

mingalll commented 6 years ago

I noticed that YouTrack just updated to the version 2018.2. Now whenever I try to generate the worklog it gives me an error. Here is the Log from the application:

09:55:17.687 [JavaFX Application Thread] DEBUG d.p.w.fx.MainViewController - Showing log messages dialogue 09:55:42.742 [JavaFX Application Thread] DEBUG d.p.w.fx.MainViewController - Fetch worklogs clicked for timerange THIS_WEEK 09:55:42.742 [JavaFX Application Thread] INFO d.p.w.d.t.TimerangeProviderFactory - Using timerange provider class class de.pbauerochse.worklogviewer.domain.timerangeprovider.CurrentWeekTimerangeProvider 09:55:42.743 [JavaFX Application Thread] INFO d.p.w.fx.MainViewController - Starting task FetchTimereport-Task 09:55:42.743 [pool-2-thread-1] DEBUG d.p.w.y.v20174.YouTrackServiceV20174 - Creating temporary timereport using url https://ligafacens.myjetbrains.com/youtrack/api/reports?fields=$type,authors(fullName,id,login,ringId),effectiveQuery,effectiveQueryUrl,id,invalidationInterval,name,own,owner(id,login),pinned,projects(id,name,shortName),query,sprint(id,name),status(calculationInProgress,error(id),errorMessage,isOutdated,lastCalculated,progress,wikifiedErrorMessage),visibleTo(id,name),wikifiedError,windowSize,workTypes(id,name) 09:55:42.743 [JavaFX Application Thread] DEBUG d.p.w.fx.MainViewController - Task FetchTimereport-Task changed from READY to SCHEDULED 09:55:42.743 [JavaFX Application Thread] DEBUG d.p.w.fx.MainViewController - Task FetchTimereport-Task changed from SCHEDULED to RUNNING 09:55:44.235 [pool-2-thread-1] ERROR d.p.w.y.v20174.YouTrackServiceV20174 - Could not create Report from URL https://ligafacens.myjetbrains.com/youtrack/api/reports?fields=$type,authors(fullName,id,login,ringId),effectiveQuery,effectiveQueryUrl,id,invalidationInterval,name,own,owner(id,login),pinned,projects(id,name,shortName),query,sprint(id,name),status(calculationInProgress,error(id),errorMessage,isOutdated,lastCalculated,progress,wikifiedErrorMessage),visibleTo(id,name),wikifiedError,windowSize,workTypes(id,name) org.apache.http.client.ClientProtocolException: null at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186) ~[youtrack-worklog-viewer-2.3.4.jar:na] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) ~[youtrack-worklog-viewer-2.3.4.jar:na] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) ~[youtrack-worklog-viewer-2.3.4.jar:na] at de.pbauerochse.worklogviewer.youtrack.v20174.YouTrackServiceV20174.createReport(YouTrackServiceV20174.java:124) ~[youtrack-worklog-viewer-2.3.4.jar:na] at de.pbauerochse.worklogviewer.fx.tasks.FetchTimereportTask.call(FetchTimereportTask.java:41) [youtrack-worklog-viewer-2.3.4.jar:na] at de.pbauerochse.worklogviewer.fx.tasks.FetchTimereportTask.call(FetchTimereportTask.java:20) [youtrack-worklog-viewer-2.3.4.jar:na] at javafx.concurrent.Task$TaskCallable.call(Unknown Source) [jfxrt.jar:na] at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_91] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_91] at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_91] at java.lang.Thread.run(Unknown Source) [na:1.8.0_91] Caused by: org.apache.http.HttpException: Unsupported Content-Coding: UTF-8 at org.apache.http.client.protocol.ResponseContentEncoding.process(ResponseContentEncoding.java:130) ~[youtrack-worklog-viewer-2.3.4.jar:na] at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:141) ~[youtrack-worklog-viewer-2.3.4.jar:na] at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:189) ~[youtrack-worklog-viewer-2.3.4.jar:na] at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) ~[youtrack-worklog-viewer-2.3.4.jar:na] at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[youtrack-worklog-viewer-2.3.4.jar:na] at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) ~[youtrack-worklog-viewer-2.3.4.jar:na] ... 12 common frames omitted 09:55:44.235 [JavaFX Application Thread] DEBUG d.p.w.fx.MainViewController - Task FetchTimereport-Task changed from RUNNING to FAILED 09:55:44.236 [JavaFX Application Thread] WARN d.p.w.fx.MainViewController - Task FetchTimereport-Task failed 09:55:44.236 [JavaFX Application Thread] WARN d.p.w.fx.MainViewController - Showing error to user java.lang.IllegalStateException: Unknown error, please see logs at de.pbauerochse.worklogviewer.util.ExceptionUtil.getIllegalStateException(ExceptionUtil.java:34) ~[youtrack-worklog-viewer-2.3.4.jar:na] at de.pbauerochse.worklogviewer.util.ExceptionUtil.getIllegalStateException(ExceptionUtil.java:30) ~[youtrack-worklog-viewer-2.3.4.jar:na] at de.pbauerochse.worklogviewer.youtrack.v20174.YouTrackServiceV20174.createReport(YouTrackServiceV20174.java:144) ~[youtrack-worklog-viewer-2.3.4.jar:na] at de.pbauerochse.worklogviewer.fx.tasks.FetchTimereportTask.call(FetchTimereportTask.java:41) ~[youtrack-worklog-viewer-2.3.4.jar:na] at de.pbauerochse.worklogviewer.fx.tasks.FetchTimereportTask.call(FetchTimereportTask.java:20) ~[youtrack-worklog-viewer-2.3.4.jar:na] at javafx.concurrent.Task$TaskCallable.call(Unknown Source) ~[jfxrt.jar:na] at java.util.concurrent.FutureTask.run(Unknown Source) ~[na:1.8.0_91] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[na:1.8.0_91] at java.util.concurrent.FutureTask.run(Unknown Source) ~[na:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:1.8.0_91] at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_91] 09:55:45.986 [JavaFX Application Thread] DEBUG d.p.w.fx.MainViewController - Showing log messages dialogue 09:55:45.988 [JavaFX Application Thread] DEBUG d.p.w.fx.LogViewController - Initializing 09:55:45.990 [JavaFX Application Thread] DEBUG d.p.w.fx.LogViewController - Adding WindowChangeListener

pbauerochse commented 6 years ago

I see you are using the 2017.4 connector for a 2018.2 YouTrack version. Could you please go to the settings and switch the Youtrack Version to "2018.1 or newer". Let me know if that resolves the connection issues

Edit: nevermind, you propably already have it set to "2018.1 or newer", right? I'll have to look into it. Might take a while to setup a 2018.2 version for me to test. I'll get back to you when I have news

pbauerochse commented 6 years ago

Just a quick heads-up: YouTrack yet again changed the backend quite a lot and for now I still haven't found a way to work around it. I actually would like to ditch the whole CSV downloading part and there is a way to search issues by the time tracking date. But this field for the search is localized, so it is named differently in english and german for example. Unfortunately I have not found a way to query the name of the field to then use it in a query. I will dig further and see if I can make it work soon

pbauerochse commented 6 years ago

There is a YouTrack Ticket for that now: https://youtrack.jetbrains.com/issue/JT-47943

But I'm also trying to find a workaround until the ticket gets resolved

pbauerochse commented 6 years ago

The issue at youtrack has been resolved, unfortunately we have to wait for them to release a version, where the fix is included. When that happens, I myself can release a new worklog viewer version, compatible with it.

pbauerochse commented 6 years ago

I just released version 2.4.0. in which there is a workaround included. Please read the corresponding wiki page carefully.

https://github.com/pbauerochse/youtrack-worklog-viewer/releases/tag/2.4.0

Let me know if everything works

mingalll commented 6 years ago

It is working again, thank you. But now the Group By dropdown is empty. image

pbauerochse commented 6 years ago

@mingalll could you restart the worklog viewer once more? I suspect the group by is empty, when you change the youtrack version in the backend. Let me know if it works. If not, could you please check Help > Log Messages and tell me if there is an Exception in there?

mingalll commented 6 years ago

Got this error when starting the application, but it works normally when I try to get a report.

09:40:24.111 [JavaFX Application Thread] WARN d.p.w.fx.tasks.TaskRunner - Showing error to user com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'jetbrains.charisma.customfields.parser.CustomFilterField' as a subtype of [simple type, class de.pbauerochse.worklogviewer.connector.v2018.domain.groupby.GroupingField]: known type ids = [jetbrains.charisma.keyword.CustomFilterField, jetbrains.charisma.keyword.PredefinedFilterField, jetbrains.charisma.smartui.report.time.GroupByTypes] at [Source: (String)"[{"presentation":"project","id":"project","sortable":true,"aggregateable":false,"name":"project","$type":"jetbrains.charisma.keyword.PredefinedFilterField"},{"projects":[{"name":"App - Facens","id":"0-1","$type":"jetbrains.charisma.persistent.Project"},{"name":"App - Quiz Enade Newton Paiva","id":"0-3","$type":"jetbrains.charisma.persistent.Project"},{"name":"IAS - Game EducaSim","id":"0-5","$type":"jetbrains.charisma.persistent.Project"},{"name":"Game - Canvas Quest","id":"0-7","$type":"jetbrai"[truncated 32105 chars]; line: 1, column: 4265] (through reference chain: java.util.ArrayList[1]) at com.fasterxml.jackson.databind.exc.InvalidTypeIdException.from(InvalidTypeIdException.java:43) at com.fasterxml.jackson.databind.DeserializationContext.invalidTypeIdException(DeserializationContext.java:1628) at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownTypeId(DeserializationContext.java:1186) at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId(TypeDeserializerBase.java:291) at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:162) at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:113) at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97) at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254) at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:288) at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245) at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4001) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3011) at de.pbauerochse.worklogviewer.connector.v2018.Connector.getGroupByParameters(Connector.kt:39) at de.pbauerochse.worklogviewer.fx.tasks.GetGroupByCategoriesTask.start(GetGroupByCategoriesTask.java:41) at de.pbauerochse.worklogviewer.fx.tasks.GetGroupByCategoriesTask.start(GetGroupByCategoriesTask.java:20) at de.pbauerochse.worklogviewer.fx.tasks.WorklogViewerTask.call(WorklogViewerTask.kt:21) at javafx.concurrent.Task$TaskCallable.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 09:40:30.405 [JavaFX Application Thread] DEBUG d.p.w.fx.MainViewController - Showing log messages dialogue

pbauerochse commented 6 years ago

Can you try again with version 2.4.1 please

https://github.com/pbauerochse/youtrack-worklog-viewer/releases/tag/2.4.1

mingalll commented 6 years ago

Working like a charm, thank you again!!

pbauerochse commented 6 years ago

Glad to hear that :)