redhat-developer / redhat-developer/vscode-java

Language server shuts down when attempting to use intellisense

Ouverte
#3,254 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
TypeScript
Étoiles
2.3k
Forks
546
Merge moyen
20 h 1 min
PR mergées (30 j)
11

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par la sortie de Language Support for Java avec java.trace.server défini sur verbose, puis comparez-la aux erreurs de VS Code Developer Tools et aux chemins du file-watcher signalés. L’issue est terminée lorsque l’arrêt intermittent du serveur de langage peut être reproduit ou que sa cause peut être identifiée à l’aide d’éléments probants exploitables ; aucun fichier du dépôt ni aucun test n’est nommé.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java, typescript, vscode
Domaine
devtools
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.