microsoft / mindaro

Bridge to Kubernetes - for Visual Studio and Visual Studio Code
MIT License
307 stars 106 forks source link

Error!: Something went wrong for Visual Studio #243

Open George-0 opened 2 years ago

George-0 commented 2 years ago

Describe the bug When bridge-to-Kubernetes is used from Visual Studio it gives the following error message: "Something went wrong" on Service and Application-url dropdown menu.

To Reproduce Not sure. Have different certificates for the cluster and for auth-provider?

Logs { "timestamp": "2021-10-26 13-30-57.224", "message": "Retrieve the list of ingresses for a given cluster and namespace", "exception": { "type": "Microsoft.VisualStudio.Kubernetes.Debugging.RpcContracts.DscException", "message": "Something went wrong.", "stack": " at Microsoft.VisualStudio.Kubernetes.Debugging.ServiceHub.DscClient.d15`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.VisualStudio.Kubernetes.Debugging.ServiceHub.DscClient.d22.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.VisualStudio.Kubernetes.Debugging.ServiceHub.KubernetesManagement.KubernetesManagementService.<>c__DisplayClass10_0.<b0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.VisualStudio.Kubernetes.Debugging.RpcContracts.Telemetry.KubeConnectScopeBase`1.d271.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.VisualStudio.Kubernetes.Debugging.ServiceHub.KubernetesManagement.KubernetesManagementService.<ListIngressesInNamespaceAsync>d__10.MoveNext()", "code": -2146233088, "inner": { "type": "Microsoft.VisualStudio.Kubernetes.Debugging.RpcContracts.DscException", "message": "Error loading discovery document: Endpoint belongs to different authority: https://tkgi-and-the-complete-url", "stack": " at Microsoft.VisualStudio.Kubernetes.Debugging.ServiceHub.DscClient.<InvokeAsync>d__151.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)", "code": -2146233088, "inner": null } }, "operationName": "GetIngressesAsync", "stage": "End", "elapsedTime": "00:00:02.4659697", "completionState": "Error" }

The complete logs are in the file.

Environment Details Visual Studio version: 16.11.5

Additional context The error message in the logs (you can also see above) is: "Error loading discovery document: Endpoint belongs to different authority: "https://tkgi..."

There are different certificates for the cluster-server and for idp-issuer url.

Can this cause the issue?

The bridge-to-Kubernetes tools works perfectly when is used from Visual Studio Code. b2k_logs.txt

Eneuman commented 2 years ago

Yeah, I have this too and it's realy anoying.

I think it's because the extension in Visual Studio does not update the access token needed to communicate with your kubernetes.

Start a command prompt and do a kubectl get pods and see if that resolves it (temporary).

I realy hope they could fix this soon since it's already been fixed for VS Code.

rakeshvanga commented 2 years ago

@George-0, We will probably will release an update for VS soon. Until then please work with VS Code. Thanks for your patience.

George-0 commented 2 years ago

@rakeshvanga Thank you for the answer. Looking forward to the update.