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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Client cannot connect to server #192

Open
1 of 3 tasks
maurice opened this issue Apr 8, 2024 · 6 comments
Open
1 of 3 tasks

馃悰 Client cannot connect to server #192

maurice opened this issue Apr 8, 2024 · 6 comments
Labels

Comments

@maurice
Copy link

maurice commented Apr 8, 2024

VS Code version

1.88.0

Extension version

2.2.2

Biome version

1.6.4

Operating system

  • Windows
  • macOS
  • Linux

Description

Unfortunately I can't provide the actual log or screenshot because this is happening on my work machine, and copy + pasting anything to the public internet is forbidden.

So here I'm manually re-typing what I see in the "Biome" process OUTPUT tab:

Biome binary found at c:\Users\xxxxxx\yyyy\node_modules\@biomejs\cli-win32-x64\biome.exe
Copying binary to temporary folder: file://....
Executing Biome from:
c:\Users\...
[cli-stdout] data 29
[cli] exit 0
Connecting to "\\.\pipe\biome-service-1.6.4" ...
[Error - 11:02:04 AM] Server initialization failed.
  Message: This socket has been ended by the other party
  Code: -32099
[Error - 11:02:04 AM] Biome client: couldn't create connection to server.
  Message: This socket has been ended by the other party
  Code: -32099
[Info   - 11:02:04 AM] Connection to server got closed. Server will restart.
true
[cli-stdout] data 29
[cli-stderr] end
[cli] exit 0
[cli-stdout] end
Connecting to "\\.\pipe\biome-service-1.6.4" ...
[cli-stderr] finish
[cli-stdout] finish
[cli-stdout] close
[cli] close 0
[cli-stderr] close
[Error - 11:02:05 AM] Client Biome: connection to server is erroring. Shutting down server.
[Error - 11:02:05 AM] Client Biome: connection to server is erroring. Shutting down server.
[Error - 11:02:05 AM] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: starting
    at LanguageClient2.shutdown (c:\Users\...\biomejs.biome-2.2.2\out\main.js:15424:17)
    at LanguageClient2.stop (c:\Users\...\biomejs.biome-2.2.2\out\main.js:15401:21)
    at LanguageClient2.stop (c:\Users\...\biomejs.biome-2.2.2\out\main.js:17915:22)
    at LanguageClient2.handleConnectionError(c:\Users\...\biomejs.biome-2.2.2\out\main.js:15643:16)
    at process.processTicksAndRejections ...
[Error - 11:02:05 AM] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: starting
    at LanguageClient2.shutdown (c:\Users\...\biomejs.biome-2.2.2\out\main.js:15424:17)
    at LanguageClient2.stop (c:\Users\...\biomejs.biome-2.2.2\out\main.js:15401:21)
    at LanguageClient2.stop (c:\Users\...\biomejs.biome-2.2.2\out\main.js:17915:22)
    at LanguageClient2.handleConnectionError(c:\Users\...\biomejs.biome-2.2.2\out\main.js:15643:16)
    at process.processTicksAndRejections ...
[Error - 11:02:05 AM] Server initialization failed.
  Message: write EPIPE
  Code: -32099
[Error - 11:02:05 AM] Biome client: couldn't create connection to server.
  Message: write EPIPE
  Code: -32099
[Error - 11:02:05 AM] Restarting server failed
  Message: write EPIPE
  Code: -32099
[Info   - 11:02:05 AM] Connection to server got closed. Server will restart.
true
....

The restart, failure cycle continues a bit then sometimes it seems to give up after 5 attempts.

Steps to reproduce

This is probably not going to be universally reproducible; I expect it's some corporate firewall/spyware on my work machine that is causing the issue.

However I've not done anything unusual (AFAIK), simply adding biome to my project's NPM dependencies, creating the config file, then installing extension.

Expected behavior

Extension should not error and provide linting errors as I type and format/fix on save

Does this issue occur when using the CLI directly?

Not sure / Not applicable

Logs

See above

If you can guide me with some CLI commands I can try to get more diagnostics, I'd be very happy to run them and share the output
@maurice maurice added the Triage label Apr 8, 2024
@ematipico
Copy link
Member

That would be almost impossible to triage, I think.

It seems you have a process that stops socket connections in your laptop

[Error - 11:02:04 AM] Biome client: couldn't create connection to server.
  Message: This socket has been ended by the other party
  Code: -32099

@maurice
Copy link
Author

maurice commented Apr 23, 2024

I switched to dprint for formatting as it has a working (on my work machine) VS Code extension, plus it has plugins for CSS and potentially more than Biome offers.

I am still using Biome for linting as I really like the lints, and it promotes a much more modern style out of the box vs prettier, where it's probably possible to opt-in to the same kinds of rules, but you have to know about them, while Biome has great rules enabled by default.

So we're running Biome via CLI only at this point, which is a shame, but it's still providing a lot of value.

It may not be a priority for you @ematipico but there could be a lot of potential "enterprise users" like me that have restricted work machines that will try Biome and give up quickly due to things like the above.

Other Rust tools like dprint and oxlint do have working plugins on my machine so I guess they aren't using socket files.

@ematipico
Copy link
Member

ematipico commented Apr 23, 2024

Don't worry @maurice, I'm NOT dismissing your use case. I was commenting on something about the logs. It's my first time seeing one, and I tried to venture a guess.

@Abhinav1217
Copy link

Hi, I am having same issue.

versions:
vscode 1.89
biome: (extension bundled) 1.72
image

I am using bun to install biome for my current project, The plugin didn't detect the biome command in node_module, so I accepted it to installed bundled biome. It was working fine initially, but then after restart, it just stopped working. I reinstalled biome again, and it was working again, until I closed the vscode ide. After opening the project again after lunch, it once again started crashing until, I switched the bundled biome again.

Could not resolve Biome in the dependencies of workspace folder: d:\Projects\****
Searching for Biome in PATH
Biome binary found at c:\Users\Lenovo\AppData\Roaming\Code\User\globalStorage\biomejs.biome\server\biome.exe
Executing Biome from: c:\Users\Lenovo\AppData\Roaming\Code\User\globalStorage\biomejs.biome\server\biome.exe
[cli-stdout] data 29
[cli] exit 0
[cli-stderr] data 16
[cli-stderr] data 86
[cli-stderr] data 113
Connecting to "\\.\pipe\biome-service-1.7.2" ...
[cli-stderr] data 393
[Error - 11:05:13 AM] Request textDocument/codeAction failed.
  Message: This socket has been ended by the other party
  Code: -32099 
[Info  - 11:05:13 AM] Connection to server got closed. Server will restart.
true
[cli-stdout] end
[cli-stderr] end
[cli-stdout] finish
[cli-stderr] finish
[cli-stderr] close
[cli] close 0
[cli-stdout] close
[cli-stdout] data 29
[cli] exit 0
[cli-stderr] data 17
[cli-stderr] data 85
[cli-stderr] data 11
[cli-stderr] data 102
Connecting to "\\.\pipe\biome-service-1.7.2" ...
[Error - 11:05:16 AM] Found an unknown key `types`.
[cli-stderr] data 393
[Info  - 11:05:16 AM] Connection to server got closed. Server will restart.
true
[cli-stderr] end
[cli-stdout] end
[cli-stderr] finish
[cli-stdout] finish
[cli-stdout] close
[cli] close 0
[cli-stderr] close
[cli-stdout] data 29
[cli] exit 0
Connecting to "\\.\pipe\biome-service-1.7.2" ...
[Error - 11:05:17 AM] Found an unknown key `types`.
[cli-stderr] data 393
[Info  - 11:05:17 AM] Connection to server got closed. Server will restart.
true
[cli-stderr] end
[cli-stdout] end
[cli-stderr] finish
[cli-stdout] finish
[cli-stdout] close
[cli] close 0
[cli-stderr] close
[cli-stdout] data 29
[cli-stderr] data 64
[cli-stderr] data 151
[cli] exit 0
[cli-stderr] data 215
Connecting to "\\.\pipe\biome-service-1.7.2" ...
[Error - 11:05:19 AM] Client Biome: connection to server is erroring. Shutting down server.
[Error - 11:05:19 AM] Client Biome: connection to server is erroring. Shutting down server.
[Error - 11:05:19 AM] Request textDocument/codeAction failed.
  Message: write EPIPE
  Code: -32099 
[cli-stderr] data 393
[Error - 11:05:19 AM] Found an unknown key `types`.
[Error - 11:05:19 AM] Stopping server failed
  Message: Cannot call write after a stream was destroyed
  Code: -32099 
[Error - 11:05:19 AM] Stopping server failed
  Message: Cannot call write after a stream was destroyed
  Code: -32099 
[Error - 11:05:19 AM] Stopping server failed
  Message: Cannot call write after a stream was destroyed
  Code: -32099 
[cli-stdout] end
[cli-stderr] end
[cli-stdout] finish
[cli-stderr] finish
[cli-stderr] close
[cli] close 0
[cli-stdout] close

@Abhinav1217
Copy link

While I am on my work machine, unlike original poster, I am not behind corporate firewall or anything like that. There is no usage restrictions on my system.

Also, while the extension is not able to detect the biome on node_modules, on windows, On my personal linux machine, it has no issues detecting it.

@unional
Copy link

unional commented May 10, 2024

I'm using a personal desktop with Windows 11 (in wsl) also experience this.

Seems like biome server will crash when the code is invalid TypeScript.

And it fail to start when the invalid TypeScript is still there.

After I fix the TypeScript syntax error (and save the files), then I can start the biome server again.

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

No branches or pull requests

4 participants