-
Notifications
You must be signed in to change notification settings - Fork 206
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
[vscode] Extension never activates, throwing error "Header must provide a Content-Length property" #811
Comments
@MarcSerret51 which version of vscode? What is the OS (Win? OSX?) What is the path of the project you're opening in VSCode? |
I'm using VSC 1.7.0 on a Windows 10 NT 64 bits 10.0.19044. |
@MarcSerret51 So does adding the workaround, as described here (redhat-developer/vscode-java#2577 (comment)) solves the issue for you for the Spring Tools extension as well? It seems to me like the magic VM argument needs to be added to both extensions (the Java one AND the Spring Tools). |
If so, we could think about adding this to the default VM args for launching the language server as well, as done here: redhat-developer/vscode-java#2646 |
Fixed with aadf4a0 |
I too have been having problems since around 8/9 Today, Spring Boot Tools was updated to v1.39.0, it stopped working again... I tried change settings to It works after installing Spring Boot Tools V1.38.0 and setting Maybe in v1.39.0 vmargs is set at I'm using VSC 1.71.2 on Windows 10. |
@MunekazuF it is just |
@BoykoAlex I checked with jconsole and this is what I found.
it's Just Language Support for Java was not working with the same problem, but now it works with this setting. This is how it is set up in spring boot. thanks. |
My understanding is that you'd like The VM args above are missing
(via the VSCode preferences UI but editing It worked fine. I see � |
@BoykoAlex I am really sorry,I made a rudimentary mistake. In other words, it was working without the My issue has been resolved. |
Perhaps we could add |
What is the |
@martinlippert You may be right. |
It sounds to me like the |
Details on the command line option: https://docs.oracle.com/en/java/javase/17/docs/specs/man/java.html#enable-logging-with-the-jvm-unified-logging-framework |
Here is my experience with the problem: I had the same error saying "Header must provide a Content-Length property". I was not able to run any Spring Boot application nor any unit tests etc. VSCode v1.71.2 Setting @BoykoAlex I would say, this issue should be re-opened as it is not fixed with |
@depressiveRobot do you need to add the same VM arg to the JDT LS launch? I don't think that JDT LS has |
@BoykoAlex No, I don't need to set the same arg for
Without setting Here is the launch command after changing the setting to /usr/bin/env /opt/homebrew/Cellar/openjdk@11/11.0.16.1_1/libexec/openjdk.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:51644 @/v
ar/folders/kl/vr0sf8_s78g4d77lq0xlvdz80000gn/T/cp_2ipjusatg6zzkp5pl66ldquv1.argfile de.gruenefraktionsachsen.saxdhh.SaxdhhApp |
@depressiveRobot can you please try turning off (uncheck) Auto-Connect to live app? It is under |
The option is already unchecked.
Right, without the extension I can run my app, too.
It contains the |
@depressiveRobot What about the VM args of the Spring Boot LS java process? What are the VM arguments for |
@BoykoAlex can you please describe how to get this information for you? |
|
After reading through this again, I have a few questions/suggestions here:
Beyond that, it is still unclear to me why launching a Spring Boot app or a test is broken when the Spring Boot LS has a problem to start or to run. Can we make this more resilient, so that starting/testing apps doesn't break when the Spring Boot LS has such an issue? I remember issues being raised about running tests doesn't work anymore when the Sprint Boot extension is around and it sounds to me related to this one here. |
@BoykoAlex Thank you for the detailed description. Here are the VM arguments:
As I said, without |
@depressiveRobot Lets continue trying to figure out why
|
I commented/removed Here is the output of the
That's it. Nothing happens when opening When I uncomment/add
|
@depressiveRobot looked through the JSON - this is the 1st request sent from the client to the server. Looks like the first response from the server either not sent or sent but not handled by the client... Do you get the error about the Content-Length property not set or actual content-length not equal to the one declared in the header? I mean the error at the top of the issue... Looked through the comments again and it looks to me like there is no error, complete silence from the Boot LS <-> VScode comm. Is this correct? There is something i didn't like in the spring boot log:
The vscode java extension comes with embedded jre already. Spring Boot LS should have used it by default. However, I see that for some reason boot tools extension fell back to using your system
Once you open java file in VSCode, open JConsole and check the JVM used to run I'd set the spring boot LS java home setting to that embedded JVM value:
|
Yes, without the setting For me the JVM used to start
I could change the LS Java home setting. However, I assume that the extension is using the "right" JVM by default (without the need to change any setting like These are all my configured Java settings in VSCode:
UpdateI have installed another version of the extension that doesn't ship a JRE:
By the way, I'm using a MacBook Air M1. Maybe that could play a role. |
Something must be polluting sys out... I also have a mac m1 (great machine by the way) and seems to work fine so far for me. Can you please try the same JVM that runs Java LS with the Boot LS? I recall that JVM for running Boot LS was:
I'm curious if it has anything to do with the content-length error... Looks like java LS uses JVM 17... There is also a way to debug the place that throws the error...
|
Describe the bug
As per the title, the extension never activates. The developer tools shows uncaught error: Header must provide a Content-Length property.
To Reproduce
The bug just happened. Tried to downgrade the extension version but doesn't works. Also tried to reinstall VSC but doesn't works.
The text was updated successfully, but these errors were encountered: