Skip to content
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 for version Version: 1.93.1 #5869

Open
jean-feng opened this issue Sep 24, 2024 · 9 comments

Comments

@jean-feng
Copy link

Summary

The LWC Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

Steps To Reproduce:

I got a new C driver, installed new Windows:
Edition Windows 10 Enterprise
Version 22H2
Installed on ‎9/‎6/‎2024
OS build 19045.4894
Experience Windows Feature Experience Pack 1000.19060.1000.0

Then I installed sf @salesforce/cli/2.58.7 win32-x64 node-v20.17.0

Java JDK-21

Visual Studio Code
Version: 1.93.1 (user setup)
Commit: 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
Date: 2024-09-11T17:20:05.685Z
Electron: 30.4.0
ElectronBuildId: 10073054
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

Once I installed Salesforce Extension Pack
v61.12.0

I got The LWC Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

Expected result

Describe what should have happened.

Actual result

c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:658
er = new Error(er)
^

Error: Unexpected close tag
Line: 1886
Column: 15
Char: >
at error (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:658:10)
at strictFail (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:684:7)
at closeTag (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:878:9)
at SAXParser.write (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:1460:13)
at exports.Parser.Parser.parseString (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:323:31)
at Parser.parseString (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:5:59)
at c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:338:24
at new Promise ()
at exports.Parser.Parser.parseStringPromise (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:336:14)
at Parser.parseStringPromise (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:5:59)

Node.js v20.15.1
[Info - 10:54:56 AM] Connection to server got closed. Server will restart.
c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:658
er = new Error(er)
^

Error: Unexpected close tag
Line: 1886
Column: 15
Char: >
at error (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:658:10)
at strictFail (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:684:7)
at closeTag (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:878:9)
at SAXParser.write (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:1460:13)
at exports.Parser.Parser.parseString (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:323:31)
at Parser.parseString (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:5:59)
at c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:338:24
at new Promise ()
at exports.Parser.Parser.parseStringPromise (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:336:14)
at Parser.parseStringPromise (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:5:59)

Node.js v20.15.1
[Info - 10:55:10 AM] Connection to server got closed. Server will restart.
c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:658
er = new Error(er)
^

Error: Unexpected close tag
Line: 1886
Column: 15
Char: >
at error (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:658:10)
at strictFail (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:684:7)
at closeTag (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:878:9)
at SAXParser.write (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:1460:13)
at exports.Parser.Parser.parseString (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:323:31)
at Parser.parseString (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:5:59)
at c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:338:24
at new Promise ()
at exports.Parser.Parser.parseStringPromise (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:336:14)
at Parser.parseStringPromise (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:5:59)

Node.js v20.15.1
[Info - 10:55:21 AM] Connection to server got closed. Server will restart.
c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:658
er = new Error(er)
^

Error: Unexpected close tag
Line: 1886
Column: 15
Char: >
at error (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:658:10)
at strictFail (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:684:7)
at closeTag (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:878:9)
at SAXParser.write (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:1460:13)
at exports.Parser.Parser.parseString (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:323:31)
at Parser.parseString (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:5:59)
at c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:338:24
at new Promise ()
at exports.Parser.Parser.parseStringPromise (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:336:14)
at Parser.parseStringPromise (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:5:59)

Node.js v20.15.1
[Info - 10:55:33 AM] Connection to server got closed. Server will restart.
c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:658
er = new Error(er)
^

Error: Unexpected close tag
Line: 1886
Column: 15
Char: >
at error (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:658:10)
at strictFail (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:684:7)
at closeTag (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:878:9)
at SAXParser.write (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\sax\lib\sax.js:1460:13)
at exports.Parser.Parser.parseString (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:323:31)
at Parser.parseString (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:5:59)
at c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:338:24
at new Promise ()
at exports.Parser.Parser.parseStringPromise (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:336:14)
at Parser.parseStringPromise (c:\Users\yfeng.vscode\extensions\salesforce.salesforcedx-vscode-lwc-61.12.0\node_modules\xml2js\lib\parser.js:5:59)

Node.js v20.15.1
[Error - 10:55:45 AM] Connection to server got closed. Server will not be restarted.

Additional information

Feel free to attach a screenshot.

Salesforce Extension Version in VS Code:

Salesforce CLI Version:

OS and version:

VS Code version:

Most recent version of the extensions where this was working:

@svc-idee-bot
Copy link
Collaborator

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@svc-idee-bot
Copy link
Collaborator

Hello @jean-feng 👋 It looks like you didn't provide all the required basic info in your issue.

If you haven't already, please provide the following info:
Salesforce Extension Version in VS Code:
Salesforce CLI Version:
OS and version:
VS Code version:
Most recent version of the extensions where this was working:

Here's an example of a set of required info that will pass the validation:
Salesforce Extension Version in VS Code: 60.13.0
Salesforce CLI Version: @salesforce/cli/2.42.6 darwin-arm64 node-v18.18.2
OS and version: MacOS Sonoma 14.5
VS Code version: 1.89.1
Most recent version of the extensions where this was working: 60.11.0

A few more things to check:

  • Make sure you've provided detailed steps to reproduce your issue, as well as all error messages that you see.
    • A repository that clearly demonstrates the bug is ideal.
    • Error messages can be found in the Problems Tab, Output Tab, and from running Developer: Toggle Developer Tools in the command palette.
  • Make sure you've installed the latest version of the Salesforce Extension Pack for VSCode. (docs)
  • Search GitHub for existing related issues.

Thank you!

@peternhale
Copy link
Contributor

@jean-feng tell me about your project, was an existing opened after the upgrades or was it a new project.

Given the error, the LWC language server is trying to parse a xml file. Do you have any xml files in your project with the string "er = new Error(er)" If so, could you share the details of that file here.

Could you also try creating a new project to see if the LWC language server starts properly?

@jean-feng
Copy link
Author

@peternhale I pull the branch from repository since everything in my C is new and I followed normal instructions for salesforc deployment processes since I already changed PC for couple of times in the past. Only difference is I downloaded the newest version for each step as before. In the beginning, everything seems good and I did not pay attention to the extension errors. since I can retrieve existing component like Apex code that I modified until I added some metadata in salesforce. When I tried to download those custom metadata, I got "Missing fullName on CustomLabel in \force-app\main\default\labels\CustomLabels.labels-meta.xml" even that is not label at all. And then I went to existing customLabel, and I tried to retrieve it, and then I saw "LWC language server error". Then I uninstalled Salesforce Extension Pack, removed all the extension, and installed it again, then I noticed "LWC language server error". I still can pull existing ApexClass or custom metadata, however, when I tried to retrieve ApexPage, and then I got this "LWC language server error" too without retrieving. This is just wired. The Org Browser for downloading any existing stuff, first pop up "Are you sure you want to overwrite error.." Once you click overwrite button, I got Missing fullName on CustomLabel in \force-app\main\default\labels\CustomLabels.labels-meta.xml". Nothing is changed in fullsb or prod, If I tried to download anything, I got the same error also. I just think something wrong with VSCode. Actually, I redo everything in one drive again, The same thing still happened. My C driver is new including window operation system since Dell replaced my C drive. The project is pull current branch.

@jean-feng
Copy link
Author

@peternhale I think I resolved the issue. Someone checked in customLabel with extra starting tag, once I fixed that, I dont see LWS Language Server crashed error and I am able to download and retrieve without problem. Sorry for the confusion.

@peternhale
Copy link
Contributor

@jean-feng thanks for letting us know, however, the language server should not crash like this for a malformed file. Would you be willing to share the breaking change so I might file a bug, so we can have a look at the root cause and fix it if possible?

@jean-feng
Copy link
Author

jean-feng commented Sep 25, 2024 via email

Copy link

git2gus bot commented Sep 25, 2024

This issue has been linked to a new work item: W-16833610

@peternhale
Copy link
Contributor

@jean-feng thank for the reproduction steps. I was able to cause the error. I am logging a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants