biomejs / biome

A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.
https://biomejs.dev
Apache License 2.0
15.08k stars 471 forks source link

πŸ› Biome encountered an unexpected error, probably due to Arabic chars. #4231

Closed Osama-Elshimy closed 2 weeks ago

Osama-Elshimy commented 2 weeks ago

Environment information

CLI:
  Version:                      1.9.3
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.3.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/9.10.0"

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

Workspace:
  Open Documents:               0

What happened?

  1. Run biome lint on a repo where I have Arabic text, I get the following error:
Biome encountered an unexpected error

This is a bug in Biome, not an error in your code, and we would appreciate it if you could report it to https://github.com/biomejs/biome/issues/ along with the following information to help us fixing the issue:

Source Location: crates/biome_js_factory/src/utils.rs:34:36
Thread Name: biome::worker_7
Message: byte index 1 is not a char boundary; it is inside 'Ω‡' (bytes 0..2) of `Ω‡Ψ°Ψ§ الملف غير Ω…ΨͺΩˆΩ‚ΨΉ `

./src/middlewares/errorHandler.ts internalError/panic  INTERNAL  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  βœ– processing panicked: byte index 1 is not a char boundary; it is inside 'Ω‡' (bytes 0..2) of `Ω‡Ψ°Ψ§ الملف غير Ω…ΨͺΩˆΩ‚ΨΉ `

  ⚠ This diagnostic was derived from an internal Biome error. Potential bug, please report it if necessary.

Checked 36 files in 9ms. No fixes applied.

I also got these crashing messages from vscode:

Expected result

biome should handle Arabic text and work correctly.

Code of Conduct

ematipico commented 2 weeks ago

Duplicate of https://github.com/biomejs/biome/issues/4181