okteto / remote-kubernetes

Remote Kubernetes Development in VS Code with Okteto
Apache License 2.0
74 stars 15 forks source link

Unable to use the extension Cannot read properties of undefined (reading 'track')) #219

Closed idogada-akamai closed 1 month ago

idogada-akamai commented 1 year ago

Describe the bug Every Okteto command using the extension results in the following error message. For example, when running Okteto Up I get this prompt:

Command 'Okteto: Up' resulted in an error (Cannot read properties of undefined (reading 'track'))

To Reproduce Steps to reproduce the behavior:

  1. Install the Remote - Kubernetes extension
  2. Install the Remote - SSH extension
  3. Try to run one of the Okteto commands
  4. See error

Expected behavior Okteto command to succeed. For example in Okteto Up, to connect vscode in the development pod, with file sync working.

Desktop (please complete the following information):

Additional context When running okteto up the from terminal, and connecting via the remote explorer, it'r working. Seems to be an issue with the extension

idogdeveleap commented 1 year ago

@rberrelleza After upgrading I got this message:

Command 'Okteto: Up' resulted in an error (command 'okteto.up' not found)

I tried to-reinstall the extension, same result

idogdeveleap commented 1 year ago

https://user-images.githubusercontent.com/121810673/211116407-365e1f41-1bab-4214-8778-47b3d42ad217.mp4

Attaching screen recording of the error I am getting

idogdeveleap commented 1 year ago

@rberrelleza Is it expected to be fixed sometime in the near future?

idogdeveleap commented 1 year ago

@rberrelleza I tried to debug this locally, it seems to be related to Telemtry. Commenting all relevant code in extension.ts, prevent this error from appearing.

I will continue to debug this and update

idogdeveleap commented 1 year ago

After some further debugging. I am not sure exactly how and why it happens but I saw that when you run sentry.init(source), a code from the Dendron extension gets executed and throws the following error:

session.update is not a function

Disabling Dendron seems to solve the issue. Though I am not sure what happens here 😅

rberrelleza commented 1 year ago

This is very interesting. I think the problem might be that sentry is a global property, and there might a collision between both extensions. I'll see if theres'a way to only load sentry in our extension.

How did you figure this out @idogdeveleap ?

idogdeveleap commented 1 year ago

@rberrelleza I cloned the repo and started debugging and diving into each function call until I noticed that the path is no longer from Okteto

rberrelleza commented 1 year ago

@david9991 are you still hitting the issue with the undefined track property?

david9991 commented 1 year ago

@rberrelleza No, I am just experimenting 'command okteto.X not found' issue with Telemetry enabled. While I am debugging this I am getting error message 'session.update is not a function'.

rberrelleza commented 1 month ago

this is not reproducing on newer versions of sentry and vscode