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

Extension failed to load VLS on restart #53

Open
phayz opened this issue Nov 25, 2024 · 5 comments
Open

Extension failed to load VLS on restart #53

phayz opened this issue Nov 25, 2024 · 5 comments

Comments

@phayz
Copy link

phayz commented Nov 25, 2024

Environment

Operating system: macOS Sequioia 15.1.1
VS Code: 1.95.3
Vale version 3.7.1
Vale VSCode extension version: 0.23.5

Issue:

I switched to the pre-release version of the extension and was prompted by VS Code to restart the extension. I did that and on restart Vale reported the following:

Vale VS Code client: couldn't create connection to server.

I believe there was a message prior which noted that the server could not be started though that's now disappeared.

When I view the output the content is:

[Error - 06:38:07] Vale VSCode client: couldn't create connection to server.
Launching server using command /Users/russell/.vscode/extensions/chrischinchilla.vale-vscode-0.23.5/vale-ls failed. Error: spawn /Users/russell/.vscode/extensions/chrischinchilla.vale-vscode-0.23.5/vale-ls ENOENT
@ChrisChinchilla
Copy link
Owner

Thanks! @phayz first things first, did you try relaunching VSCode once or twice?

And if you look in the folder it mentions, is there a vale-ls file?

@phayz
Copy link
Author

phayz commented Nov 26, 2024

Hi @ChrisChinchilla ...

  • I only had to restart VS Code once. When VS Code reloaded, and the document I previously had open was reopened, Vale was working as expected and no further errors or messages appeared.
  • I checked the folder /Users/russell/.vscode/extensions/chrischinchilla.vale-vscode-0.23.5/ and yes - the file vale-ls is there.

@phayz
Copy link
Author

phayz commented Nov 26, 2024

I did another test today to try and recreate the cutover to extension version 0.23.5:

  1. Opened the extension's page.
  2. Switched to the "Release Version".
  3. Restarted VS Code.
  4. Checked the content of the extensions directory and confirmed the directory for 0.23.5 had been removed and the release version's directory reinstated.
  5. Opened the extension's page.
  6. Switched to the pre-release version.
  7. The same errors occurred when the extension did its initial startup.
  8. I again checked the extension's directory and confirmed that the vale-ls binary is there.

Is there a race condition going on? That is, VS Code is trying to start the extension before the vale-ls binary has been downloaded?

image

@ChrisChinchilla
Copy link
Owner

@phayz It's all quite hard to test. I may end up just shipping the binaries with the extension, but it feels unnecessary… It's really hard to test this, as I need lots of clean machines.

Just to clarify… After your first run, you restarted, and then things worked?

On the second run, you had the same problem, did another restart fix it?

And yes, it's kind of a race condition, or in the JavaScript world async promises not working quite right. Ideally, it shouldn't need any restarting.

but if after a bunch of restarts, you do get things working, could you do some more general testing? That is also appreciated.

@phayz
Copy link
Author

phayz commented Nov 28, 2024

Hi @ChrisChinchilla ...

Yes - After first switching to the pre-release version I restarted VS Code and the Vale integration worked as expected.

On the second run the very same thing happened, and again the Vale integration started working after restarting VS Code.

I'll continue doing general testing.

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