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

Error running any .ENVSwitcher commands #27

Closed
acarter24 opened this issue Jul 18, 2023 · 4 comments
Closed

Error running any .ENVSwitcher commands #27

acarter24 opened this issue Jul 18, 2023 · 4 comments

Comments

@acarter24
Copy link

acarter24 commented Jul 18, 2023

Just installed, but can't run any commands or see the switcher button.

Every command I try and run through the Command Palette gives an error like this:

[Window Title]
Visual Studio Code

[Main Instruction]
Command '.ENV Switcher: Select .env file' resulted in an error

[Content]
command 'envSwitcher.selectEnvPreset' not found

[OK]

image

I am using WSL Ubuntu if that is relevant.

VScode info below:

Version: 1.80.0 (user setup)
Commit: 660393deaaa6d1996740ff4880f1bad43768c814
Date: 2023-07-04T15:06:02.407Z
Electron: 22.3.14
ElectronBuildId: 21893604
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621

VSCode Developer tools logs:

workbench.desktop.main.js:sourcemap:627  INFO Invoking resolveAuthority(wsl)...
workbench.desktop.main.js:sourcemap:627  INFO [LocalProcess0][resolveAuthority(wsl,1)][0ms] obtaining proxy...
workbench.desktop.main.js:sourcemap:627  INFO [LocalProcess0][resolveAuthority(wsl,1)][0ms] invoking...
workbench.desktop.main.js:sourcemap:627  INFO [LocalProcess0][resolveAuthority(wsl,1)][1021ms] waiting...
workbench.desktop.main.js:sourcemap:627  INFO [LocalProcess0][resolveAuthority(wsl,1)][2005ms] waiting...
workbench.desktop.main.js:sourcemap:627  INFO [LocalProcess0][resolveAuthority(wsl,1)][3073ms] waiting...
workbench.desktop.main.js:sourcemap:627  INFO [LocalProcess0][resolveAuthority(wsl,1)][3350ms] returned WebSocket(127.0.0.1:61892)
workbench.desktop.main.js:sourcemap:627  INFO resolveAuthority(wsl) returned 'WebSocket(127.0.0.1:61892)' after 3351 ms
workbench.desktop.main.js:sourcemap:627  INFO Creating a socket (renderer-Management-25b46ce3-5340-4f07-81bc-f6ca1d10b8b3)...
workbench.desktop.main.js:sourcemap:627  INFO Creating a socket (renderer-ExtensionHost-5e68752e-a211-4f0f-a471-fc74b1336dd0)...
workbench.desktop.main.js:sourcemap:627  INFO Creating a socket (renderer-Management-25b46ce3-5340-4f07-81bc-f6ca1d10b8b3) was successful after 558 ms.
workbench.desktop.main.js:sourcemap:627  INFO Creating a socket (renderer-ExtensionHost-5e68752e-a211-4f0f-a471-fc74b1336dd0) was successful after 1790 ms.
workbench.desktop.main.js:sourcemap:627  WARN [ms-vscode.remote-server]: The viewsWelcome contribution in 'ms-vscode.remote-server' requires 'enabledApiProposals: ["contribViewsWelcome"]' in order to use the 'group' proposed property.
workbench.desktop.main.js:sourcemap:627  WARN [ms-toolsai.vscode-jupyter-cell-tags]: View container 'jupyter-variables' does not exist and all views registered to it will be added to 'Explorer'.
workbench.desktop.main.js:sourcemap:1842 Overwriting grammar scope name to file mapping for scope source.yaml.
Old grammar file: file:///c%3A/Users/AndyCarter/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/yaml/syntaxes/yaml.tmLanguage.json.
New grammar file: vscode-remote://wsl%2Bubuntu/home/andycarter/.vscode-server/extensions/redhat.vscode-yaml-1.13.0/syntaxes/yaml.tmLanguage.json
register @ workbench.desktop.main.js:sourcemap:1842
workbench.desktop.main.js:sourcemap:627  WARN No search provider registered for scheme: vscode-remote, waiting
workbench.desktop.main.js:sourcemap:627  INFO [perf] Render performance baseline is 148ms
workbench.desktop.main.js:sourcemap:1962 Activating extension 'EcksDy.env-switcher' failed: Cannot read properties of undefined (reading 'fsPath').
$onExtensionActivationError @ workbench.desktop.main.js:sourcemap:1962
N @ workbench.desktop.main.js:sourcemap:1531
M @ workbench.desktop.main.js:sourcemap:1531
H @ workbench.desktop.main.js:sourcemap:1531
G @ workbench.desktop.main.js:sourcemap:1531
(anonymous) @ workbench.desktop.main.js:sourcemap:1531
w @ workbench.desktop.main.js:sourcemap:69
fire @ workbench.desktop.main.js:sourcemap:69
fire @ workbench.desktop.main.js:sourcemap:598
z @ workbench.desktop.main.js:sourcemap:598
(anonymous) @ workbench.desktop.main.js:sourcemap:598
w @ workbench.desktop.main.js:sourcemap:69
fire @ workbench.desktop.main.js:sourcemap:69
acceptChunk @ workbench.desktop.main.js:sourcemap:598
(anonymous) @ workbench.desktop.main.js:sourcemap:598
(anonymous) @ workbench.desktop.main.js:sourcemap:658
w @ workbench.desktop.main.js:sourcemap:69
fire @ workbench.desktop.main.js:sourcemap:69
i.onload @ workbench.desktop.main.js:sourcemap:658
@EcksDy
Copy link
Owner

EcksDy commented Jul 27, 2023

Hey @acarter24, thanks for reaching out and a detailed issue.

That's a new issue I haven't stumbled upon yet. I too use WSL(2).
I got back to refactoring the extension last week, a new version should be published next week.

Lets see if that takes care of the issue.

@EcksDy
Copy link
Owner

EcksDy commented Jul 29, 2023

New version is up, you can run Extensions: Check for Extension Updates to force an update.

@acarter24
Copy link
Author

Thanks, that works now. Unfortunately I forgot to heed the 'It's strongly advised to backup your .env file before using this extension.' instruction from the original installation, and I wiped the contents of my main .env file. :( Anyway was probably due a rebuild.

Would you consider a modal saying 'You are about to overwrite contents of .env` which runs when you switch? And allow the modal to be turned off via the extension settings once you are confident using the extension?

@EcksDy
Copy link
Owner

EcksDy commented Jul 31, 2023

Oh, that sucks.
I didn't consider such prompt, but sounds like a good idea.
Do you mind opening an issue for it and I'll tag it for myself?

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

No branches or pull requests

2 participants