biomejs/biome

๐Ÿ› VS Code extension fails to start

Closed this issue ยท 8 comments

Environment information

CLI:
  Version:                      1.2.2
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v19.4.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/9.2.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Running Biome Server: โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

โ„น The client isn't connected to any server but rage discovered this running Biome server.
โœ– Failed to connect: the request to the remote workspace timed out

Biome Server Log:

What happened?

followed the installation instruction on the website (both CLI and VScode extension).
Biome CLI is working
Biome VS Code extension does not start (format with doesn't show Biome as an option)

running npx biome version returns

CLI:        1.2.2
Server:     not connected

Biome output in VSCode

Configuration file required, looking for one.
Config file found at /Users/*****/workspace/scaffold/biome.json, enabling Biome extension
Using Biome from /Users/*****/workspace/scaffold/node_modules/.bin/biome
[cli-stdout] data 68
[cli-stderr] end
[cli-stdout] end
[cli] exit 0
Connecting to "/var/folders/8h/drtc0lfx1hl9wsp4qg566zbw0000gp/T/biome-socket-1.2.2" ...
[cli-stderr] finish
[cli-stdout] finish
[cli-stdout] close
[cli] close 0
[cli-stderr] close

I tried to downgrade the extension, restarted VS Code, clean and install again etc..

Expected result

Expected the Biome VSCode extension to work.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Biome VS Code extension does not start (format with doesn't show Biome as an option)

The extension starts sending events when you open a file recognised by Biome. Try opening a JS file and you should be able to see the Biome from the "Format With...".

Did you try to increase the trace level and check if "Biome Trace" channel is sending eventS?

I tried with a js file but Biome is not in the option's list.
I've set the trace level to verbose, I have a single event[Trace - 11:40:29] Sending request 'initialize - (0)'. followed by a Params object.

At the bottom right of VS Code window, Biome has a "reload" icon.

Screenshot 2023-09-25 at 11 29 19

I've tried to force it with "editor.defaultFormatter": "biomejs.biome", but the VS Code outputs

FormattingExtension 'Biome' is configured as formatter but it cannot format 'JavaScript'-files

I've disabled all the extensions but Biome

Do you have a repository you can share? That will help us to triage the issue

literally it's a just a yarn create vite with typescript template to test out Biome...

I run create vite, and the Biome works fine with VSCode. There's probably something else.

I get a similar problem. I can use the CLI just fine, but the VS Code extension fails to boot

some info and reports:

the repo I chose: https://github.com/tbeseda/waylon (very small), but I get similar results in other, larger repos

CLI:
  Version:                      1.2.2
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.18.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/9.8.1"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Server:
  Status:                       stopped
Configuration file required, looking for one.
Config file found at ~/waylon/biome.json, enabling Biome extension
Using Biome from ~/waylon/node_modules/.bin/biome
[cli-stderr] data 37
[cli-stderr] end
[cli-stdout] end
[cli] exit 127
[Error - 9:37:20 PM] Biome client: couldn't create connection to server.
Error: Command "~/waylon/node_modules/.bin/biome __print_socket" exited with code 127
Output:
env: node: No such file or directory

	at getSocket (~/.vscode/extensions/biomejs.biome-1.4.2-darwin-arm64/out/main.js:19600:11)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async createMessageTransports (~/.vscode/extensions/biomejs.biome-1.4.2-darwin-arm64/out/main.js:19615:16)
	at async LanguageClient2.createConnection (~/.vscode/extensions/biomejs.biome-1.4.2-darwin-arm64/out/main.js:15576:28)
	at async LanguageClient2.start (~/.vscode/extensions/biomejs.biome-1.4.2-darwin-arm64/out/main.js:15152:30)
	at async activate (~/.vscode/extensions/biomejs.biome-1.4.2-darwin-arm64/out/main.js:19421:3)
	at async E.n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:6206)
	at async E.m (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:6169)
	at async E.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:5626)
[cli-stderr] finish
[cli-stdout] finish
[cli-stdout] close
[cli] close 127
[cli-stderr] close

edit: VS Code info

Version: 1.82.2
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T06:00:27.244Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin arm64 23.0.0

Just restarted/updated my macbook and now Biome works fine...

fifv commented

I met similar problem, in my case I found a biome.exe is executed busily at background, which I used to format a heavy file to test performance but it got stuck.
After terminating it, the extension started smoothly.