-
Notifications
You must be signed in to change notification settings - Fork 440
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
v1.15.x causes Java to be non-functional in GitHub Codespaces #2968
Comments
See: https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting |
@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 I can't reproduce the issue.
|
@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. |
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 ( 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 :
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 Also, I started seeing the extension host just fail if I reloaded the window enough times : stacktrace
|
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 |
Ok, then we can ignore that behaviour. I tried reproducing the conditions with something like diff --git a/src/extension.ts b/src/extension.ts
index 5c950e7..cd99aa6 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -371,7 +371,7 @@ export function activate(context: ExtensionContext): Promise<ExtensionAPI> {
const importOnStartupSection: string = "project.importOnFirstTimeStartup";
const importOnStartup = config.get(importOnStartupSection);
if (importOnStartup === "disabled" ||
- env.uiKind === UIKind.Web && env.appName.includes("Visual Studio Code")) {
+ true) {
syntaxClient.resolveApi(resolve);
requireStandardServer = false;
} else if (importOnStartup === "interactive" && await workspaceContainsBuildFiles()) { 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 . |
The API wouldn't report lightweight mode correctly when it was forced to start in lightweight due to vscode-java detecting it was being run in Codespaces. This broke the mechanism to switch to standard mode in Codespaces. Fixes redhat-developer#2968 Signed-off-by: David Thompson <[email protected]>
The API wouldn't report lightweight mode correctly when it was forced to start in lightweight due to vscode-java detecting it was being run in Codespaces. This broke the mechanism to switch to standard mode in Codespaces. Fixes #2968 Signed-off-by: David Thompson <[email protected]>
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.
Related issue: microsoft/vscode-java-debug#1148
Environment
Steps To Reproduce
_01_02e
and openEmployee.java
.Current Result
The above modal appears in the bottom right-hand corner and loops endlessly. Nothing else happens.
Expected Result
Java runs and output is produced in the terminal.
The text was updated successfully, but these errors were encountered: