Calva: Calva commands not found

Created on 21 Apr 2020  路  14Comments  路  Source: BetterThanTomorrow/calva

Most commands of Calva are not working. I had to overwtrite Backspace Delete to work, after wise I found it better to disable Calva in its entirity.

My UBUNTU Version is:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

My VS version is: Version: 1.43.2
Commit: 0ba0ca52957102ca3527cf479571617f0de6ed50
Date: 2020-03-24T07:52:11.516Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 4.15.0-96-lowlatency

bug

Most helpful comment

This works for me. Thanks team!

All 14 comments

Thanks for the detailed info. Would you mind updating your vs code to the latest version (I currently see 1.44.2 as latest) and letting us know if Calva works there? And also make sure you have Calva v2.0.92.

I am also getting this bug, randomly my backspace button will stop working and say that the Calva delete command is not found (cant reproduce reliably, so I cant get the exact wording). It happens when I am working and forces me to uninstall/reinstall Calva, sometimes more than once, before it allows me to delete while Calva is installed.

I am also never able to insert tabs anymore, it just says "command 'calva-fmt.formatCurrentForm' not found"

I am on VS Code 1.44.2 with the latest Calva version installed

@Turmolt Thanks for reporting. What OS? And please specify the Calva version number just for clarity/history's sake. This is a hard problem to track down so all the info you can give helps!

@bpringe Windows 10 with Calva 2.0.95

Ok so v2.0.96 was just released which removes a duplicate paredit command entry from the package.json. I don't think this will fix this issue, but I ask that you upgrade to v2.0.96 and see if you still get the issue.

If you do still get the issue (I expect you will), sending this info once you experience the issue may be helpful:

  • The contents of Output -> Log (ExtensionHost)
  • The contents of the console: Help -> Toggle Developer Tools -> Console

Another thing that would help greatly is for someone getting the issue to run Calva in debug mode and step through the activate function in extension.ts. See here: https://github.com/BetterThanTomorrow/calva/blob/69c26b0c661f953d47d8e9705568d89837ce3baf/src/extension.ts#L58. This is where commands are registered, and perhaps something is going wrong there and stepping through it could provide some insight.

See How to Hack on Calva for how to build and run in debug mode, it's pretty simple.

My ExtensionHost logs:

[2020-05-04 11:48:02.494] [exthost] [info] extension host started
[2020-05-04 11:48:02.506] [exthost] [info] ExtensionService#_doActivateExtension borkdude.clj-kondo {"startup":false,"extensionId":{"value":"borkdude.clj-kondo","_lower":"borkdude.clj-kondo"},"activationEvent":"onLanguage:clojure"}
[2020-05-04 11:48:02.506] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/gerred/.vscode/extensions/borkdude.clj-kondo-2020.5.2/out/extension.js
[2020-05-04 11:48:02.548] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"extensionId":{"value":"vscode.debug-auto-launch","_lower":"vscode.debug-auto-launch"},"activationEvent":"*"}
[2020-05-04 11:48:02.548] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/debug-auto-launch/dist/extension
[2020-05-04 11:48:02.551] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"extensionId":{"value":"vscode.emmet","_lower":"vscode.emmet"},"activationEvent":"*"}
[2020-05-04 11:48:02.551] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/emmet/dist/extension
[2020-05-04 11:48:02.560] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"extensionId":{"value":"vscode.git","_lower":"vscode.git"},"activationEvent":"*"}
[2020-05-04 11:48:02.560] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main
[2020-05-04 11:48:02.575] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication {"startup":true,"extensionId":{"value":"vscode.github-authentication","_lower":"vscode.github-authentication"},"activationEvent":"*"}
[2020-05-04 11:48:02.575] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js
[2020-05-04 11:48:02.577] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"extensionId":{"value":"vscode.merge-conflict","_lower":"vscode.merge-conflict"},"activationEvent":"*"}
[2020-05-04 11:48:02.577] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/merge-conflict/dist/extension
[2020-05-04 11:48:02.579] [exthost] [info] ExtensionService#_doActivateExtension vscode.search-result {"startup":true,"extensionId":{"value":"vscode.search-result","_lower":"vscode.search-result"},"activationEvent":"*"}
[2020-05-04 11:48:02.580] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/search-result/dist/extension.js
[2020-05-04 11:48:02.581] [exthost] [info] ExtensionService#_doActivateExtension vscode.vscode-account {"startup":true,"extensionId":{"value":"vscode.vscode-account","_lower":"vscode.vscode-account"},"activationEvent":"*"}
[2020-05-04 11:48:02.581] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/vscode-account/dist/extension.js
[2020-05-04 11:48:02.583] [exthost] [info] eager extensions activated
[2020-05-04 11:48:02.631] [exthost] [info] ExtensionService#_doActivateExtension betterthantomorrow.calva {"startup":false,"extensionId":{"value":"betterthantomorrow.calva","_lower":"betterthantomorrow.calva"},"activationEvent":"onLanguage:clojure"}
[2020-05-04 11:48:02.631] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/gerred/.vscode/extensions/betterthantomorrow.calva-2.0.97/out/extension
[2020-05-04 11:48:02.867] [exthost] [error] Activating extension betterthantomorrow.calva failed due to an error:
[2020-05-04 11:48:02.873] [exthost] [error] TypeError: Cannot read property '0' of undefined
    at b (/Users/gerred/.vscode/extensions/betterthantomorrow.calva-2.0.97/out/extension.js:1:7163)
    at Object.e.resolvePath (/Users/gerred/.vscode/extensions/betterthantomorrow.calva-2.0.97/out/extension.js:1:8259)
    at Object.e.content (/Users/gerred/.vscode/extensions/betterthantomorrow.calva-2.0.97/out/extension.js:135:58578)
    at /Users/gerred/.vscode/extensions/betterthantomorrow.calva-2.0.97/out/extension.js:9:257345
    at Object.e.getConfig (/Users/gerred/.vscode/extensions/betterthantomorrow.calva-2.0.97/out/extension.js:9:257533)
    at Object.e.activate (/Users/gerred/.vscode/extensions/betterthantomorrow.calva-2.0.97/out/extension.js:135:86665)
    at e.activate (/Users/gerred/.vscode/extensions/betterthantomorrow.calva-2.0.97/out/extension.js:135:31656)
    at Function._callActivateOptional (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:788:244)
    at Function._callActivate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:787:909)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:786:960
    at async Promise.all (index 0)
[2020-05-04 11:48:06.977] [exthost] [info] ExtensionService#_doActivateExtension vscode.configuration-editing {"startup":false,"extensionId":{"value":"vscode.configuration-editing","_lower":"vscode.configuration-editing"},"activationEvent":"onLanguage:json"}
[2020-05-04 11:48:06.977] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/configuration-editing/dist/extension
[2020-05-04 11:48:06.983] [exthost] [info] ExtensionService#_doActivateExtension vscode.extension-editing {"startup":false,"extensionId":{"value":"vscode.extension-editing","_lower":"vscode.extension-editing"},"activationEvent":"onLanguage:json"}
[2020-05-04 11:48:06.983] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/extension-editing/dist/extension
[2020-05-04 11:48:06.995] [exthost] [info] ExtensionService#_doActivateExtension vscode.json-language-features {"startup":false,"extensionId":{"value":"vscode.json-language-features","_lower":"vscode.json-language-features"},"activationEvent":"onLanguage:json"}
[2020-05-04 11:48:06.995] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/client/dist/jsonMain
[2020-05-04 11:48:07.022] [exthost] [info] ExtensionService#_doActivateExtension vscode.npm {"startup":false,"extensionId":{"value":"vscode.npm","_lower":"vscode.npm"},"activationEvent":"onLanguage:json"}
[2020-05-04 11:48:07.022] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/npm/dist/main
[2020-05-04 11:48:07.031] [exthost] [info] ExtensionService#_doActivateExtension vscode.typescript-language-features {"startup":false,"extensionId":{"value":"vscode.typescript-language-features","_lower":"vscode.typescript-language-features"},"activationEvent":"onLanguage:javascript"}
[2020-05-04 11:48:07.031] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension
[2020-05-04 11:48:10.602] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.Go {"startup":false,"extensionId":{"value":"ms-vscode.Go","_lower":"ms-vscode.go"},"activationEvent":"workspaceContains:**/*.go"}
[2020-05-04 11:48:10.602] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/gerred/.vscode/extensions/ms-vscode.go-0.14.1/out/src/goMain

Console output looks the same, with:

Activating extension 'betterthantomorrow.calva' failed: Cannot read property '0' of undefined.

leading up the stack trace.

This is on MacOS Catalina, VSCode 1.44.2, Calva 2.0.97.

I figured it out.

I went to open ~/.clojure/deps.edn by itself as a file, rather than the folder containing it. If I open a folder that's a Clojure project, Calva activates just fine.

This appears to be the case for ANY individual file, not just a deps.edn file. If a folder is not open, Calva fails to activate. I can even open the folder in the UI, and when the window reloads into the context of that project, Calva activates just fine.

Thanks for reporting! I think it looks just like what we are about to
release a fix for. I鈥檒l notify you here when it is released, and maybe you
can verify it for us?

Absolutely @PEZ! Glad we could bring a close to this issue, I hadn't actually run into it until today when I went to add some new global aliases. :D

@AFrancoB and @Turmolt, were you working with a single file open in the vs code workspace instead of having the folder containing the project files open? See @gerred's experience above. I want to make sure we don't overlook a different issue.

@bpringe I was encountering it while having a folder containing the project open. I have not encountered it while working in 2.0.96+, but I also only write Clojure for fun and have not had much free time in the past week to see if it pops up again.

I will report back with some logs if I do run into it again.

New Calva released. Please help us check if it fixes this issue.

This works for me. Thanks team!

Thanks @Turmolt. I think we can leave this open for at least a couple more weeks and see if it pops up again.

Was this page helpful?
0 / 5 - 0 ratings