-
Notifications
You must be signed in to change notification settings - Fork 406
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
The LWC Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. #4994
The LWC Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. #4994
Comments
I also have the same issue that has been driving me crazy. Other Steps Tried
The only differences are:
Full VSCode Output log:
|
Likely related to forcedotcom/lightning-language-server#570 which is 1: the most recent update to the LWC language server and 2: introduced the function which is failing |
Hello! Thank you all for bringing this to our attention. We'll be taking a look at it! |
@samuel-pipelaunch @samwolfe-stripe this looks like a relatively easy fix, apologies for letting this skip through. Do you happen to have a minimal repro that causes this issue? Rather than throwing code over the wall, I'd like to confirm that the fix will address what you're experiencing, if possible. If you don't have a minimal repro, it'd be great if you could manually verify after we push out a fix. |
@divmain Thanks for taking a look, I tried to set up a minimal repo but couldn't actually trigger the LWC Language Server to run (not sure what actually causes it to kick off), so unfortunately can only replicate in my local repo. Happy to verify a fix manually |
I made a fix within the lightning-language-server repository. To reproduce the problem, just make an LWC, and remove the default export and put something else in.
This should cause the server to crash. |
I tried the @codythomaszeitler on a sample repository, and I couldn't caused the server to crash |
@samuel-pipelaunch Okay, I got the exact error that you mentioned above (minus the version number). I reproduced it in the following manner: Create a brand sfdx project:
You'll have something like this. Replace it with this: You will start to see the exception in your "LWC Language Server" output in vscode: ` TypeError: Cannot read properties of undefined (reading 'location') |
@samuel-pipelaunch The reason that it is failing is since the file cannot find a "default export". In this specific scenario, the file also has no classes, which let's it get to the error that you found. The error from what I posted is when there is at least one class in the file. |
#578) Fixes forcedotcom/salesforcedx-vscode#4994. Co-authored-by: Cristina Cañizales <113132642+CristiCanizales@users.noreply.github.com>
I have the same problem, but the stack trace seems to be different. I tried reinstalling the plugin as well. I have downgraded the plugin to V58 and it still crashes. SF CLI version: @salesforce/cli/2.20.6 darwin-arm64 node-v20.9.0 SO: macOS Sonoma Version 14.2 VSCode dump: /Users/jesusgonzalez/.vscode/extensions/salesforce.salesforcedx-vscode-lwc-58.16.0/node_modules/sax/lib/sax.js:652 Error: Unexpected close tag Node.js v18.15.0 Error: Unexpected close tag Node.js v18.15.0 Error: Unexpected close tag Node.js v18.15.0 Error: Unexpected close tag Node.js v18.15.0 Error: Unexpected close tag Node.js v18.15.0 |
I have the same issue with following stacktrace:
|
I've recently started getting this issue. I've tried completely uninstalling sf, vscode, java, node and npm. When I go through the process of reinstalling it comes back once I install the extended extension pack. Name: Salesforce Extension Pack (Expanded) Version: 1.92.2 (user setup) Java: sf:
|
I got a new C driver, installed new Windows: Then I installed sf @salesforce/cli/2.58.7 win32-x64 node-v20.17.0 Visual Studio Code Once I installed Salesforce Extension Pack I got The LWC Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:658 Error: Unexpected close tag Node.js v20.15.1 Error: Unexpected close tag Node.js v20.15.1 Error: Unexpected close tag Node.js v20.15.1 Error: Unexpected close tag Node.js v20.15.1 Error: Unexpected close tag Node.js v20.15.1 |
@jean-feng would you mind opening a new issue. Thank you. |
@peternhale #5869 is created |
Summary
When the LWC Language Server attempts to start, it crashes 5 times immediately and no longer tries to restart
Steps To Reproduce:
Expected result
The LWC Language Server should not crash
Actual result
The LWC Language Server crashes
Additional information
Error output
Other Steps Tried
Salesforce Extension Version in VS Code:
SFDX CLI Version:
sf --version
=>@salesforce/cli/2.1.7 darwin-arm64 node-v18.15.0
OS and version:
Mac OS Ventura 13.4.1 (c) (M1)
The text was updated successfully, but these errors were encountered: