Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
idogada-akamai opened this issue Dec 12, 2022 · 9 comments · Fixed by #220
Open

Comments

@idogada-akamai
Copy link

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):

  • OS: macOS Monterey 12.6.1
  • Browser: Chrome 108.0.5359.98
  • Remote Kubernetes Version: 0.4.6
  • Remote SSH Version: 0.94
  • VSCode Version: 1.73.1

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

@idogada-akamai idogada-akamai changed the title Unable to use the extetsion Cannot read properties of undefined (reading 'track')) Unable to use the extension Cannot read properties of undefined (reading 'track')) Dec 13, 2022
@idogdeveleap
Copy link

@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
Copy link

Screen.Recording.2023-01-05.at.9.26.34.AM.mp4

Attaching screen recording of the error I am getting

@rberrelleza rberrelleza reopened this Jan 6, 2023
@idogdeveleap
Copy link

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

@idogdeveleap
Copy link

@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
Copy link

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
Copy link
Member

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
Copy link

@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
Copy link
Member

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

@david9991
Copy link
Contributor

@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'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants