vscode-xml: Error when booting extension on Mac Silicon
Thanks for working on this extension! Really love using it for formatting XML files.
I recently upgraded my Mac and this extension used to work but is failing on start up now. I think it may have something to do with the M1 chip? Any idea what could be causing this issue? Here’s what I’m getting in the XML Support output:
[Error - 11:50:19] XML Support client: couldn't create connection to server.
Error: spawn Unknown system error -86
at ChildProcess.spawn (node:internal/child_process:413:11)
at Object.spawn (node:child_process:795:9)
at transports (/Users/___/.vscode/extensions/redhat.vscode-xml-0.26.1-darwin-arm64/node_modules/vscode-languageclient/lib/node/main.js:424:46)
at w.connection [as createConnection] (/Users/___/.vscode/extensions/redhat.vscode-xml-0.26.1-darwin-arm64/node_modules/vscode-languageclient/lib/common/client.js:1030:15)
at w.start (/Users/___/.vscode/extensions/redhat.vscode-xml-0.26.1-darwin-arm64/node_modules/vscode-languageclient/lib/common/client.js:612:19)
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Reactions: 1
- Comments: 16 (7 by maintainers)
The first screenshot makes sense. Looks like it’s of the 0.26.1 release, which did package the x86_64 LemMinX binary for macos-arm64 (relying on Rosetta layer to work).
As for the pre-release, I think I found yet another (similar) issue : https://github.com/redhat-developer/vscode-xml/blob/4549a379a1c539efa37b3db4b1676ff0bf6f69f8/package.json#L27-L31
In the event a binary can’t be found locally, we download based on that logic. My guess is if the “aarch_64” (macos-arm64) binary failed to be located (because it was wrongly looking for the x76_64 one), the extension tried to download a pre-release version… of the wrong version (the “latest” folder only applies to pre-releases).
I’ll need to update this part of the build. @robertmoura , if you’re able to do so the following would help :
file lemminx-osx-aarch_64 lemminx-osx-x86_64
and confirrm the output looks something like :Specifically, the aarch64 one should say something about arm64 and the x86_64 one should say something about x86_64.
$ mv lemminx-osx-aarch_64 lemminx-osx-x86_64
This should just allow the extension to use the wrong file path, which now has the correct binary.
Hopefully that works and confirms all the changes we need to make to fix things.
The next pre-release (20240318… in a few hours from now), should have the necessary fix.
Hm, sadly that did not work. I am running a MacBook Pro M3. Here are some screenshots after switching to pre-release:
After clicking on yes:
I would appreciate any help 😃
I second that, I have a the exact same issue as described by @robertmoura. Thank you for looking into this! I highly appreciate your effort!