redhat-developer / redhat-developer/vscode-java

Language server shuts down when attempting to use intellisense

Đang mở
#3,254 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
546
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

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
  1. Run java extension in a devcontainer
  2. import maven projects automatically on startup
  3. open a java source file in an imported project and trigger intellisense
  4. problems view intermittently clears and intellisense stops working until the language server restarts itself

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với đầu ra của Language Support for Java khi java.trace.server được đặt thành verbose, sau đó so sánh đầu ra này với các lỗi trong VS Code Developer Tools và các đường dẫn file-watcher được báo cáo. issue được hoàn thành khi có thể tái hiện việc language-server tắt không liên tục hoặc xác định được nguyên nhân của nó bằng bằng chứng có thể hành động; không có tệp repository hay bài kiểm thử nào được nêu tên.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java, typescript, vscode
Lĩnh vực
devtools
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.