Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CancellationException while server is stopping #140

Open
fbricon opened this issue Feb 19, 2024 · 2 comments
Open

CancellationException while server is stopping #140

fbricon opened this issue Feb 19, 2024 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented Feb 19, 2024

Looks like this happened while an LS was stopping apparently:

Error while collecting LSP CodeLens

java.util.concurrent.ExecutionException: java.util.concurrent.CancellationException
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
	at com.redhat.devtools.lsp4ij.internal.CompletableFutures.waitUntilDone(CompletableFutures.java:103)
	at com.redhat.devtools.lsp4ij.operations.codelens.LSPCodeLensProvider.computeCodeVision(LSPCodeLensProvider.java:104)
	at com.redhat.devtools.lsp4ij.operations.codelens.LSPCodeLensProvider.computeCodeVision(LSPCodeLensProvider.java:55)
	at com.intellij.codeInsight.codeVision.CodeVisionHost$calculateFrontendLenses$2.invoke(CodeVisionHost.kt:441)
	at com.intellij.codeInsight.codeVision.CodeVisionHost$calculateFrontendLenses$2.invoke(CodeVisionHost.kt:410)
	at com.intellij.codeInsight.codeVision.CodeVisionHost.executeOnPooledThread$lambda$11$lambda$10(CodeVisionHost.kt:498)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
	at com.intellij.codeInsight.codeVision.CodeVisionHost.executeOnPooledThread$lambda$11(CodeVisionHost.kt:498)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
	at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	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:840)
Caused by: java.util.concurrent.CancellationException
	at java.base/java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2478)
	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.stop(LanguageServerWrapper.java:557)
	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.stop(LanguageServerWrapper.java:540)
	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.start(LanguageServerWrapper.java:300)
	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.getInitializedServer(LanguageServerWrapper.java:809)
	at com.redhat.devtools.lsp4ij.LanguageServiceAccessor.lambda$getLanguageServers$2(LanguageServiceAccessor.java:113)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
	at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
	at com.redhat.devtools.lsp4ij.LanguageServiceAccessor.lambda$getLanguageServers$4(LanguageServiceAccessor.java:127)
	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

This showed up as an error popup in the UI

@fbricon fbricon added the bug Something isn't working label Feb 19, 2024
@fbricon
Copy link
Contributor Author

fbricon commented Feb 19, 2024

FTR I was testing the build from #137

@fbricon
Copy link
Contributor Author

fbricon commented Mar 5, 2024

Saw similar issue, after, I think, changing the typescript command providing an invalid launch command:

java.util.concurrent.CompletionException: java.util.concurrent.CancellationException
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:636)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2480)
	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.stop(LanguageServerWrapper.java:557)
	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.stop(LanguageServerWrapper.java:540)
	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.start(LanguageServerWrapper.java:300)
	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.getInitializedServer(LanguageServerWrapper.java:809)
	at com.redhat.devtools.lsp4ij.LanguageServiceAccessor.lambda$getLanguageServers$2(LanguageServiceAccessor.java:113)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
	at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
	at com.redhat.devtools.lsp4ij.LanguageServiceAccessor.lambda$getLanguageServers$4(LanguageServiceAccessor.java:127)
	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.util.concurrent.CancellationException
	at java.base/java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2478)
	... 21 more

@angelozerr angelozerr self-assigned this Mar 19, 2024
@angelozerr angelozerr added this to the 0.0.1 milestone Mar 19, 2024
@angelozerr angelozerr modified the milestones: 0.0.1, 0.0.2 May 21, 2024
@angelozerr angelozerr modified the milestones: 0.0.2, 0.0.3 May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants