-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
LanguageClient failing to initialize language server on 1.62.1 #136988
Comments
Sorry about the breakage, this is from a fix to address an elevation of privilege vulnerability #136771 (CVE-2021-42322). Starting with 1.62.1 you need to pass the command line argument |
@chrmarti could you clarify your solution for me? How / where are those additional arguments set? |
@chrmarti workaround for mac? thanks |
@bcanzanella It is not clear to me that this is a regression caused by our security fix, because our security fix changes Electron's behavior in 100% of cases, not just in 75% of cases. Can you please clarify if this reproduces in |
So the 75%/25% seems like an difference between running VSCode on a "read-only" volume, in my case from the Downloads folder rather than installed directly. in this case the error happens immediately 75% of the time (via "read-only" volume), and the other 25% seems to load, but later the LSP agent restarts multiple times and makes CodeStream unusable, but let's shelve that for the moment... 100% of the time the following is true: 1.62.0 WORKS |
@bcanzanella I have investigated and it looks like the forked process @deepak1556 Is there anything we can do to find out why this process crashes? AFAICT it is not loading any native node modules. |
This is exactly the issue we are experiencing in the Angular Language Service when trying to run |
@bcanzanella when I repro the crash with codestream extension, the stacks indicate crash happens during compilation of the
When I compare it with https://github.com/TeamCodeStream/codestream/blob/7c7d4d98f9d93d0ee70690d3c12093995823e60e/atom/lib/workspace/agent/connection.ts#L419-L423 the args don't match, can you share the code calling spawn ? I was trying to play with the // crashes
ELECTRON_RUN_AS_NODE=1 /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app/Contents/MacOS/Code\ Helper\ \(Renderer\) /Users/demohan/.vscode/extensions/codestream.codestream-12.1.0/dist/agent.js --node-ipc --ms-enable-electron-run-as-node
// does not crash
ELECTRON_RUN_AS_NODE=1 /Applications/Visual\ Studio\ Code.app/Contents/Frameworks/Code\ Helper\ \(Renderer\).app/Contents/MacOS/Code\ Helper\ \(Renderer\) /Users/demohan/.vscode/extensions/codestream.codestream-12.1.0/dist/agent.js --node-ipc --ms-enable-electron-run-as-node --no-lazy |
@atscott can you share some minimal steps to repro the issue, thanks! |
@deepak1556 here is the code that spawns it: https://github.com/TeamCodeStream/codestream/blob/develop/vscode/src/agent/agentConnection.ts#L257 |
also, @deepak1556 does the order of those arguments matter? in your debugging code
...but in your manual testing the |
Order doesn't matter |
Hi @deepak1556, sorry if these aren't minimal enough directions! Let me know what I can do to provide something better:
|
I also attempted to add the Edit: The arguments that are being passed to
|
End-to-end debugging of the issue narrowed down the problem to a UAF scenario in the argument parser. I am getting a new electron build ready with the fix today. I will update here once the fix is rolled into our insiders for some testing. Sorry about the breakage! |
For anyone available for early testing, here are some test builds. Tomorrow's insider should also contain the fix. |
thanks @deepak1556 we have confirmation from a few CodeStream developers that it is fixed in the macOS version |
@deepak1556 I can also confirm that this resolves the issue with forking a process for |
Today's insider Version: 1.63.0-insider 6a25ae3 , carries the fix. I will close this optimistically based on the testing. The fix will also be made available in recovery release |
We're running into an issue that seems to have been introduced with 1.62.1.
Upon initialization of our LanguageClient in our VSCode extension, it's immediately triggering a closed notification on
LanguageClient.clientOptions.errorHandler.closed
(here)Insiders 1.63.0 also has the problem. It happens while debugging as well as when installing from the marketplace.
If we downgrade to 1.61.2 or 1.60.2 there are no problems.
client.onReady()
promise never resolving [?]Does this issue occur when all extensions are disabled?: N/A, this is inside a VSCode extension
Version: 1.62.1
Commit: f4af3cb
Date: 2021-11-05T09:23:14.144Z
Electron: 13.5.2
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 20.6.0
Happens in both VSC 1.62.2 and VSCInsiders 1.63.0
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: