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

Error: spawn Unknown system error -86 in Vscode using the go extension on Apple Silicon MacBook Pro #3256

Closed
4rc0s opened this issue Mar 16, 2024 · 3 comments
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@4rc0s
Copy link

4rc0s commented Mar 16, 2024

After upgrading to an Apple Silicon MacBook Pro and migrating using Migration Assistant, I've been working through various issue getting Homebrew converted to ARM from Intel binaries.

One problem I'm experiencing is editing Go programs in VSCode. It's constantly showing the error message Error: Error: spawn Unknown system error -86.

I've un-installed and re-installed the Go extension with no improvement. I can compile and run go programs from the terminal. I tried setting some env variables in settings.json with no luck. E.g.,

    "go.goroot": "/opt/homebrew/Cellar/go/1.22.1/libexec",
    "go.toolsEnvVars": {
        "GOPATH": "/Users/my_username/go"
    },

I was able to get this output from Extension Host:

2024-03-15 12:12:48.989 [info] ExtensionService#_doActivateExtension golang.go, startup: false, activationEvent: 'onLanguage:go'
2024-03-15 12:19:18.256 [error] TypeError: a.getTime is not a function
    at msBetween (/Users/my_username/.vscode-insiders/extensions/golang.go-0.41.2/dist/goMain.js:29032:21)
    at daysBetween (/Users/my_username/.vscode-insiders/extensions/golang.go-0.41.2/dist/goMain.js:29026:10)
    at TelemetryService.promptForTelemetry (/Users/my_username/.vscode-insiders/extensions/golang.go-0.41.2/dist/goMain.js:30472:9)
    at Timeout.callback [as _onTimeout] (/Users/my_username/.vscode-insiders/extensions/golang.go-0.41.2/dist/goMain.js:30335:58)
    at listOnTimeout (node:internal/timers:569:17)
    at processTimers (node:internal/timers:512:7)

Any ideas on what to try next?

@gopherbot gopherbot added this to the Untriaged milestone Mar 16, 2024
@findleyr
Copy link
Contributor

CC @hyangah -- I'm a bit out of my depth here. In particular, the a.getTime is not a function error from the extension host is strange` and unexpected.

Out of curiosity, can you run gopls version from the command line? Do you get valid output? (is gopls even installed?)

@hyangah
Copy link
Contributor

hyangah commented Mar 18, 2024

@4rc0s I don't know what "Migration Assistant" does when migrating from Intel to Arm and how smart it is in terms of converting various application-specific data.

For the "a.getTime" error messages, try "Go: Reset Global State", select all fields, etc.
I don't know how VS Code encodes its key-value store, but it looks like it's corrupted.

And have you reinstalled VSCode - for Apple Silicon, too? Based on my experience, I found Mac's rosetta is too magical. It runs a binary built for Intel on Mac but eventually causes failures in more mysterious forms. Clean installation of VSCode for matching architectures reduces the errors.

@findleyr findleyr added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 19, 2024
@gopherbot
Copy link
Collaborator

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants