vscode-kubernetes-tools / vscode-kubernetes-tools

Kubernetes extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools
Apache License 2.0
686 stars 247 forks source link

"command 'extension.vsKubernetesRefreshExplorer' not found" on code-server #523

Open bunnyc1986 opened 5 years ago

bunnyc1986 commented 5 years ago

I couldn't use the plugin in code-server. It's giving "command 'extension.vsKubernetesRefreshExplorer' not found" error. I have tried reinstall the plugin and I have all dependencies installed.

image

bnookala commented 5 years ago

Hi there @bunnyc1986 - I'm not familiar with code-server - a quick search turned this up: https://github.com/codercom/code-server. Is this the project you're using?

Judging by the marketplace page that you're looking at, it appears that the version of the extension that you're using is, at newest, 0.1.14, which was last updated in September 2018 - are you able to upgrade to a newer version?

hAh0L13 commented 4 years ago

Hi all. Have similar issue with snap-installed VS Code 1.38.1 on Ubuntu 18.04 x64. Extension installed from VSIX version 1.0.4.

Cannot use any command -

command 'extension.vsKubernetesConfigureFromCluster' not found command 'extension.vsKubernetesCreateCluster' not found and so on..

What can I do?

itowlson commented 4 years ago

@hAh0L13 I've had several problems with VS Code installed from snap - it seems like it may have some sort of permissions problem. Are you able to uninstall the snap VS Code and clean-install from the Debian package? It's more fiddly but has been more reliable for me.

If the k8s installation works with the package install, then we will work with the VS Code folks to determine if the problem lies with the k8s extension or the snap installer.

By the way, before uninstalling the snap version, if you could run it once more and check to see if there are any other messages about the startup error, or anything in the Output pane (specifically the Extensions or Log (Extension Host) channels), and pass them on to us if there are, that would be super useful for us or the Code folks to track down where it's all going wrong. Thanks!

hAh0L13 commented 4 years ago

Good. I reinstalled VS Code from the official repo and nothing has changed in the kubernetes extension, except for one thing - VS Code could not check for updates. So I found a similar problem and enabled proxy settings through the OS GUI tool. And now everything works - the kubernetes extension (it requests the YAML extension), the extension tab (search and install) and the VS Code update checker.

itowlson commented 4 years ago

Great! Glad to hear this is working even if via a roundabout route. Thanks for letting us know about the workaround - my guess is that we failed to activate because of being unable to fetch the YAML dependency. I'll add this to documentation (and leave this issue open as a reminder if that's okay). Thanks again!

akath19 commented 4 years ago

Sorry to hijack this but I'm getting the same error on a Windows 10 with WSL (Ubuntu 18.04 LTS).

Here's my entire vs-kubernetes config:

       "vs-kubernetes.kubectl-path": "/usr/bin/kubectl",
        "vs-kubernetes.helm-path": "/usr/local/bin/helm",
        "vs-kubernetes.kubectlVersioning": "user-provided",
        "vs-kubernetes.outputFormat": "yaml",
        "vs-kubernetes.autoCleanupOnDebugTerminate": false,
        "vs-kubernetes.nodejs-autodetect-remote-root": true,
        "vs-kubernetes.nodejs-remote-root": "",
        "vs-kubernetes.nodejs-debug-port": 9229,
        "checkForMinikubeUpgrade": true,
        "logsDisplay": "webview",
        "imageBuildTool": "Docker",
        "use-wsl": true

The error is exactly the same as @hAh0L13 and none of the commands work, I also don't see anything strange in the extension host logs, only this:

[2019-11-26 14:25:43.491] [exthost] [info] ExtensionService#_doActivateExtension redhat.vscode-yaml {"startup":false,"extensionId":{"value":"ms-kubernetes-tools.vscode-kubernetes-tools","_lower":"ms-kubernetes-tools.vscode-kubernetes-tools"},"activationEvent":"onView:extension.vsKubernetesExplorer"}
[2019-11-26 14:25:43.491] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/***/.vscode/extensions/redhat.vscode-yaml-0.6.1/out/src/extension
[2019-11-26 14:25:43.536] [exthost] [info] ExtensionService#_doActivateExtension ms-kubernetes-tools.vscode-kubernetes-tools {"startup":false,"extensionId":{"value":"ms-kubernetes-tools.vscode-kubernetes-tools","_lower":"ms-kubernetes-tools.vscode-kubernetes-tools"},"activationEvent":"onView:extension.vsKubernetesExplorer"}
[2019-11-26 14:25:43.536] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/***/.vscode/extensions/ms-kubernetes-tools.vscode-kubernetes-tools-1.0.7/out/src/extension

Edit: I also deleted VSCode, the extensions folder and reinstalled clean and the error persists

itowlson commented 4 years ago

@akath19 That's really weird - often this can be related to not having the Red Hat YAML extension, or an old version of VS Code, but you did a fresh install, and I can see the YAML extension in your log. (Just in case... could you check in the Extensions panel and confirm that it's there please?) Can you also confirm that you are installing from the marketplace (not from a .vsix file)?

Could you also - as a temporary measure - try setting use-wsl to false and see if the "command not found" error persists? (You will probably get other errors about not being able to find kubectl etc. - but if those happened they would still show that the extension loaded okay and help us to identify if it was the use-wsl that stopped it loading.) Thanks!

akath19 commented 4 years ago

@itowlson everything was installed from the marketplace and I updated everything to latest versions before testing again, I'm seeing this behavior:

Looks like use-wsl is blocking the extension in some way!

ghost commented 1 year ago

I had the same problem, cleared up my .vscode user folder (I actually deleted the whole thing because I was syncing settings so I didn't mind) and it fixed the issue, it appears to be a VSCode issue, not an extension issue.

prbakhsh commented 1 year ago

I Had same problem too. After remove my old Vscode and install the new version, my problem solved.