-
-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
Description
VS Code version
1.109.4
Extension version
3.4.0
Biome version
2.3.14
Operating system
- Windows
- macOS
- Linux
Description
When I editing a TypeScript file below:
import type { DispatcherEvent, DispatcherEventData } from "@/api/generated/schemas";
import { createSseStream } from "./sse";
type DispatcherEventHandler = (data: DispatcherEventData) => unknown;
class SseDispatcher {
private abortController: AbortController | null = null;
private readonly listeners: Map<DispatcherEvent, Set<DispatcherEventHandler>> = new Map();
on(eventType: DispatcherEvent, callback: DispatcherEventHandler) {
const listeners = this.listeners.get(eventType) ?? new Set();
listeners.add(callback);
this.listeners.set(eventType, listeners);
}
connect(url: URL | string) {
this.abortController = createSseStream(url, {
onMessage: ({ event, data }) => {
const listeners = this.listeners.get(event as DispatcherEvent);
if (!listeners) {
return;
}
for (const callback of listeners) {
callback(data as DispatcherEventData);
}
},
});
}
disconnect() {
this.abortController?.abort();
this.abortController = null;
this.listeners.clear();
}
}Biome extention keeps showing error message Request textDocument/codeAction failed., and sometimes Client biome: connection to server is erroring. write EPIPE Shutting down server..
And it tries to format all the indents from spaces to tabs when I save files even if I uses ultracite's default configuration, whose indentation settings are below:
"formatter": {
"enabled": true,
"formatWithErrors": true,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto",
"bracketSpacing": true
},
Here is my own biome config file:
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["ultracite/core", "ultracite/react"],
"assist": {
"actions": {
"source": {
"useSortedAttributes": "off"
}
}
},
"linter": {
"rules": {
"correctness": {
"useExhaustiveDependencies": "off"
},
"suspicious": {
"noConsole": "off",
"noArrayIndexKey": "off"
},
"style": {
"noExportedImports": "off",
"useConsistentTypeDefinitions": {
"level": "error",
"options": {
"style": "type"
}
}
}
}
},
"formatter": {
"lineWidth": 120
},
"overrides": [
{
"includes": ["src/api/*.ts"],
"linter": {
"rules": {
"performance": {
"noBarrelFile": "off"
}
}
}
}
]
}
Addition infomation
My VSCode workspace has multiple root directory, and only the frontend subdirectory (which is also be added as another root directory) has the biome config file.
Steps to reproduce
- Start to edit the typescript file
- Edit the file to half
- Save file
- Shows
Request textDocument/codeAction failedmessage when saving
Expected behavior
Format code file normally and does not accidently format my indentations into tabs.
Does this issue occur when using the CLI directly?
Not sure / Not applicable
Link to a minimal reproduction
No response
Logs
2026-02-22 17:11:22.582 [info] [Info - 5:11:22 PM] Server initialized with PID: 8460
2026-02-22 17:12:41.656 [info] [Error - 5:12:41 PM] Request textDocument/codeAction failed.
2026-02-22 17:12:41.656 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 35, 59, 94, 136, 138, 209, 211, 234, 293, 367, 383, 385, 455, 522, 552, 599, 604, 606, 638, 689, 730, 803, 830, 849, 860, 905, 955, 974, 983, 988, 990, 1008, 1044, 1078, 1107, 1112, 1115], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 35, 59, 94, 136, 138, 209, 211, 234, 293, 367, 383, 385, 455, 522, 552, 599, 604, 606, 638, 689, 730, 803, 830, 849, 860, 905, 955, 974, 983, 988, 990, 1008, 1044, 1078, 1107, 1112, 1115], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:12:41.666 [info] [Error - 5:12:41 PM] Request textDocument/codeAction failed.
2026-02-22 17:12:41.666 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 35, 59, 94, 136, 138, 209, 211, 234, 293, 367, 383, 385, 455, 522, 552, 599, 604, 606, 638, 689, 730, 803, 830, 849, 860, 905, 955, 974, 983, 988, 990, 1008, 1044, 1078, 1107, 1112, 1115], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 35, 59, 94, 136, 138, 209, 211, 234, 293, 367, 383, 385, 455, 522, 552, 599, 604, 606, 638, 689, 730, 803, 830, 849, 860, 905, 955, 974, 983, 988, 990, 1008, 1044, 1078, 1107, 1112, 1115], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:13:32.767 [info] [Error - 5:13:32 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:32.767 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:13:32.782 [info] [Error - 5:13:32 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:32.782 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:13:34.223 [info] [Error - 5:13:34 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:34.223 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:13:34.232 [info] [Error - 5:13:34 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:34.232 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:13:34.487 [info] [Error - 5:13:34 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:34.487 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:13:34.496 [info] [Error - 5:13:34 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:34.496 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:13:36.096 [info] [Error - 5:13:36 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:36.096 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:13:36.111 [info] [Error - 5:13:36 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:36.111 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:13:36.337 [info] [Error - 5:13:36 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:36.337 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:13:36.345 [info] [Error - 5:13:36 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:36.345 [info] Message: failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Code: -32603
failed to access range Range { start: Position { line: 0, character: 0 }, end: Position { line: 39, character: 0 } } in document file:///d%3A/MyPrograms/frontend-programs/dais/src-frontend/src/lib/sse-dispatcher.ts LineIndex { newlines: [0, 15, 33, 55, 90, 132, 134, 205, 207, 230, 287, 359, 371, 373, 441, 504, 530, 573, 576, 578, 608, 655, 690, 755, 774, 783, 823, 863, 870, 875, 878, 880, 896, 928, 958, 983, 986, 989], line_wide_chars: {} }
Caused by:
position Position { line: 39, character: 0 } is out of range
2026-02-22 17:13:36.878 [info] [Error - 5:13:36 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:36.878 [info] Message: panicked at crates\biome_lsp\src\utils.rs:85:22:
diff length is overflowing the line count in the original file
Backtrace: disabled backtrace
Code: -32603
PanicError { info: "panicked at crates\\biome_lsp\\src\\utils.rs:85:22:\ndiff length is overflowing the line count in the original file", backtrace: Some(<disabled>) }
2026-02-22 17:13:38.206 [info] [Error - 5:13:38 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:38.206 [info] Message: panicked at crates\biome_lsp\src\utils.rs:85:22:
diff length is overflowing the line count in the original file
Backtrace: disabled backtrace
Code: -32603
PanicError { info: "panicked at crates\\biome_lsp\\src\\utils.rs:85:22:\ndiff length is overflowing the line count in the original file", backtrace: Some(<disabled>) }
2026-02-22 17:13:40.980 [info] [Error - 5:13:40 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:40.980 [info] Message: panicked at crates\biome_lsp\src\utils.rs:85:22:
diff length is overflowing the line count in the original file
Backtrace: disabled backtrace
Code: -32603
PanicError { info: "panicked at crates\\biome_lsp\\src\\utils.rs:85:22:\ndiff length is overflowing the line count in the original file", backtrace: Some(<disabled>) }
2026-02-22 17:13:43.576 [info] [Error - 5:13:43 PM] Request textDocument/codeAction failed.
2026-02-22 17:13:43.576 [info] Message: panicked at crates\biome_lsp\src\utils.rs:85:22:
diff length is overflowing the line count in the original file
Backtrace: disabled backtrace
Code: -32603
PanicError { info: "panicked at crates\\biome_lsp\\src\\utils.rs:85:22:\ndiff length is overflowing the line count in the original file", backtrace: Some(<disabled>) }
2026-02-22 17:13:50.275 [info] [Info - 5:13:50 PM] Connection to server got closed. Server will restart.
2026-02-22 17:13:50.275 [info] true
2026-02-22 17:13:50.276 [info] [Error - 5:13:50 PM] Server process exited with code 0.
2026-02-22 17:13:50.396 [info] [Info - 5:13:50 PM] Server initialized with PID: 8460
2026-02-22 17:13:51.676 [info] [Error - 5:13:51 PM] Client biome: connection to server is erroring.
write EPIPE
Shutting down server.
2026-02-22 17:13:51.677 [info] [Error - 5:13:51 PM] Sending document notification textDocument/didSave failed.
2026-02-22 17:13:51.677 [info] Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:159:15)
at writeGeneric (node:internal/stream_base_commons:150:3)
at Socket._writeGeneric (node:net:966:11)
at Socket._write (node:net:978:8)
at writeOrBuffer (node:internal/streams/writable:572:12)
at _write (node:internal/streams/writable:501:10)
at Writable.write (node:internal/streams/writable:510:10)
at c:\Users\44176\.vscode\extensions\biomejs.biome-3.4.0\out\main.js:3816:30
at new Promise (<anonymous>)
at WritableStreamWrapper.write (c:\Users\44176\.vscode\extensions\biomejs.biome-3.4.0\out\main.js:3803:17)
at StreamMessageWriter.doWrite (c:\Users\44176\.vscode\extensions\biomejs.biome-3.4.0\out\main.js:2229:35)
2026-02-22 17:13:51.684 [info] [Error - 5:13:51 PM] Server process exited with code 0.
2026-02-22 17:13:51.686 [info] [Error - 5:13:51 PM] Client biome: connection to server is erroring.
Cannot call write after a stream was destroyed
2026-02-22 17:13:51.686 [info] [Error - 5:13:51 PM] Stopping server failed
2026-02-22 17:13:51.686 [info] Message: Cannot call write after a stream was destroyed
Code: -32099
2026-02-22 17:13:51.687 [info] [Error - 5:13:51 PM] Stopping server failed
2026-02-22 17:13:51.687 [info] Message: Cannot call write after a stream was destroyed
Code: -32099
Reactions are currently unavailable