Skip to content

🐛 Biome hangs when using formatOnSave #745

@Christopher-Hayes

Description

@Christopher-Hayes

VS Code version

1.102.1

Extension version

3.1.2

Biome version

2.0.5

Operating system

  • Windows
  • macOS
  • Linux

Description

Every so often Biome when running with VS Code formatOnSave will hang indefinitely. It seems like the files might be getting formatted, because they show as changed (with the dot), but the Biome task/action never finishes. So, the files never get saved after formatting.

VS Code shows an indefinite "Getting code actions from 'Biome' (configure)" notification that never goes away. It shows for each file you try to save.

Image

Possibly related, when I go to Ctrl + Shift + p > "Format Document with..", I see the screenshot below. Biome normally does not do this, but I'm seeing this at the same time as Biome is hanging.

Image

In VS Code the logs generally don't show anything unusual. The biome logs looks normal. The only logs that look unusual are the "Vim" extension logs:

Image

I use the vscodevim plugin for Vim bindings, not sure if the two plugins could have some conflict with each other. I do know I saved the files with Ctrl + Shift + s when it happened this time.


Steps to reproduce

I'm unable to reliably reproduce. This occasionally happens when you have formatOnSave enabled in VS Code and try to save the file. Most of the time it's fine.

May be related to saving multiple files at once, I'm not sure.

Expected behavior

Biome should not hang when saving a file.

Does this issue occur when using the CLI directly?

Not sure / Not applicable

Link to a minimal reproduction

No response

Logs

CLI:
  Version:                      2.0.5
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  BIOME_THREADS:                unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           unset
  JS_RUNTIME_NAME:              unset
  NODE_PACKAGE_MANAGER:         unset

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         biome.json
  Formatter enabled:            true
  Linter enabled:               true
  Assist enabled:               true
  VCS enabled:                  true

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━

ℹ Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      2.1.2
  Path:                         /home/REDACTED/.cache/biome/biome-socket-2.1.2

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━

ℹ Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      2.0.6
  Path:                         /home/REDACTED/.cache/biome/biome-socket-2.0.6

Running Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━

ℹ The client isn't connected to any server but rage discovered this running Biome server.

Server:
  Version:                      2.0.5
  Name:                         biome_lsp
  CPU Architecture:             x86_64
  OS:                           linux

Workspace:
  Open Documents:               7

Other Active Server Workspaces:

Workspace:
  Open Documents:               7
  Client Name:                  Visual Studio Code
  Client Version:               1.102.1

Workspace:
  Open Documents:               7
  Client Name:                  Visual Studio Code
  Client Version:               1.102.1

Biome Server Log:

⚠ Please review the content of the log file before sharing it publicly as it may contain sensitive information:
  * Path names that may reveal your name, a project name, or the name of your employer.
  * Source code

└─┐biome_lsp::server::initialize{}
  ├─ INFO biome_lsp::server Starting Biome Language Server...
  └─┐biome_lsp::session::initialize{}
  ┌─┘
┌─┘
┐biome_lsp::session::update_all_diagnostics{}
┘
└─┐biome_lsp::server::biome/rage{params=RageParams}
┌─┘

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━

ℹ Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      2.0.0
  Path:                         /home/REDACTED/.cache/biome/biome-socket-2.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions