banacorn / agda-mode-vscode

agda-mode on VS Code
https://marketplace.visualstudio.com/items?itemName=banacorn.agda-mode
MIT License
169 stars 39 forks source link

Error starting the language server #122

Closed damienstanton closed 8 months ago

damienstanton commented 1 year ago

Agda version 2.6.2.2 Extension version 0.3.11 macOS 12.6 (Arm)

When trying to load expressions, the Agda pane just says "Loading...". Checking the output shows the following error:

[Error - 10:51:08 AM] lsp:no handler for:  SInitialized
[Error - 10:51:08 AM] lsp:no handler for:  STextDocumentDidOpen

Additionally the following error is thrown in the dev console:

  ERR [Extension Host] Unhandled exception in promise callback:
console.ts:137 [Extension Host] Unhandled exception in promise callback:

<elided>

log.ts:313   ERR [Extension Host] TypeError: g.onReady is not a function
    at Object.y [as make] (/Users/damien/.vscode/extensions/banacorn.agda-mode-0.3.11/dist/app.bundle.js:2:468691)
    at /Users/damien/.vscode/extensions/banacorn.agda-mode-0.3.11/dist/app.bundle.js:2:105104
    at Object.i [as _1] (/Users/damien/.vscode/extensions/banacorn.agda-mode-0.3.11/dist/app.bundle.js:2:603326)
    at /Users/damien/.vscode/extensions/banacorn.agda-mode-0.3.11/dist/app.bundle.js:2:532183
    at /Users/damien/.vscode/extensions/banacorn.agda-mode-0.3.11/dist/app.bundle.js:2:531230

<elided>

I have tried downgrading the extension as recommended in #86 and #116, but neither worked.

edsko commented 1 year ago

Got the same but on Ubuntu, locally built agda-language-server (the pre-built wouldn't run, same as #68 I think).

fweth commented 1 year ago

I have the same problem on GitPod, I installed cabal-install via apt and Agda via cabal. Agda seems to work, but I can't see the errors which OP posted, in the output tab I see nothing while the extension hangs in the "Loading..." state.

aricursion commented 10 months ago

Same here, has anyone found a fix for this?

damienstanton commented 10 months ago

FYI unfortunately, in as far as I can reproduce it, the status is exactly as it was in Sept. 2022. The errors are the same (see OP) upon fresh install today in the following environment.

os: macOS 13.5.2
editor: 1.84.2 
plugin: 0.4.1
agda: 2.6.4
ghc: 9.4.7
cabal: 3.10.2.0
banacorn commented 9 months ago

root cause: breaking change of VS Code API, which can be observed from vscode-languageclient-8.0.0

https://github.com/microsoft/vscode-languageserver-node/blob/02806427ce7251ec8fa2ff068febd9a9e59dbd2f/README.md?plain=1#L72

damienstanton commented 8 months ago

I can confirm this issue is resolved as of 0.4.7, I can no longer reproduce it. Thank you @banacorn, @L-TChen, and everyone for finding the time to address this!