Skip to content

M1 macOS: Nonexistent x64 build + Failure to launch due to trying to launch the x64 build + Using .exe extension #10

@ivucica

Description

@ivucica
[Error - 2:15:27 PM] JSON Schema Language Server client: couldn't create connection to server.
Launching server using command /Users/aaaaaa/.vscode/extensions/
    prosser.json-schema-2020-validation-0.0.8/dist/server/osx-x64/JsonSchemaLanguageServer/JsonSchemaLanguageServer.exe failed. Error: spawn /Users/aaaaaa/.vscode/extensions/
    prosser.json-schema-2020-validation-0.0.8/dist/server/osx-x64/JsonSchemaLanguageServer/JsonSchemaLanguageServer.exe ENOENT

First, note how it's using osx-x64 despite being on osx-arm64. Searching in settings.json does not reveal any mention of x64.

aaaaaa@MacBook-Air ~ % ls  /Users/aaaaaa/.vscode/extensions/prosser.json-schema-2020-validation-0.0.8/dist/server/        
linux-x64	osx-arm64	win-x64

Second, note how the x64 build is actually completely missing.

  • If it were shipped, it would have obscured the issue by launching via Rosetta, but at least the extension would work and stop regularly popping up with an error notification.
  • However, I also have a perfectly serviceable 2016 MacBook Pro. As far as I can tell, the arm64 build is not a fat binary, so it is completely arm64 specific. This means that on my Intel Mac, suddenly this extension would be unusable.
aaaaaa@MacBook-Air ~ % ls  /Users/aaaaaa/.vscode/extensions/prosser.json-schema-2020-validation-0.0.8/dist/server/osx-arm64 
Humanizer.dll							Microsoft.Extensions.Logging.Debug.dll
Json.More.dll							Microsoft.Extensions.Logging.dll
JsonPointer.Net.dll						Microsoft.Extensions.Options.dll
JsonSchema.Net.dll						Microsoft.Extensions.Primitives.dll
JsonSchemaLanguageServer					Microsoft.NET.StringTools.dll
JsonSchemaLanguageServer.deps.json				Microsoft.VisualStudio.LanguageServer.Protocol.dll
JsonSchemaLanguageServer.dll					Microsoft.VisualStudio.Threading.dll
JsonSchemaLanguageServer.runtimeconfig.json			Microsoft.VisualStudio.Validation.dll
MessagePack.Annotations.dll					Nerdbank.Streams.dll
MessagePack.dll							Newtonsoft.Json.dll
Microsoft.Extensions.DependencyInjection.Abstractions.dll	StreamJsonRpc.dll
Microsoft.Extensions.DependencyInjection.dll			System.Diagnostics.DiagnosticSource.dll
Microsoft.Extensions.FileSystemGlobbing.dll			System.IO.Pipelines.dll
Microsoft.Extensions.Logging.Abstractions.dll

Third, note the loaded path vs actual binary:

what where
loaded path dist/server/osx-x64/JsonSchemaLanguageServer/JsonSchemaLanguageServer.exe
present path dist/server/osx-arm64/JsonSchemaLanguageServer

The launcher seems to expect an extension-free directory filled with a binary that has the .exe extension. However, the binary actually ships in place of the directory:

aaaaaa@MacBook-Air ~ % file .vscode/extensions/prosser.json-schema-2020-validation-0.0.8/dist/server/osx-arm64/JsonSchemaLanguageServer 
.vscode/extensions/prosser.json-schema-2020-validation-0.0.8/dist/server/osx-arm64/JsonSchemaLanguageServer:
    Mach-O 64-bit executable arm64
  • Could you restore the x64 build since there are Intel Macs still receiving OS updates? (Mine does not, but macOS 12 still runs VSCode fine.)
  • Could you fix the path lookup on Apple Silicon / ARM Macs?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions