Giter Club home page Giter Club logo

Comments (23)

lisaguthrie avatar lisaguthrie commented on August 27, 2024 3

Just discussed with the dev team. A fix is in progress and will be out in the next few weeks. In the meantime, the workaround is to delete the .kube folder as @jessebarocio figured out, or to remove the duplicate contexts from the .kube\config file. Sorry for the inconvenience!

from dev-spaces.

lisaguthrie avatar lisaguthrie commented on August 27, 2024

Do you have a space in your Windows user name? We recently fixed an issue where users saw this error under that circumstance, but I don't think the fix has made its way into production yet.

If you don't have a space in your user name, let me know so we can troubleshoot further.

from dev-spaces.

beaubutton avatar beaubutton commented on August 27, 2024

Yes ma'am, my username is "Beau Button".

from dev-spaces.

lisaguthrie avatar lisaguthrie commented on August 27, 2024

@beaubutton the fix will be in an upcoming release of the VS extension. In the meantime, you can use the CLI and/or VS Code, or if you're interested in testing out a private build of the VS extension with the fix in place, please contact me at [email protected]

from dev-spaces.

krotkiske avatar krotkiske commented on August 27, 2024

I have the same exact issue. when is the next release slated to be released?

from dev-spaces.

lisaguthrie avatar lisaguthrie commented on August 27, 2024

Good news @beaubutton and @krotkiske - we just pushed an updated version of the extension that fixes this issue. VS should auto-update your version, or you can download from here: https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vs-tools-for-kubernetes

Let me know if you're having any issues after installing the new extension. Thanks for your patience!

from dev-spaces.

dendle avatar dendle commented on August 27, 2024

Hello @lisaguthrie,
I have just experienced the same error. I am using the lastest plugin version.

"Microsoft.Mindaro.Common.Exceptions.KubectlException: There is a problem with the Azure Dev Spaces Tools installation: Missing or invalid kubectl.exe. Please repair/reinstall and try again."

kubectl is in my path, and runs fine. I have an AKS cluster on the latest version (RBAC=On), 1.11.2, located in West Europe.

The default dev space appears to have been created OK, with a k8s namespace azds with healthy containers in it.

I get the error when VS2017 boots, and when I try to run a new asp.net core website templated project.

Can anyone help?

Thanks,
Matt

from dev-spaces.

lisaguthrie avatar lisaguthrie commented on August 27, 2024

Hmmm @dendle, can you enable logging as described here: https://docs.microsoft.com/en-us/azure/dev-spaces/troubleshooting#enabling-detailed-logging

And then look through the log for the kubectl error? Sometimes there is additional error information included in the log that doesn't show up in VS itself.

from dev-spaces.

a7medit avatar a7medit commented on August 27, 2024

I have the same issue.

from dev-spaces.

jorisdebock avatar jorisdebock commented on August 27, 2024

In what directory is it looking for kubectl.exe? I am also experiencing the same issue and the logs don't give much more info than the above stacktrace.

from dev-spaces.

lisaguthrie avatar lisaguthrie commented on August 27, 2024

@Wazowsk1 to find out which path the extension has been installed to, go to C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS. From there, do a search for a file named Microsoft.VisualStudio.Azure.DevSpaces.Tools.Common.dll. That’s where the extension is found. From there, you can find the kubectl\win subfolder.

The specific command line we try to run is:
kubectl --cache-dir "C:\Users\[your user name]\.azds\kubectl-http-cache" version --short

from dev-spaces.

jessebarocio avatar jessebarocio commented on August 27, 2024

I started receiving this error today as well. It worked this morning. When trying to run the following with kubectl in the extension's installation dir:

kubectl --cache-dir "C:\Users\username\.azds\kubectl-http-cache" version --short

It printed the following error:

error: Error loading config file "C:\Users\username\.kube\config": error converting *[]NamedCluster into *map[string]*api.Cluster: duplicate name "my-cluster" in list: [{docker-for-desktop-cluster {https://localhost:6445 true  [] []}} {my-cluster {https://my-cluster-uid.hcp.westus2.azmk8s.io:443

This did not happen when running the same command using the kubectl in my system path. Wiping out C:\Users\username\.kube\ got me around the issue... for now.

from dev-spaces.

jorisdebock avatar jorisdebock commented on August 27, 2024

@lisaguthrie I have run the command manually and did also get the same duplication error as @jessebarocio.

I checked my config in .kube path and it did had 2 times the same context and 2 times the same user which caused the error. I manually removed the duplicated ones and the azre dev spaces extension is now working.

Maybe the extension does not check if the same context/user is already in the config? I did use the "azds" commands before to set up the config and after installing this extension I followed the setup popup.

from dev-spaces.

lisaguthrie avatar lisaguthrie commented on August 27, 2024

Thanks @jessebarocio and @Wazowsk1 - these details are super helpful! We will look into it. Is this only happening in VS, or does it happen at the CLI as well?

from dev-spaces.

YuzorMa avatar YuzorMa commented on August 27, 2024

@jessebarocio, @Wazowsk1 We've released a new version of the tools (CLI and VS extension) which should address these issues. Please let us know if you continue to see them.

from dev-spaces.

solstarz avatar solstarz commented on August 27, 2024

@lisaguthrie Hi, im getting this same error but on a mac.
Is there a way to resolve that?

Thanks in advance

from dev-spaces.

YuzorMa avatar YuzorMa commented on August 27, 2024

@solstarz What version of the azds CLI are you using when you see this error. Can you provide the exact error message and logs (in your temp folder).

from dev-spaces.

solstarz avatar solstarz commented on August 27, 2024

@YuzorMa

Sorry for the late reply, but i solved it by installing the following:
curl -L https://aka.ms/get-azds-mac | bash.

from dev-spaces.

HaimAudioburst avatar HaimAudioburst commented on August 27, 2024

I just installed this tool on VS 2017 and noticed that it crashes my other VS solutions that doesn't use Kubernetis.
Other VS solution contains also Service Fabric projects.

I see the following crash error in Windows Event Viewer:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at Microsoft.VisualStudio.Azure.DevSpaces.Tools.Package.ProjectSystem.ProjectWarmupLauncher+<StartupProjectListener_OnStartupProjectChanged>d__20.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0(System.Object)
at Microsoft.VisualStudio.Threading.JoinableTaskFactory+SingleExecuteProtector.TryExecute()
at Microsoft.VisualStudio.Threading.JoinableTaskFactory+SingleExecuteProtector+<>c.<.cctor>b__20_0(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

What can I do?

from dev-spaces.

mthalman avatar mthalman commented on August 27, 2024

@HaimAudioburst - This is a completely separate issue from the one you've posted this on. Can you log a separate issue so it can be tracked appropriately? Then post back here with a link to your new issue.

from dev-spaces.

mthalman avatar mthalman commented on August 27, 2024

@HaimAudioburst - We've released a new version of Visual Studio Tools for Kubernetes on the VS Marketplace that should resolve your problem: https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vs-tools-for-kubernetes.

from dev-spaces.

HaimAudioburst avatar HaimAudioburst commented on August 27, 2024

from dev-spaces.

HaimAudioburst avatar HaimAudioburst commented on August 27, 2024

@mthalman thanks, new VS tools for kubernetes release doesn't crash now.

from dev-spaces.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.