Skip to content

Missing header Content-Length in input error #1238

Closed

Description

@hakimio

Getting following errors with v0.15.0 on startup:

java.lang.IllegalStateException: Missing header Content-Length in input "CnetLnt:13
{"jsnrpc:".""d""""eut:"evrIf"{nm""spcslp,vrin:..",cpblte"{cdAtoPoie"tu,cmltoPoie"{rslervdr:re"rgeCaatr"[.,@,/],dfntoPoie"tu,dcmnFrattu,dcmnRneomtigrvdr:re"ouetnyeomtigrvdr:"isTigrhrce""""oergeCaatr:""}"ouetihihPoie"tu,dcmnLnPoie"{rslervdr:re,dcmnSmoPoie"{lbl:CS}"xctCmadrvder:"omns:"motatfc""eoeuue-mot,miti-rnlto""irt-odcomn""irt-erctddlmtr,cso-noainqiki""omtrne,aayedpnece""cieeio-hne"}"oePoie"tu,ipeettoPoie"tu,rfrnePoie"{wrDnPors"tu}"eetoRnervdr:"oueteetr:{lnug""d""atr""**cs}}"etouetyc:,wrsaeyblrvdr:"okoergress":true},"workspace":"fileOperatin"{ddrae:"ies:{sm""ie,pten:lb:*/.csjo,s,s,rprte},ah""ie}],ddeee:"itr"["cee:fl""atr"{go""**}],ddeae:"itr"["scheme":"fie,pten:"lb:*/"}}"ileee:"itr"["cee:fl""atr"{go""**}],wlRnm"{fles:{shm""ie,pten:"lb:*/"}},wrsaeodr"{spotd:re"hneoiiain"tu}}}Content-Length: 1536

"
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:91)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	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)
	at java.base/java.lang.Thread.run(Thread.java:1583)
java.lang.IllegalStateException: Missing header Content-Length in input "otn-egh 56
o"20,i:1,rsl"{sreno:"ae:@a/d-s""eso""921}"aaiiis:"oecinrvdr:re"opeinrvdr:"eovPoie"tu,tigrhrces:""""""}"eiiinrvdr:re"ouetomtingProvider":re"ouetagFratnPoie"tu,dcmnOTpFratnPoie"{frtrgeCaatr:},mrTigrhrce"[;],dcmnHglgtrvdr:re"ouetikrvdr:"eovPoie"tu}"ouetyblrvdr:"ae""D",eeueomnPoi"{cmad"[ipr-riat,rmv-nsdipr""anantasain,mgaet-ocmet,mgaedpeae-eiie""utmantto-ucfx,fra-ag""nlz-eednis,atv-dtrcagd],hvrrvdr:re"mlmnainrvdr:re"eeecsrvdr:"okoerges:re,slcinagPoie"{dcmnSlco"["agae:cs,pten:*/.d"],txDcmnSn"1"okpcSmoPoie"{wrDnPo{os:"iCet"{fltr"["chee:fl""atr"{"go""**{d,sncncvpoeis""mtces:fl"}}"iDlt"{fles:{shm""ie,pten:"lb:*/"}}"iRnm"{fles:{l""atr"{go""**}],wlDlt"{fles:{shm""ie,pten:"lb:*/"}}"ileae:"itr"["cee:fl""atr"{go""**}]}"okpcFles:"upre"tu,cagNtfctos:re}}{"jsonrpc":"2.0","id":"1","result":{"serverInfo":{"name":"@sap/cds-lsp","version":"9.2.1"},"capabilities":{"codeActionProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":[".","@","/"]},"definitionProvider":true,"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"}","moreTriggerCharacter":[";"]},"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":true},"documentSymbolProvider":{"label":"CDS"},"executeCommandProvider":{"commands":["import-artifact","remove-unused-import","maintain-translation","migrate-to-doccomment","migrate-deprecated-delimiter","custom-annotation-quickfix","format-range","analyze-dependencies","active-editor-changed"]},"hoverProvider":true,"implementationProvider":true,"referencesProvider":{"workDoneProgress":true},"selectionRangeProvider":{"documentSelector":[{"language":"cds","pattern":"**/*.cds"}]},"textDocumentSync":1,"workspaceSymbolProvider":{"workDoneProgress":true},"workspace":{"fileOperations":{"didCreate":{"filters":[{"scheme":"file","pattern":{"glob":"**/*.{cds,json,csn,csv,properties}","matches":"file"}}]},"didDelete":{"filters":[{"scheme":"file","pattern":{"glob":"**/*"}}]},"didRename":{"filters":[{"scheme":"file","pattern":{"glob":"**/*"}}]},"willDelete":{"filters":[{"scheme":"file","pattern":{"glob":"**/*"}}]},"willRename":{"filters":[{"scheme":"file","pattern":{"glob":"**/*"}}]}},"workspaceFolders":{"supported":true,"changeNotifications":true}}}}}Content-Length: 99
{"jsonrpc":"2.0","method":"telemetry/event","params":{"type":"statistics","trigger":"server stop"}}Content-Length: 40

"
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:91)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	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)
	at java.base/java.lang.Thread.run(Thread.java:1583)

And many more like that.

Activity

  1. angelozerr commented on Aug 26, 2025

    @angelozerr
    Contributor

    I think this problem comes from when a language server is stopped and restarted and sometimes (how to reproduce that?) the stop is not done correctly and you have this usecase.

    The only solution is to restart the IDE.

  2. hakimio commented on Aug 26, 2025

    @hakimio
    Author

    I just installed v0.15.0 without doing anything and then restarted the IDE.
    Anyway, seems to be working now after the second restart. Will let you know if the issue re-occurs.

  3. angelozerr commented on Aug 26, 2025

    @angelozerr
    Contributor

    I just installed v0.15.0 without doing anything and then restarted the IDE. Anyway, seems to be working now after the second restart. Will let you know if the issue re-occurs.

    You will have again the problem. I need to investigate how to reproduce it (just occured 2 times in my case) to do a proper fix.

  4. added
    bug
    on Aug 27, 2025
  5. hakimio commented on Aug 29, 2025

    @hakimio
    Author

    The bug seems to appear both on fresh install when IDE is started the first time and just after updating the IDE with built-in updater.

  6. angelozerr commented on Aug 29, 2025

    @angelozerr
    Contributor

    Thanks for your feedback.

    Which language server are you using? With an IJ plugin?

  7. hakimio commented on Aug 29, 2025

    @hakimio
    Author
  8. angelozerr commented on Aug 29, 2025

    @angelozerr
    Contributor

    OK thanks. This plugin highlights several problem from LSP4IJ that I need to fix.

  9. rgrunber commented on Sep 8, 2025

    @rgrunber
    Member

    @angelozerr the output looks like something is manipulating the JSON communication.

    CnetLnt:13 -> Content-Length: 13
    otn-egh 56 -> Content-Length: 56

    Would there be some byte/character manipulation happening that removes characters ?

  10. angelozerr commented on Sep 8, 2025

    @angelozerr
    Contributor

    I suspect the problem is when language server stop and it doesn't dispose correctly the ConcurrentMessageProcessor and it uses an old ConcurrentMessageProcessor which is in a bad state.

    I need to take time to try to stress LSP4IJ with this usecase since I have reproduced it just in one time.

  11. angelozerr commented on Sep 22, 2025

    @angelozerr
    Contributor

    @hakimio is there any change to have your idea log when you will have your issue?

  12. hakimio commented on Sep 22, 2025

    @hakimio
    Author

    I'll upload the logs if the error appears again. For now, it hasn't happened with the latest version of LSP4IJ (0.16.1).
    Before it would happen after IDE upgrade or fresh new install. You can also test this with WebStorm IDE - they have both free non-commercial license and 30 day trial.

  13. hakimio commented on Oct 1, 2025

    @hakimio
    Author

    @angelozerr I just started testing the latest nightly build now. Let's see if it fixes the issue. For now seems to be working well.

    With the latest stable plugin version (0.16.1), I got the same error again:

    java.lang.IllegalStateException: Missing header Content-Length in input "n 3
    {"snp"".""d:2,rsl"{"evrno:"ae:@a/d-s""eso""..",cpblte"{coecinrvdr:re"opeinrvdr:"eovPoie"tu,tigrhrces:""""""}"eiiinrvdr:re"ouetomtigrovider":tre"ouetagFratnPovdr:re"ouetnyeomtigrvdr:"isTigrhrce""""oergeCaatr:""}"ouetihihPoie"tu,dcmnLnPoie"{rslervdr:re,dcmnSmoPoie"{lbl:CS}"xctCmadrvdr:"omns:"motatfc""eoeuue-mot,miti-rnlto""irt-odcomn""irt-erctddlmtr,cso-noainqiki""omtrne,aayedpnece""cieeio-hne"}"oePoie"tu,ipeettoPoie"tu,rfrnePoie"{wrDnPors"tu}"eetoRnervdr:"oueteetr:{lnug""d""atr""**cs}}"etouetyc:,wrsaeyblrvdr:"okoergress":true},"worspc"{flOeain"{ddrae:"itr"["cee:fl""ten:go""**{d,sncs,s,rpris""ace""ie}}}"iDlt"{fles:{shm""ie,pten:"lb:*/"}}"iRnm"{fles:{sheme""ie,pten:"lb:*/"}}"ileee:"itr"["cee:fl""atr"{go""**}],wlRnm"{fles:{shm""ie,pten:"lb:*/"}},wrsaeodr"{spotd:re"hneoiiain"tu}}}etLnt:13
    
    "
    	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:91)
    	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
    	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)
    	at java.base/java.lang.Thread.run(Thread.java:1583)
    

    Log from the language server console:

    com.redhat.devtools.lsp4ij.server.CannotStartServerException: Error while starting language server 'cds' (pid=null)
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.lambda$start$14(LanguageServerWrapper.java:442)
    	at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:990)
    	at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:974)
    	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
    	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
    	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.helpAsyncBlocker(ForkJoinPool.java:1615)
    	at java.base/java.util.concurrent.ForkJoinPool.helpAsyncBlocker(ForkJoinPool.java:2686)
    	at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1933)
    	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
    	at com.redhat.devtools.lsp4ij.internal.CompletableFutures.waitUntilDone(CompletableFutures.java:144)
    	at com.redhat.devtools.lsp4ij.internal.CompletableFutures.waitUntilDone(CompletableFutures.java:111)
    	at com.redhat.devtools.lsp4ij.features.inlayhint.LSPInlayHintsProvider.doCollect(LSPInlayHintsProvider.java:65)
    	at com.redhat.devtools.lsp4ij.features.AbstractLSPDeclarativeInlayHintsProvider$Collector.collectHintsForFile(AbstractLSPDeclarativeInlayHintsProvider.java:79)
    	at com.intellij.codeInsight.hints.declarative.impl.DeclarativeInlayHintsPass.doCollectInformation(DeclarativeInlayHintsPass.kt:58)
    	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:71)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:435)
    	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:29)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$3(PassExecutorService.java:431)
    	at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.tryRunReadAction(NestedLocksThreadingSupport.kt:826)
    	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1221)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$4(PassExecutorService.java:421)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:681)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:756)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:712)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:680)
    	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:420)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:395)
    	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.cacheFileTypesInside(FileTypeManagerImpl.java:852)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$1(PassExecutorService.java:395)
    	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:258)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:393)
    	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:265)
    	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.lang.RuntimeException: Exception occurred while creating an instance of the stream connection provider
    	at com.redhat.devtools.lsp4ij.server.definition.extension.ExtensionLanguageServerDefinition.createConnectionProvider(ExtensionLanguageServerDefinition.java:59)
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.lambda$start$3(LanguageServerWrapper.java:326)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
    	... 35 more
    Caused by: com.intellij.openapi.progress.CeProcessCanceledException: com.intellij.openapi.progress.IndicatorCancellationException
    	at com.intellij.serviceContainer.ComponentManagerImplKt.runBlockingInitialization$lambda$10(ComponentManagerImpl.kt:1660)
    	at com.intellij.openapi.progress.ContextKt.prepareIndicatorThreadContext$lambda$5(context.kt:109)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.silenceGlobalIndicator(CoreProgressManager.java:1049)
    	at com.intellij.openapi.progress.ContextKt.prepareIndicatorThreadContext(context.kt:107)
    	at com.intellij.openapi.progress.ContextKt.prepareThreadContext(context.kt:78)
    	at com.intellij.serviceContainer.ComponentManagerImplKt.runBlockingInitialization(ComponentManagerImpl.kt:1644)
    	at com.intellij.serviceContainer.ComponentManagerImplKt.doGetOrCreateInstanceBlocking(ComponentManagerImpl.kt:1534)
    	at com.intellij.serviceContainer.ComponentManagerImplKt.getOrCreateInstanceBlocking(ComponentManagerImpl.kt:1529)
    	at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:729)
    	at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:673)
    	at com.sap.cap.cds.intellij.settings.AppSettings.getInstance(AppSettings.java:24)
    	at com.sap.cap.cds.intellij.util.NodeJsUtil.getCdsLspEnvMapFromSetting(NodeJsUtil.java:28)
    	at com.sap.cap.cds.intellij.lspServer.CdsLspServerDescriptor.getServerCommandLine(CdsLspServerDescriptor.java:50)
    	at com.sap.cap.cds.intellij.lsp4ij.CdsLanguageServer.<init>(CdsLanguageServer.java:22)
    	at com.sap.cap.cds.intellij.lsp4ij.CdsLanguageServerFactory.createConnectionProvider(CdsLanguageServerFactory.java:15)
    	at com.redhat.devtools.lsp4ij.server.definition.extension.ExtensionLanguageServerDefinition.createConnectionProvider(ExtensionLanguageServerDefinition.java:57)
    	... 37 more
    Caused by: com.intellij.openapi.progress.IndicatorCancellationException
    	at com.intellij.openapi.progress.ContextKt$cancelWithIndicator$1.invokeSuspend(context.kt:135)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
    	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
    	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:613)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:1183)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:778)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:765)
    Caused by: com.intellij.openapi.progress.ProcessCanceledException
    	at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.throwIfCanceled(AbstractProgressIndicatorBase.java:174)
    	at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.checkCanceled(AbstractProgressIndicatorBase.java:164)
    	at com.intellij.codeInsight.daemon.impl.DaemonProgressIndicator.checkCanceled(DaemonProgressIndicator.java:118)
    	at com.intellij.openapi.progress.ContextKt$cancelWithIndicator$1.invokeSuspend(context.kt:131)
    	... 8 more
    java.lang.Exception: Timeout error while shutdown the language server 'cds'
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.shutdownLanguageServerInstance(LanguageServerWrapper.java:695)
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.shutdownAll(LanguageServerWrapper.java:661)
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.lambda$stop$15(LanguageServerWrapper.java:621)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
    	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.TimeoutException
    	at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1960)
    	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.shutdownLanguageServerInstance(LanguageServerWrapper.java:689)
    	... 9 more
    
  14. angelozerr commented on Oct 1, 2025

    @angelozerr
    Contributor

    Thats great that it is working.

    For the log console is it with nighty or stable ?

  15. hakimio commented on Oct 1, 2025

    @hakimio
    Author

    Stable.

  16. self-assigned this
    on Oct 1, 2025
  17. moved this to In Progress in Java Toolingon Oct 1, 2025
  18. moved this from In Progress to Done in Java Toolingon Oct 1, 2025
  19. added this to the 0.17.0 milestone on Oct 1, 2025
  20. angelozerr commented on Oct 1, 2025

    @angelozerr
    Contributor

    It should be fixed with #1303

  21. angelozerr commented on Oct 1, 2025

    @angelozerr
    Contributor

    Your stack trace is very helpful. It seems when SAP LS get nodejs configuration from settings, it can crash because IJ cancel the settings creation.

    @siarhei-murkou @tim-sh even if I have fixed the "Missing hearder" error (I restart the server in this case) it could interesting to study this following trace:

    • the editor is opened
    • IJ call inlay hint
    • the LS starts
    • your plugin call AppSettings.getInstance and for some reason IJ throws a CeProcessCanceledException:
    com.redhat.devtools.lsp4ij.server.CannotStartServerException: Error while starting language server 'cds' (pid=null)
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.lambda$start$14(LanguageServerWrapper.java:442)
    	at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:990)
    	at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:974)
    	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
    	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
    	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.helpAsyncBlocker(ForkJoinPool.java:1615)
    	at java.base/java.util.concurrent.ForkJoinPool.helpAsyncBlocker(ForkJoinPool.java:2686)
    	at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1933)
    	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
    	at com.redhat.devtools.lsp4ij.internal.CompletableFutures.waitUntilDone(CompletableFutures.java:144)
    	at com.redhat.devtools.lsp4ij.internal.CompletableFutures.waitUntilDone(CompletableFutures.java:111)
    	at com.redhat.devtools.lsp4ij.features.inlayhint.LSPInlayHintsProvider.doCollect(LSPInlayHintsProvider.java:65)
    	at com.redhat.devtools.lsp4ij.features.AbstractLSPDeclarativeInlayHintsProvider$Collector.collectHintsForFile(AbstractLSPDeclarativeInlayHintsProvider.java:79)
    	at com.intellij.codeInsight.hints.declarative.impl.DeclarativeInlayHintsPass.doCollectInformation(DeclarativeInlayHintsPass.kt:58)
    	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:71)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:435)
    	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:29)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$3(PassExecutorService.java:431)
    	at com.intellij.platform.locking.impl.NestedLocksThreadingSupport.tryRunReadAction(NestedLocksThreadingSupport.kt:826)
    	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1221)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$4(PassExecutorService.java:421)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:681)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:756)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:712)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:680)
    	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:420)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:395)
    	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.cacheFileTypesInside(FileTypeManagerImpl.java:852)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$1(PassExecutorService.java:395)
    	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:258)
    	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:393)
    	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:265)
    	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.lang.RuntimeException: Exception occurred while creating an instance of the stream connection provider
    	at com.redhat.devtools.lsp4ij.server.definition.extension.ExtensionLanguageServerDefinition.createConnectionProvider(ExtensionLanguageServerDefinition.java:59)
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.lambda$start$3(LanguageServerWrapper.java:326)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
    	... 35 more
    Caused by: com.intellij.openapi.progress.CeProcessCanceledException: com.intellij.openapi.progress.IndicatorCancellationException
    	at com.intellij.serviceContainer.ComponentManagerImplKt.runBlockingInitialization$lambda$10(ComponentManagerImpl.kt:1660)
    	at com.intellij.openapi.progress.ContextKt.prepareIndicatorThreadContext$lambda$5(context.kt:109)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.silenceGlobalIndicator(CoreProgressManager.java:1049)
    	at com.intellij.openapi.progress.ContextKt.prepareIndicatorThreadContext(context.kt:107)
    	at com.intellij.openapi.progress.ContextKt.prepareThreadContext(context.kt:78)
    	at com.intellij.serviceContainer.ComponentManagerImplKt.runBlockingInitialization(ComponentManagerImpl.kt:1644)
    	at com.intellij.serviceContainer.ComponentManagerImplKt.doGetOrCreateInstanceBlocking(ComponentManagerImpl.kt:1534)
    	at com.intellij.serviceContainer.ComponentManagerImplKt.getOrCreateInstanceBlocking(ComponentManagerImpl.kt:1529)
    	at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:729)
    	at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:673)
    	at com.sap.cap.cds.intellij.settings.AppSettings.getInstance(AppSettings.java:24)
    	at com.sap.cap.cds.intellij.util.NodeJsUtil.getCdsLspEnvMapFromSetting(NodeJsUtil.java:28)
    	at com.sap.cap.cds.intellij.lspServer.CdsLspServerDescriptor.getServerCommandLine(CdsLspServerDescriptor.java:50)
    	at com.sap.cap.cds.intellij.lsp4ij.CdsLanguageServer.<init>(CdsLanguageServer.java:22)
    	at com.sap.cap.cds.intellij.lsp4ij.CdsLanguageServerFactory.createConnectionProvider(CdsLanguageServerFactory.java:15)
    	at com.redhat.devtools.lsp4ij.server.definition.extension.ExtensionLanguageServerDefinition.createConnectionProvider(ExtensionLanguageServerDefinition.java:57)
    	... 37 more
    Caused by: com.intellij.openapi.progress.IndicatorCancellationException
    	at com.intellij.openapi.progress.ContextKt$cancelWithIndicator$1.invokeSuspend(context.kt:135)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
    	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
    	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:613)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:1183)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:778)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:765)
    Caused by: com.intellij.openapi.progress.ProcessCanceledException
    	at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.throwIfCanceled(AbstractProgressIndicatorBase.java:174)
    	at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.checkCanceled(AbstractProgressIndicatorBase.java:164)
    	at com.intellij.codeInsight.daemon.impl.DaemonProgressIndicator.checkCanceled(DaemonProgressIndicator.java:118)
    	at com.intellij.openapi.progress.ContextKt$cancelWithIndicator$1.invokeSuspend(context.kt:131)
    	... 8 more
    java.lang.Exception: Timeout error while shutdown the language server 'cds'
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.shutdownLanguageServerInstance(LanguageServerWrapper.java:695)
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.shutdownAll(LanguageServerWrapper.java:661)
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.lambda$stop$15(LanguageServerWrapper.java:621)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
    	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.TimeoutException
    	at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1960)
    	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
    	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.shutdownLanguageServerInstance(LanguageServerWrapper.java:689)
    	... 9 more
    
    
    

    I don't know if the fix should be done in LSP4IJ side or from your plugin side. I think this error already exists but with my fix we don't see it since I restart the LS.

  22. angelozerr commented on Oct 1, 2025

    @angelozerr
    Contributor

    @hakimio I think the discussion should be continued at cap-js/cds-intellij#222

    Should LSP4IJ also just rethrow it and let the IDE handle it?

    Perhaps I don't know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions