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

Open Declaration results in "TypeScript Server Error (5.2.2) - Debug Failure. False expression" #1492

Open
sebthom opened this issue Mar 18, 2024 · 6 comments

Comments

@sebthom
Copy link
Contributor

sebthom commented Mar 18, 2024

It seems that after upgrading to Eclipse 2024-03 open declaration via F3 is not working anymore at all. The error message isn't really helpful.

image

java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: <semantic> TypeScript Server Error (5.2.2)
Debug Failure. False expression.
Error: Debug Failure. False expression.
    at ConfiguredProject2.updateGraphWorker (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:176958:11)
    at ConfiguredProject2.updateGraph (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:176817:32)
    at ConfiguredProject2.updateGraph (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:178072:24)
    at updateProjectIfDirty (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:178525:35)
    at ConfiguredProject2.getLanguageService (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:176428:7)
    at IpcIOSession.getQuickInfoWorker (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:183958:31)
    at quickinfo (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:182378:43)
    at D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:184838:69
    at IpcIOSession.executeWithRequestId (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:184830:14)
    at IpcIOSession.executeCommand (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:184838:29)
    at IpcIOSession.onMessage (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:184880:51)
    at process.<anonymous> (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:186461:14)
    at process.emit (node:events:517:28)
    at emit (node:internal/child_process:944:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
	at org.eclipse.lsp4e.operations.hover.LSPTextHover.getHoverInfo(LSPTextHover.java:76)
	at org.eclipse.ui.internal.genericeditor.hover.CompositeTextHover.getHoverInfo2(CompositeTextHover.java:60)
	at org.eclipse.jface.text.TextViewerHoverManager$1.run(TextViewerHoverManager.java:155)

Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: <semantic> TypeScript Server Error (5.2.2)
Debug Failure. False expression.
Error: Debug Failure. False expression.
    at ConfiguredProject2.updateGraphWorker (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:176958:11)
    at ConfiguredProject2.updateGraph (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:176817:32)
    at ConfiguredProject2.updateGraph (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:178072:24)
    at updateProjectIfDirty (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:178525:35)
    at ConfiguredProject2.getLanguageService (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:176428:7)
    at IpcIOSession.getQuickInfoWorker (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:183958:31)
    at quickinfo (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:182378:43)
    at D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:184838:69
    at IpcIOSession.executeWithRequestId (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:184830:14)
    at IpcIOSession.executeCommand (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:184838:29)
    at IpcIOSession.onMessage (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:184880:51)
    at process.<anonymous> (D:\eclipse\plugins\org.eclipse.wildwebdeveloper_1.1.4.202311211923\node_modules\typescript\lib\tsserver.js:186461:14)
    at process.emit (node:events:517:28)
    at emit (node:internal/child_process:944:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$3(LanguageServerWrapper.java:310)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	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.lang.Thread.run(Thread.java:840)

image

@mickaelistria
Copy link
Contributor

There have been some updates to language servers recently. Can you please retry with latest build?

@Bjoern2
Copy link

Bjoern2 commented Jul 18, 2024

Same problem with version 5.4.5:

eclipse.buildId=4.23.1.202406150140
java.version=21.0.3
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments:  -product org.springframework.boot.ide.branding.sts4
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.springframework.boot.ide.branding.sts4

org.eclipse.lsp4e
Error
Thu Jul 18 11:09:25 CEST 2024
org.eclipse.lsp4j.jsonrpc.ResponseErrorException: <semantic> TypeScript Server Error (5.4.5)
Debug Failure. False expression.
Error: Debug Failure. False expression.
    at ConfiguredProject2.updateGraphWorker (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:179506:11)
    at ConfiguredProject2.updateGraph (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:179365:32)
    at ConfiguredProject2.updateGraph (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:180626:24)
    at updateProjectIfDirty (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:181085:35)
    at ConfiguredProject2.getLanguageService (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:178968:7)
    at IpcIOSession.getEncodedSemanticClassifications (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:185922:20)
    at encodedSemanticClassifications-full (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:185224:43)
    at C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187569:69
    at IpcIOSession.executeWithRequestId (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187561:14)
    at IpcIOSession.executeCommand (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187569:29)
    at IpcIOSession.onMessage (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187611:51)
    at process.<anonymous> (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:189220:14)
    at process.emit (node:events:519:28)
    at emit (node:internal/child_process:951:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: <semantic> TypeScript Server Error (5.4.5)
Debug Failure. False expression.
Error: Debug Failure. False expression.
    at ConfiguredProject2.updateGraphWorker (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:179506:11)
    at ConfiguredProject2.updateGraph (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:179365:32)
    at ConfiguredProject2.updateGraph (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:180626:24)
    at updateProjectIfDirty (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:181085:35)
    at ConfiguredProject2.getLanguageService (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:178968:7)
    at IpcIOSession.getEncodedSemanticClassifications (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:185922:20)
    at encodedSemanticClassifications-full (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:185224:43)
    at C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187569:69
    at IpcIOSession.executeWithRequestId (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187561:14)
    at IpcIOSession.executeCommand (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187569:29)
    at IpcIOSession.onMessage (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187611:51)
    at process.<anonymous> (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:189220:14)
    at process.emit (node:events:519:28)
    at emit (node:internal/child_process:951:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
	at org.eclipse.lsp4e.operations.semanticTokens.SemanticHighlightReconcilerStrategy.fullReconcile(SemanticHighlightReconcilerStrategy.java:274)
	at org.eclipse.lsp4e.operations.semanticTokens.SemanticHighlightReconcilerStrategy.fullReconcileOnce(SemanticHighlightReconcilerStrategy.java:311)
	at org.eclipse.lsp4e.operations.semanticTokens.SemanticHighlightReconcilerStrategy.reconcile(SemanticHighlightReconcilerStrategy.java:296)
	at org.eclipse.ui.internal.genericeditor.CompositeReconcilerStrategy.reconcile(CompositeReconcilerStrategy.java:63)
	at org.eclipse.jface.text.reconciler.Reconciler.process(Reconciler.java:149)
	at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:207)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: <semantic> TypeScript Server Error (5.4.5)
Debug Failure. False expression.
Error: Debug Failure. False expression.
    at ConfiguredProject2.updateGraphWorker (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:179506:11)
    at ConfiguredProject2.updateGraph (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:179365:32)
    at ConfiguredProject2.updateGraph (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:180626:24)
    at updateProjectIfDirty (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:181085:35)
    at ConfiguredProject2.getLanguageService (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:178968:7)
    at IpcIOSession.getEncodedSemanticClassifications (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:185922:20)
    at encodedSemanticClassifications-full (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:185224:43)
    at C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187569:69
    at IpcIOSession.executeWithRequestId (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187561:14)
    at IpcIOSession.executeCommand (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187569:29)
    at IpcIOSession.onMessage (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:187611:51)
    at process.<anonymous> (C:\develop\eclipse\sts-bundle\sts-4.23.1.RELEASE\plugins\org.eclipse.wildwebdeveloper_1.2.2.202405280856\node_modules\typescript\lib\tsserver.js:189220:14)
    at process.emit (node:events:519:28)
    at emit (node:internal/child_process:951:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$3(LanguageServerWrapper.java:313)
	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)
	at java.base/java.lang.Thread.run(Thread.java:1583)

For me, this happens randomly during coding. I must restart my IDE to fix this issue.
Not every restart solves this problem. Then I must restart multiple times.

Any update for this issue?

@mickaelistria
Copy link
Contributor

Thanks for verifying.
I don't have further hint to provide here and personally cannot spend time on this issue for the next months or so because of higher priority tasks in my todo-list.
I think you could start by looking at the code of the tsserver to identify what is the "False expression" and then evaluate if the issue is purely on tsserver (thus it should be reported there), or whether it is an issue of integration missing some steps or configuration.
If you're comfortable with Eclipse plugin development, you can also tweak the JSTSLanguageServer class to add the --node-inspect flag to the launch so that the LS starts in debug mode and you can then connect a debugger (from another IDE instance!) to it and hopefully identify the cause of the error.

@mplukas
Copy link

mplukas commented Sep 27, 2024

Very superficial analysis.

The problem started after WWD switched to the TypeScript sever version 5.2+ (WWD release 1.3.1+).
It is caused by TypeScript 5.2 PR microsoft/TypeScript#54504, more specifically this change in the PR: "ensures that project always correctly represents the program state same as that of LS so that its reflected correctly for all purposes." It adds the assert that fails when TypeScript server is used from WWD:

    const oldProgram = this.languageService.getCurrentProgram();
    Debug.assert(oldProgram === this.program);

Have no idea if WWD or TypeScript server misbehaves here.

Some workaround:
If the project uses older than 5.2 TypeScrip version, then one can switch Eclipse WWD preference "JS/TS (Wild Web Developer)/TypeScript version used ..." to "Project" instead of "Eclipse". Then older TypeScript server from the project can be successfully used.

@jcompagner
Copy link
Contributor

i do wonder if this is not more a LSP problem then a WWD problem?

@jcompagner
Copy link
Contributor

this is a bit weird, i have setup my environment again to just debug WWD
But in a simple angular test project i couldn't get the above to be reproduced.
So then i just imported my main big angular project and until now also no problem.. So i still a bit confused when and why this happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants