You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v1.15.x causes Java to be non-functional in GitHub Codespaces #2968
Running and debugging Java projects stopped working in Codespaces with the release of v1.15.00. Clicking the Run button on a project while in the web-based Codespaces results in the panel below appearing and hanging in an endless loop. The project never runs.
Downgrading to v1.14.0 solves the problem. Upgrading to the pre-release does not resolve the problem.
@jdneo I think you might be the odd one out here. I just tested on a recently factory reset Chromebook with no previous cache of any kind and the same issue persists. @davidgassner is reporting the same issue. So is @jkeech.
Following the troubleshooting steps in the wiki does not solve the issue for me. The only ting that solves it is rolling back the version to 1.14.0
A potential path forward is to figure out why you are not seeing the issue when we are.
@jdneo As @mor10 indicated, I'm seeing this issue too. Here are added elements:
-If I open the codespace in desktop VS Code it works fine.
-Downgrading the extension to 1.14.0 fixes the issue.
-After downgrading and running at least once, I can upgrade back to the release version and it works.
@snjeza That seems to solve the issue for the example project! Looking closely I can see I'm testing across other projects to see if this is the project was using "LightWeight" mode when it was not working and this setting changes that.
Will report back and close the issue once I've done more extensive testing, but so far this looks good! Thanks.
On 1.14.0 & 1.15.0, the vscode-java extension is in lightweight mode but the settings clearly show ("java.server.launchMode":"Hybrid"). The odd part is I'm pretty sure the first time I attempted this, downgrading to 1.14.0 worked. However, I can confirm looking through the processes that only the syntax server is up, and the standard one never launched.
You can choose to load the projects, or set the launch mode to "Standard" and the problem should go away. However, if you don't do the workaround, and click the Run/Debug button, there should be a prompt to inform you that running/debugging requires standard mode, and offer you to switch. In Codespaces, the prompt never shows, and instead you just see the "Importing Projects" mentioned by others.
Overall, I see 2 issues worth investigating :
1. Why is "java.server.launchMode":"Hybrid" not being respected ?
2. The progress bar basically shows up, but it isn't doing anything, and since the prompt to switch to standard mode never shows, it seems like something is going wrong around https://github.com/microsoft/vscode-java-debug/blob/0.49.0/src/utility.ts#L232-L235 . Could it be #2905 ? But then why can't it be reproduced locally?
I also noticed the language servers don't seem to shut down between reloading the window, so they all remain. Even stranger, attempting to terminate them with kill spawns replacements. But that should only happen if they're all still connected to the client(s) 🤯 .
Also, I started seeing the extension host just fail if I reloaded the window enough times :
stacktrace
2023-03-01 20:47:04.082 [error] [remote-connection][ExtensionHost][0844b…][reconnect][codespaces+rgrunber-didactic-guacamole-5g79pxgr49379px:443] received error control message when negotiating connection. Error:
2023-03-01 20:47:04.087 [error] $@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:638:59889
p/<@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:638:50515
invoke@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:145
deliver@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:2066
fire@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:1704
fire@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:550:14743
E@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:550:18843
beginAcceptReconnection/<@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:550:17988
invoke@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:145
deliver@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:2066
fire@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:1704
acceptChunk@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:550:12474
f/<@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:550:11761
onData/<@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:638:38972
invoke@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:145
deliver@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:2066
fire@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:1704
22988/r</initializeChannel/r</</</<@https://github.dev/static/app.83f9ccac42f1a27d29ec.js:1:151770
invoke@https://github.dev/static/220.071cbdd47a32aa14db31.js:1:26065
fire@https://github.dev/static/220.071cbdd47a32aa14db31.js:1:26795
handleDataReceived@https://github.dev/static/commons-app-sshChannel.js.c28c5b6a7bea32de198a.js:1:5079
handleDataMessage@https://github.dev/static/commons-app-connectionService.js.55328785f9c746a9eb83.js:1:7458
handleMessage@https://github.dev/static/commons-app-connectionService.js.55328785f9c746a9eb83.js:1:2619
handleMessage@https://github.dev/static/commons-app-sshSession.js.f6ea02ef21f506892001.js:1:7508
processMessages@https://github.dev/static/commons-app-sshSession.js.f6ea02ef21f506892001.js:1:5879
2023-03-01 20:47:04.090 [error] [remote-connection][ExtensionHost][0844b…][reconnect] A permanent error occurred in the reconnecting loop! Will give up now! Error:
2023-03-01 20:47:04.093 [error] $@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:638:59889
p/<@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:638:50515
invoke@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:145
deliver@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:2066
fire@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:1704
fire@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:550:14743
E@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:550:18843
beginAcceptReconnection/<@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:550:17988
invoke@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:145
deliver@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:2066
fire@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:1704
acceptChunk@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:550:12474
f/<@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:550:11761
onData/<@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:638:38972
invoke@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:145
deliver@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:2066
fire@https://main.vscode-cdn.net/stable/92da9481c0904c6adfe372c12da3b7748d74bdcb/out/vs/workbench/workbench.web.main.js:83:1704
22988/r</initializeChannel/r</</</<@https://github.dev/static/app.83f9ccac42f1a27d29ec.js:1:151770
invoke@https://github.dev/static/220.071cbdd47a32aa14db31.js:1:26065
fire@https://github.dev/static/220.071cbdd47a32aa14db31.js:1:26795
handleDataReceived@https://github.dev/static/commons-app-sshChannel.js.c28c5b6a7bea32de198a.js:1:5079
handleDataMessage@https://github.dev/static/commons-app-connectionService.js.55328785f9c746a9eb83.js:1:7458
handleMessage@https://github.dev/static/commons-app-connectionService.js.55328785f9c746a9eb83.js:1:2619
handleMessage@https://github.dev/static/commons-app-sshSession.js.f6ea02ef21f506892001.js:1:7508
processMessages@https://github.dev/static/commons-app-sshSession.js.f6ea02ef21f506892001.js:1:5879
2023-03-01 20:47:04.096 [error] Extension host (Remote) terminated unexpectedly with code null.
2023-03-01 20:47:04.100 [error] Extension host (Remote) terminated unexpectedly. The following extensions were running: vscode.git-base, GitHub.codespaces, vscode.emmet, redhat.java, VisualStudioExptTeam.vscodeintellicode, vscjava.vscode-java-debug, vscjava.vscode-java-dependency, vscjava.vscode-java-pack, vscode.github-authentication, vscode.git, vscode.github, vscjava.vscode-java-test, vscode.microsoft-authentication, vscode.debug-auto-launch, vscode.merge-conflict, dbaeumer.vscode-eslint, GitHub.vscode-pull-request-github
Why is "java.server.launchMode":"Hybrid" not being respected ?
It was by design to speed up first time startup in CodeSpaces, where most users are supposed to view code or do minor modification, and switch to standard mode on demand. See #1780
as that's probably what gets triggered in code spaces. If I also build vscode-java-debug into the same workspace and run, it seems like the prompt works on 1.14.0 and doesn't come up on 1.15.0. The difference is at https://github.com/microsoft/vscode-java-debug/blob/0.49.0/src/utility.ts#L232-L235 . api.serverMode is LightWeight on 1.14.0 and Hybrid on 1.15.0. Definitely looks to me like #2905 may be causing it.
Activity
jdneo commentedon Feb 28, 2023
I cannot reproduce the issue. Have you tried to clean the workspace cache? Is there any errors in the logs?
See: https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting
mor10 commentedon Feb 28, 2023
@jdneo I think you might be the odd one out here. I just tested on a recently factory reset Chromebook with no previous cache of any kind and the same issue persists. @davidgassner is reporting the same issue. So is @jkeech.
Following the troubleshooting steps in the wiki does not solve the issue for me. The only ting that solves it is rolling back the version to 1.14.0
A potential path forward is to figure out why you are not seeing the issue when we are.
davidgassner commentedon Feb 28, 2023
@jdneo As @mor10 indicated, I'm seeing this issue too. Here are added elements:
-If I open the codespace in desktop VS Code it works fine.
-Downgrading the extension to 1.14.0 fixes the issue.
-After downgrading and running at least once, I can upgrade back to the release version and it works.
jdneo commentedon Mar 1, 2023
I checked it again today still cannot repro it in the codespace, have no idea why.
@snjeza @rgrunber @fbricon Will you repro it in your codespace?
snjeza commentedon Mar 1, 2023
@jdneo I can't reproduce the issue.
@mor10 @davidgassner Could yo try to set
mor10 commentedon Mar 1, 2023
@snjeza That seems to solve the issue for the example project! Looking closely I can see I'm testing across other projects to see if this is the project was using "LightWeight" mode when it was not working and this setting changes that.
Will report back and close the issue once I've done more extensive testing, but so far this looks good! Thanks.
rgrunber commentedon Mar 2, 2023
I'm able to reproduce it in Codespaces.
On 1.14.0 & 1.15.0, the vscode-java extension is in lightweight mode but the settings clearly show (
"java.server.launchMode":"Hybrid"). The odd part is I'm pretty sure the first time I attempted this, downgrading to 1.14.0 worked. However, I can confirm looking through the processes that only the syntax server is up, and the standard one never launched.You can choose to load the projects, or set the launch mode to "Standard" and the problem should go away. However, if you don't do the workaround, and click the Run/Debug button, there should be a prompt to inform you that running/debugging requires standard mode, and offer you to switch. In Codespaces, the prompt never shows, and instead you just see the "Importing Projects" mentioned by others.
Overall, I see 2 issues worth investigating :
1. Why is"java.server.launchMode":"Hybrid"not being respected ?2. The progress bar basically shows up, but it isn't doing anything, and since the prompt to switch to standard mode never shows, it seems like something is going wrong around https://github.com/microsoft/vscode-java-debug/blob/0.49.0/src/utility.ts#L232-L235 . Could it be #2905 ? But then why can't it be reproduced locally?
I also noticed the language servers don't seem to shut down between reloading the window, so they all remain. Even stranger, attempting to terminate them with
killspawns replacements. But that should only happen if they're all still connected to the client(s) 🤯 .Also, I started seeing the extension host just fail if I reloaded the window enough times :
stacktrace
Eskibear commentedon Mar 2, 2023
It was by design to speed up first time startup in CodeSpaces, where most users are supposed to view code or do minor modification, and switch to standard mode on demand. See #1780
rgrunber commentedon Mar 2, 2023
Ok, then we can ignore that behaviour. I tried reproducing the conditions with something like
as that's probably what gets triggered in code spaces. If I also build vscode-java-debug into the same workspace and run, it seems like the prompt works on 1.14.0 and doesn't come up on 1.15.0. The difference is at https://github.com/microsoft/vscode-java-debug/blob/0.49.0/src/utility.ts#L232-L235 .
api.serverModeisLightWeighton 1.14.0 andHybridon 1.15.0. Definitely looks to me like #2905 may be causing it.Fix regression in API impacting Codespaces
Fix regression in API impacting Codespaces