-
Notifications
You must be signed in to change notification settings - Fork 81
Description
Situation
I tested the plugin (unrealeased version 1.0.0) with an environment were I created test-project-0815' and selected this project and showed my results. I closed the IDE. This stores (correctly) test-project-0815' as latest project.
Afterwards, I deleted test-project-0815' on server side. Additionally I added my self to a new project test-project-new` add did some jobs on cli.
On a restart of the IDE an error popup appearead (I copied the stacktrace output, see below). The jobs from test-project-new were shown, but when I doubleclicked on the job entries, no report was loaded.
If there is only one project inside the project combobox available, it seems the IDE must be restarted to get all working again.
java.lang.RuntimeException: Failed to retrieve SecHub jobs for project: test-project-0815
at com.mercedesbenz.sechub.plugin.idea.sechubaccess.SecHubAccessClient.getSecHubJobPage(SecHubAccessClient.java:62)
at com.mercedesbenz.sechub.plugin.idea.window.SecHubServerPanel.lambda$loadJobs$19(SecHubServerPanel.java:540)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:252)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.mercedesbenz.sechub.api.internal.gen.invoker.ApiException: userListsJobsForProject call failed with: 404 - {"status":404,"error":"Not Found","message":"Project test-checkmarx does not exist, or user has no access.","details":[],"timeStamp":"Mon Jul 28 07:13:01 GMT 2025"}
at com.mercedesbenz.sechub.api.internal.gen.OtherApi.getApiException(OtherApi.java:82)
at com.mercedesbenz.sechub.api.internal.gen.OtherApi.userListsJobsForProjectWithHttpInfo(OtherApi.java:469)
at com.mercedesbenz.sechub.api.internal.gen.OtherApi.userListsJobsForProject(OtherApi.java:443)
at com.mercedesbenz.sechub.plugin.idea.sechubaccess.SecHubAccessClient.getSecHubJobPage(SecHubAccessClient.java:59)
... 11 moreWanted
- no error popup
- selection by double click shall work in this case
Solution
Loading the project list shall ensure that that the project which shall be current is still available from server. If not, the first project from server list shall become automatically the new current one and shall be loaded.
I think by ensuring the project can be loaded - without an error - the double click selection will always work - means no further steps necessary.