redhat-developer / redhat-developer/vscode-java
Language server shuts down when attempting to use intellisense
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
I'm running VS Code in a devcontainer, using Colima as the container runtime. Host operating system is MacOS X Ventura 13.5.1, container operating system is Ubuntu 22.04.2 LTS.
I've installed the vscode-java extension using the java devcontainer feature. It's running v1.21.0.
In my environment I have additionally installed IBM Semeru 11.0.20 and 8.0.382. The java language server is configured to use the embedded 17.0.7-linux-x86_64 JRE, and I've specified that explicitly in the java.jdt.ls.java.home setting to attempt to work around this issue.
When clicking around the UI when editing java (e.g. triggering intellisense in a source file) I experience restarts of the language server, where intellisense options disappear, and problems disappear from the problems view. I figure after a while the language server is restarted and I can see intellisense options again.
I've enabled "java.trace.server": "verbose" and consulted the referenced logs in the messages and troubleshooting guides. Here are the relevant excerpts:
From output -> Language Support for java:
[Error - 10:12:10 PM] Client Language Support for Java: connection to server is erroring. Shutting down server.
[Trace - 10:12:10 PM] Sending request 'shutdown - (16)'.
[Error - 10:12:10 PM] Client Language Support for Java: connection to server is erroring. Shutting down server.
[Error - 10:12:10 PM] Client Language Support for Java: connection to server is erroring. Shutting down server.
[Error - 10:12:10 PM] Client Language Support for Java: connection to server is erroring. Shutting down server.
From output -> VS Intellicode:
Error while activating Java: {"code":-32096}. If vscode-java failed to activate, try these troubleshooting steps: https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting
From F1 -> Developer: Toggle developer tools:
log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project1.../src/test/java, recursive: true, session: 0.4090436531869104): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project1.../src/test/java'
23:09:41.197 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project1.../src/test/resources, recursive: true, session: 0.18483316311899056): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project1.../src/test/resources'
23:09:41.197 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project2.../src/test/java, recursive: true, session: 0.6391248733455004): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project2.../src/test/java'
23:09:41.197 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project1.../target/generated-test-sources/test-annotations, recursive: true, session: 0.54014239349779): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project1.../target/generated-test-sources/test-annotations'
23:09:41.198 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project2.../target/generated-test-sources/test-annotations, recursive: true, session: 0.10929634161612789): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project2.../target/generated-test-sources/test-annotations'
23:09:41.198 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project3.../src/test/java, recursive: true, session: 0.9882082292151408): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project3.../src/test/java'
23:09:41.198 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project3.../target/generated-test-sources/test-annotations, recursive: true, session: 0.06354674384256787): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project3.../target/generated-test-sources/test-annotations'
23:09:41.198 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project3.../src/test/resources'
23:09:41.198 log.ts:441 ERR MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: vscjava.vscode-java-test, path: ...project3.../src/test/resources, recursive: true, session: 0.5705465953000592): EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat '...project2.../src/test/resources'
None of that looked particularly interesting. All I could tell was that there was some kind of error associated with the language server connection, and that it was shut down. I do experience this quite frequently and repeatedly, but it is intermittent, there doesn't seem to be a specific activity that triggers it. Doubtless it's something to do with the complexity of running everything in a devcontainer.
Any hints where I might find some log with more details of specifically what went wrong with the connection to the language server?
Environment
- Operating System: Mac OS X Ventura 13.5.1
- JDK version: 17.0.7-linux-x86_64
- Visual Studio Code version: 1.81.1
- Java extension version: v1.21.0
Steps To Reproduce
- Run java extension in a devcontainer
- import maven projects automatically on startup
- open a java source file in an imported project and trigger intellisense
- problems view intermittently clears and intellisense stops working until the language server restarts itself
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、java.trace.server を verbose に設定した状態で Language Support for Java の出力から始め、次にそれを VS Code Developer Tools のエラーおよび報告された file-watcher のパスと比較します。間欠的な language-server のシャットダウンを再現できるか、その原因を対処可能な証拠によって特定できた時点で issue は完了です。リポジトリ内のファイルやテストは指定されていません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript, vscode
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100