sourcegraph / jetbrains

Apache License 2.0
61 stars 19 forks source link

bug: java.lang.RuntimeException #2213

Open Nopik opened 1 week ago

Nopik commented 1 week ago

IDE Information

.

Bug Description

The 'report' button in IDE causes too long URL to be generated and Github does not load the reporting page. I'm copying a whole exception I see in IDE here. You can see my setup in other bugs reported today.

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: codeActions/provide: document not found for file:///Users/nopik/Warsztat/sunvoy/app/packages/utils/telemetry.cjs

Error: codeActions/provide: document not found for file:///Users/nopik/Warsztat/sunvoy/app/packages/utils/telemetry.cjs
    at /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:138490:19
    at /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:139426:18
    at async /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:137987:44
    at com.intellij.util.ExceptionUtil.rethrow(ExceptionUtil.java:136)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(ProgressIndicatorUtils.java:399)
    at com.sourcegraph.cody.inspections.CodyFixHighlightPass.doCollectInformation(CodyFixHighlightPass.kt:133)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:418)
    at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.runWithSpanIgnoreThrows(trace.kt:118)
    at com.intellij.platform.diagnostic.telemetry.helpers.TraceUtil.runWithSpanThrows(TraceUtil.java:36)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$3(PassExecutorService.java:413)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$4(PassExecutorService.java:404)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:403)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:379)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.cacheFileTypesInside(FileTypeManagerImpl.java:802)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$1(PassExecutorService.java:379)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.executeByImpatientReader(AnyThreadWriteThreadingSupport.kt:486)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:377)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:190)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: codeActions/provide: document not found for file:///Users/nopik/Warsztat/sunvoy/app/packages/utils/telemetry.cjs

Error: codeActions/provide: document not found for file:///Users/nopik/Warsztat/sunvoy/app/packages/utils/telemetry.cjs
    at /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:138490:19
    at /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:139426:18
    at async /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:137987:44
    at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(ProgressIndicatorUtils.java:370)
    ... 27 more
Caused by: java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: codeActions/provide: document not found for file:///Users/nopik/Warsztat/sunvoy/app/packages/utils/telemetry.cjs

Error: codeActions/provide: document not found for file:///Users/nopik/Warsztat/sunvoy/app/packages/utils/telemetry.cjs
    at /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:138490:19
    at /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:139426:18
    at async /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:137987:44
    at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
    at com.sourcegraph.cody.inspections.CodyFixHighlightPass.doCollectInformation$lambda$5(CodyFixHighlightPass.kt:122)
    at com.sourcegraph.cody.agent.CodyAgentService$Companion.withAgent$lambda$2(CodyAgentService.kt:266)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$1.run(AnyThreadWriteThreadingSupport.kt:134)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
    at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: codeActions/provide: document not found for file:///Users/nopik/Warsztat/sunvoy/app/packages/utils/telemetry.cjs

Error: codeActions/provide: document not found for file:///Users/nopik/Warsztat/sunvoy/app/packages/utils/telemetry.cjs
    at /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:138490:19
    at /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:139426:18
    at async /Users/nopik/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/Sourcegraph/agent/index.js:137987:44
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:185)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:97)
    at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:114)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    ... 1 more

Additional context

No response

Nopik commented 1 week ago

For the record, the url generated is: https://github.com/sourcegraph/jetbrains/issues/new?template=bug_report.yml&labels=bug&projects=sourcegraph/381&title=bug%3A+java.lang.RuntimeException%3A+java.util.concurrent.ExecutionException%3A+java.util.concurrent.ExecutionException%3A+org.eclipse.lsp...&about=IntelliJ+IDEA+2024.2.1+%28Ultimate+Edition%29%0ABuild+%23IU-242.21829.142%2C+built+on+August+28%2C+2024%0ALicensed+to+Kamil+Burzynski%0ASubscription+is+active+until+October+6%2C+2024.%0ARuntime+version%3A+21.0.3%2B13-b509.11+aarch64+%28JCEF+122.1.9%29%0AVM%3A+OpenJDK+64-Bit+Server+VM+by+JetBrains+s.r.o.%0AToolkit%3A+sun.lwawt.macosx.LWCToolkit%0AmacOS+14.6.1%0AGC%3A+G1+Young+Generation%2C+G1+Concurrent+GC%2C+G1+Old+Generation%0AMemory%3A+16384M%0ACores%3A+10%0AMetal+Rendering+is+ON%0ARegistry%3A%0A++actionSystem.playback.typecommand.delay%3D50%0A++debugger.new.tool.window.layout%3Dtrue%0A++vcs.log.index.enable%3Dtrue%0A++ide.experimental.ui%3Dtrue%0A++i18n.locale%3D%0A++terminal.new.ui%3Dtrue%0A++editor.minimap.enabled%3Dtrue%0A++typescript.service.node.arguments%3D--max-old-space-size%3D8192%0ANon-Bundled+Plugins%3A%0A++com.mroche.JsonHelper+%281.3.2%29%0A++String+Manipulation+%289.14.1%29%0A++com.wakatime.intellij.plugin+%2815.0.2%29%0A++ru.adelf.idea.dotenv+%282024.2.1%29%0A++PlantUML+integration+%287.10.1-IJ2023.2%29%0A++org.jetbrains.plugins.github+%28242.21829.162%29%0A++com.sourcegraph.jetbrains+%286.0.34%29%0A++commit-prefix-plugin+%281.4.1%29%0A++com.cral.JSONKeyFinder+%282.0.8%29%0A++com.eny.i18n+%282.6.2%29%0AKotlin%3A+242.21829.142-IJ%0A&logs=Stacktrace%3A%0A%60%60%60text%0Ajava.lang.RuntimeException%3A+java.util.concurrent.ExecutionException%3A+java.util.concurrent.ExecutionException%3A+org.eclipse.lsp4j.jsonrpc.ResponseErrorException%3A+codeActions%2Fprovide%3A+document+not+found+for+file%3A%2F%2F%2FUsers%2Fnopik%2FWarsztat%2Fsunvoy%2Fapp%2Fpackages%2Futils%2Ftelemetry.cjs%0A%0AError%3A+codeActions%2Fprovide%3A+document+not+found+for+file%3A%2F%2F%2FUsers%2Fnopik%2FWarsztat%2Fsunvoy%2Fapp%2Fpackages%2Futils%2Ftelemetry.cjs%0A++++at+%2FUsers%2Fnopik%2FLibrary%2FApplication+Support%2FJetBrains%2FIntelliJIdea2024.2%2Fplugins%2FSourcegraph%2Fagent%2Findex.js%3A138490%3A19%0A++++at+%2FUsers%2Fnopik%2FLibrary%2FApplication+Support%2FJetBrains%2FIntelliJIdea2024.2%2Fplugins%2FSourcegraph%2Fagent%2Findex.js%3A139426%3A18%0A++++at+async+%2FUsers%2Fnopik%2FLibrary%2FApplication+Support%2FJetBrains%2FIntelliJIdea2024.2%2Fplugins%2FSourcegraph%2Fagent%2Findex.js%3A137987%3A44%0A%09at+com.intellij.util.ExceptionUtil.rethrow%28ExceptionUtil.java%3A136%29%0A%09at+com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled%28ProgressIndicatorUtils.java%3A399%29%0A%09at+com.sourcegraph.cody.inspections.CodyFixHighlightPass.doCollectInformation%28CodyFixHighlightPass.kt%3A133%29%0A%09at+com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation%28TextEditorHighlightingPass.java%3A57%29%0A%09at+com.intellij.codeInsight.daemon.impl.PassExecutorService%24ScheduledPass.lambda%24doRun%242%28PassExecutorService.java%3A418%29%0A%09at+com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.runWithSpanIgnoreThrows%28trace.kt%3A118%29%0A%09at+com.intellij.platform.diagnostic.telemetry.helpers.TraceUtil.runWithSpanThrows%28TraceUtil.java%3A36%29%0A%09at+com.intellij.codeInsight.daemon.impl.PassExecutorService%24ScheduledPass.lambda%24doRun%243%28PassExecutorService.java%3A413%29%0A%09at+com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction%28AnyThreadWriteThreadingSupport.kt%3A291%29%0A%09at+com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction%28ApplicationImpl.java%3A965%29%0A%09at+com.intellij.codeInsight.daemon.impl.PassExecutorService%24ScheduledPass.lambda%24doRun%244%28PassExecutorService.java%3A404%29%0A%09at+com.intellij.openapi.progress.impl.CoreProgressManager.lambda%24executeProcessUnderProgress%2413%28CoreProgressManager.java%3A660%29%0A%09at+com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun%28CoreProgressManager.java%3A735%29%0A%09at+com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress%28CoreProgressManager.java%3A691%29%0A%09at+com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress%28CoreProgressManager.java%3A659%29%0A%09at+com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress%28ProgressManagerImpl.java%3A79%29%0A%09at+com.intellij.codeInsight.daemon.impl.PassExecutorService%24ScheduledPass.doRun%28PassExecutorService.java%3A403%29%0A%09at+com.intellij.codeInsight.daemon.impl.PassExecutorService%24ScheduledPass.lambda%24run%240%28PassExecutorService.java%3A379%29%0A%09at+com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.cacheFileTypesInside%28FileTypeManagerImpl.java%3A802%29%0A%09at+com.intellij.codeInsight.daemon.impl.PassExecutorService%24ScheduledPass.lambda%24run%241%28PassExecutorService.java%3A379%29%0A%09at+com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.executeByImpatientReader%28AnyThreadWriteThreadingSupport.kt%3A486%29%0A%09at+com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader%28ApplicationImpl.java%3A178%29%0A%09at+com.intellij.codeInsight.daemon.impl.PassExecutorService%24ScheduledPass.run%28PassExecutorService.java%3A377%29%0A%09at+com.intellij.concurrency.JobLauncherImpl%24VoidForkJoinTask%241.exec%28JobLauncherImpl.java%3A190%29%0A%09at+java.base%2Fjava.util.concurrent.ForkJoinTask.doExec%28ForkJoinTask.java%3A507%29%0A%09at+java.base%2Fjava.util.concurrent.ForkJoinPool%24WorkQueue.topLevelExec%28ForkJoinPool.java%3A1491%29%0A%09at+java.base%2Fjava.util.concurrent.ForkJoinPool.scan%28ForkJoinPool.java%3A2073%29%0A%09at+java.base%2Fjava.util.concurrent.ForkJoinPool.runWorker%28ForkJoinPool.java%3A2035%29%0A%09at+java.base%2Fjava.util.concurrent.ForkJoinWorkerThread.run%28ForkJoinWorkerThread.java%3A187%29%0ACaused+by%3A+java.util.concurrent.ExecutionException%3A+java.util.concurrent.ExecutionException%3A+org.eclipse.lsp4j.jsonrpc.ResponseErrorException%3A+codeActions%2Fprovide%3A+document+not+found+for+file%3A%2F%2F%2FUsers%2Fnopik%2FWarsztat%2Fsunvoy%2Fapp%2Fpackages%2Futils%2Ftelemetry.cjs%0A%0AError%3A+codeActions%2Fprovide%3A+document+not+found+for+file%3A%2F%2F%2FUsers%2Fnopik%2FWarsztat%2Fsunvoy%2Fapp%2Fpackages%2Futils%2Ftelemetry.cjs%0A++++at+%2FUsers%2Fnopik%2FLibrary%2FApplication+Support%2FJetBrains%2FIntelliJIdea2024.2%2Fplugins%2FSourcegraph%2Fagent%2Findex.js%3A138490%3A19%0A++++at+%2FUsers%2Fnopik%2FLibrary%2FApplication+Support%2FJetBrains%2FIntelliJIdea2024.2%2Fplugins%2FSourcegraph%2Fagent%2Findex.js%3A139426%3A18%0A++++at+async+%2FUsers%2Fnopik%2FLibrary%2FApplication+Support%2FJetBrains%2FIntelliJIdea2024.2%2Fplugins%2FSourcegraph%2Fagent%2Findex.js%3A137987%3A44%0A%09at+java.base%2Fjava.util.concurrent.CompletableFuture.reportGet%28CompletableFuture.java%3A396%29%0A%09at+java.base%2Fjava.util.concurrent.CompletableFuture.get%28CompletableFuture.java%3A2096%29%0A%09at+com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled%28ProgressIndicatorUtils.java%3A370%29%0A%09...+27+more%0ACaused+by%3A+java.util.concurrent.ExecutionException%3A+org.eclipse.lsp4j.jsonrpc.ResponseErrorException%3A+codeActions%2Fprovide%3A+document+not+found+for+file%3A%2F%2F%2FUsers%2Fnopik%2FWarsztat%2Fsunvoy%2Fapp%2Fpackages%2Futils%2Ftelemetry.cjs%0A%0AError%3A+codeActions%2Fprovide%3A+document+not+found+for+file%3A%2F%2F%2FUsers%2Fnopik%2FWarsztat%2Fsunvoy%2Fapp%2Fpackages%2Futils%2Ftelemetry.cjs%0A++++at+%2FUsers%2Fnopik%2FLibrary%2FApplication+Support%2FJetBrains%2FIntelliJIdea2024.2%2Fplugins%2FSourcegraph%2Fagent%2Findex.js%3A138490%3A19%0A++++at+%2FUsers%2Fnopik%2FLibrary%2FApplication+Support%2FJetBrains%2FIntelliJIdea2024.2%2Fplugins%2FSourcegraph%2Fagent%2Findex.js%3A139426%3A18%0A++++at+async+%2FUsers%2Fnopik%2FLibrary%2FApplication+Support%2FJetBrains%2FIntelliJIdea2024.2%2Fplugins%2FSourcegraph%2Fagent%2Findex.js%3A137987%3A44%0A%09at+java.base%2Fjava.util.concurrent.CompletableFuture.reportGet%28CompletableFuture.java%3A396%29%0A%09at+java.base%2Fjava.util.concurrent.CompletableFuture.get%28CompletableFuture.java%3A2073%29%0A%09at+com.sourcegraph.cody.inspections.CodyFixHighlightPass.doCollectInformation%24lambda%245%28CodyFixHighlightPass.kt%3A122%29%0A%09at+com.sourcegraph.cody.agent.CodyAgentService%24Compani...%0A%60%60%60

so you can try to extract more info out of it

Nopik commented 1 week ago

Such thing happens basically in 30-50% of my bug report attempts. Cody was stable for few versions, and not throwing any errors in my face, but recently it started to throw exceptions more times than I use it, quickly becoming more annoying than useful.

image