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

Fails to connect to Agda Language Server on MacOS #192

Open
edusporto opened this issue Sep 5, 2024 · 0 comments
Open

Fails to connect to Agda Language Server on MacOS #192

edusporto opened this issue Sep 5, 2024 · 0 comments

Comments

@edusporto
Copy link

Similar to #183, but on MacOS.

When using the extension with the language server enabled on MacOS 14.6.1 on a MacBook Air M2, I get the following error whenever loading any Agda file:

[Error - 2:24:09 PM] Agda Language Server client: couldn't create connection to server.
Error: spawn Unknown system error -8
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at Object.spawn (node:child_process:799:9)
    at /Users/myuser/.vscode/extensions/banacorn.agda-mode-0.4.7/dist/app.bundle.js:2:912108
    at w.createConnection (/Users/myuser/.vscode/extensions/banacorn.agda-mode-0.4.7/dist/app.bundle.js:2:748674)
    at w.start (/Users/myuser/.vscode/extensions/banacorn.agda-mode-0.4.7/dist/app.bundle.js:2:739189)
    at d (/Users/myuser/.vscode/extensions/banacorn.agda-mode-0.4.7/dist/app.bundle.js:2:462291)
    at Object.S [as make] (/Users/myuser/.vscode/extensions/banacorn.agda-mode-0.4.7/dist/app.bundle.js:2:463603)

From this error, it seems like the als executable wasn't able to be executed. I tried manually executing it from the shell, getting this error:

➜  ~ cd "/Users/myuser/Library/Application Support/Code/User/globalStorage/banacorn.agda-mode/v0.2.6.4.0.3-darwin"
➜  v0.2.6.4.0.3-darwin ./als
zsh: exec format error: ./als

Even though the directory contains "darwin" in its name, I think this may not be the version compiled for MacOS, or at least not the newer ARM systems.

By manually installing the latest MacOS release v0.2.6.4.0.3 and replacing the files downloaded by the extension to these files, I was able to get the language server working after manually allowing a few dynamic libs (.dylib), which failed to open due to a "couldn't verify the executable" error by the operating system.

This leads me to believe that the wrong compilation host of the Agda Language Server is being downloaded by the extension on MacOS, although I haven't verified it in the extension's code.

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

No branches or pull requests

1 participant