biomejs/biome-vscode

๐Ÿ› `biome __print_socket` Permission denied error

Opened this issue ยท 11 comments

Environment information

CLI:
  Version:                      1.5.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.19.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/8.5.0"

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

Workspace:
  Open Documents:               0

What happened?

I updated VS Code to v1.87.1. At the same time I also clicked the popup to install biome globally (so this could be related to either of these actions, or a combination of both).

Now, when launching VS Code, an error popup saying "Biome: Restarting client failed" appears.

Full output tab below:

[Error - 11:53:44 PM] Restarting client failed
Error: Command "/Users/nrajlich/Library/Application Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome/biome __print_socket" exited with code 1
Output:
internalError/io โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  ร— Errors occurred while executing I/O operations.
    
    Caused by:
      Permission denied (os error 13)
  


	at getSocket (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:36605:11)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async createMessageTransports (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:36619:16)
	at async LanguageClient2.createConnection (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:15598:28)
	at async LanguageClient2.start (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:15174:30)
	at async activate (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:36368:3)
	at async u.n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
	at async u.m (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
	at async u.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)

Expected result

Biome extension should initialize properly

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Could you try the following:

  1. Delete the /Users/nrajlich/Library/Application Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome folder
  2. Restart VS Code
  3. You should see a prompt to download Biome
  4. Download Biome

That did seem to work, but only for workspaces where biome is not already a dependency in package.json.

I get the same error for workspaces where biome is a dependency:

The biome.lspBin setting points to a non-existing file: biome
Biome binary found at /Users/nrajlich/Code/TooTallNate/nx.js/node_modules/.pnpm/@biomejs+cli-darwin-arm64@1.5.3/node_modules/@biomejs/cli-darwin-arm64/biome
Copying binary to temporary folder: file:///Users/nrajlich/Library/Application%20Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome/biome
Executing Biome from: /Users/nrajlich/Library/Application Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome/biome
[cli-stderr] data 82
[cli-stderr] data 134
[cli-stdout] end
[cli] exit 1
[cli-stdout] finish
[cli-stdout] close
[cli-stderr] end
[Error - 1:59:04 AM] Biome client: couldn't create connection to server.
Error: Command "/Users/nrajlich/Library/Application Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome/biome __print_socket" exited with code 1
Output:
internalError/io โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  ร— Errors occurred while executing I/O operations.
    
    Caused by:
      Permission denied (os error 13)
  


	at getSocket (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:36605:11)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async createMessageTransports (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:36619:16)
	at async LanguageClient2.createConnection (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:15598:28)
	at async LanguageClient2.start (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:15174:30)
	at async activate (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:36368:3)
	at async u.n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
	at async u.m (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
	at async u.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)
[cli-stderr] finish
[cli] close 1
[cli-stderr] close

Does this issue have something to do with the space in your workdir path (Application Support)? ๐Ÿค” Would you try another path (without spaces) to confirm?

How would I configure to use a different path? The Application Support directory is standard for MacOS, and this seems to be where VSCode directs extensions to place files. I didn't configure that explicitly.

That did seem to work, but only for workspaces where biome is not already a dependency in package.json.

I get the same error for workspaces where biome is a dependency:

The biome.lspBin setting points to a non-existing file: biome
Biome binary found at /Users/nrajlich/Code/TooTallNate/nx.js/node_modules/.pnpm/@biomejs+cli-darwin-arm64@1.5.3/node_modules/@biomejs/cli-darwin-arm64/biome
Copying binary to temporary folder: file:///Users/nrajlich/Library/Application%20Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome/biome
Executing Biome from: /Users/nrajlich/Library/Application Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome/biome
[cli-stderr] data 82
[cli-stderr] data 134
[cli-stdout] end
[cli] exit 1
[cli-stdout] finish
[cli-stdout] close
[cli-stderr] end
[Error - 1:59:04 AM] Biome client: couldn't create connection to server.
Error: Command "/Users/nrajlich/Library/Application Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome/biome __print_socket" exited with code 1
Output:
internalError/io โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  ร— Errors occurred while executing I/O operations.
    
    Caused by:
      Permission denied (os error 13)
  


	at getSocket (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:36605:11)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async createMessageTransports (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:36619:16)
	at async LanguageClient2.createConnection (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:15598:28)
	at async LanguageClient2.start (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:15174:30)
	at async activate (/Users/nrajlich/.vscode/extensions/biomejs.biome-2.2.2/out/main.js:36368:3)
	at async u.n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
	at async u.m (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
	at async u.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)
[cli-stderr] finish
[cli] close 1
[cli-stderr] close

Actually, we copy the binary from your deps into this temp storage so that when you update your dependencies, it doesn't block if the LSP server is already running.

I also don't think the path is an issue because I have the same setup and it works fine.

What does the following command output

stat "/Users/nrajlich/Library/Application Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome/biome"
$ stat "/Users/nrajlich/Library/Application Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome/biome"
  File: /Users/nrajlich/Library/Application Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome/biome
  Size: 16204760  	Blocks: 31656      IO Block: 4096   regular file
Device: 1,16	Inode: 122984421   Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (  501/nrajlich)   Gid: (   20/   staff)
Access: 2024-03-27 02:01:41.380107485 -0700
Modify: 2024-03-27 01:59:03.966001417 -0700
Change: 2024-03-27 01:59:03.966510167 -0700
 Birth: 2024-03-27 01:59:03.942315055 -0700

Compared with the working version, they seem basically identical to me:

$ stat '/Users/nrajlich/Library/Application Support/Code/User/globalStorage/biomejs.biome/server/biome'
  File: /Users/nrajlich/Library/Application Support/Code/User/globalStorage/biomejs.biome/server/biome
  Size: 17760136  	Blocks: 34688      IO Block: 4096   regular file
Device: 1,16	Inode: 122984214   Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (  501/nrajlich)   Gid: (   20/   staff)
Access: 2024-03-27 14:22:18.597086594 -0700
Modify: 2024-03-27 01:55:49.510382502 -0700
Change: 2024-03-27 01:55:49.522021996 -0700
 Birth: 2024-03-27 01:55:49.506366462 -0700

Invoking the __print_socket command for each of these individually:

$ '/Users/nrajlich/Library/Application Support/Code/User/globalStorage/biomejs.biome/server/biome' __print_socket
/Users/nrajlich/Library/Caches/dev.biomejs.biome/biome-socket-1.6.3
$ "/Users/nrajlich/Library/Application Support/Code/User/workspaceStorage/de9bf791456e2ad24d56aca8e5b73508/biomejs.biome/biome" __print_socket
internalError/io โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  โœ– Errors occurred while executing I/O operations.

    Caused by:
      Permission denied (os error 13)

I am getting a variant of this too, but OS error 95 instead. Running on a Mac, but inside a Linux DevContainer:

[Error - 8:52:56 AM] Biome client: couldn't create connection to server.
Error: Command "/root/.vscode-server/data/User/workspaceStorage/239514837f70024c3fa8574e87e6a278/biomejs.biome/biome __print_socket" exited with code 1
Output:
internalError/io โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  ร— Errors occurred while executing I/O operations.
    
    Caused by:
      Operation not supported (os error 95)
  
	at getSocket (/root/.vscode-server/extensions/biomejs.biome-2.2.2/out/main.js:36605:11)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async createMessageTransports (/root/.vscode-server/extensions/biomejs.biome-2.2.2/out/main.js:36619:16)
	at async LanguageClient2.createConnection (/root/.vscode-server/extensions/biomejs.biome-2.2.2/out/main.js:15598:28)
	at async LanguageClient2.start (/root/.vscode-server/extensions/biomejs.biome-2.2.2/out/main.js:15174:30)
	at async activate (/root/.vscode-server/extensions/biomejs.biome-2.2.2/out/main.js:36368:3)
	at async o.n (/vscode/vscode-server/bin/linux-arm64/5c3e652f63e798a5ac2f31ffd0d863669328dc4c/out/vs/workbench/api/node/extensionHostProcess.js:144:6237)
	at async o.m (/vscode/vscode-server/bin/linux-arm64/5c3e652f63e798a5ac2f31ffd0d863669328dc4c/out/vs/workbench/api/node/extensionHostProcess.js:144:6200)
	at async o.l (/vscode/vscode-server/bin/linux-arm64/5c3e652f63e798a5ac2f31ffd0d863669328dc4c/out/vs/workbench/api/node/extensionHostProcess.js:144:5657)

I am getting a similar error

Biome binary found at c:\Users\Priyanshu Singh\Desktop\portfolio\node_modules\.pnpm\@biomejs+cli-win32-x64@1.7.0\node_modules\@biomejs\cli-win32-x64\biome.exe
Copying binary to temporary folder: file:///c%3A/Users/Priyanshu%20Singh/AppData/Roaming/Code/User/workspaceStorage/a6c3ddc52fbcb26815c62c9174399ef5/biomejs.biome/biome.exe
Executing Biome from: c:\Users\Priyanshu Singh\AppData\Roaming\Code\User\workspaceStorage\a6c3ddc52fbcb26815c62c9174399ef5\biomejs.biome\biome.exe
[cli-stderr] end
[cli-stdout] end
[cli] exit 3221225781
[Error - 12:23:24 AM] Biome client: couldn't create connection to server.
Error: Command "c:\Users\Priyanshu Singh\AppData\Roaming\Code\User\workspaceStorage\a6c3ddc52fbcb26815c62c9174399ef5\biomejs.biome\biome.exe __print_socket" exited with code 3221225781
    at getSocket (c:\Users\Priyanshu Singh\.vscode\extensions\biomejs.biome-2.2.2\out\main.js:36605:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at createMessageTransports (c:\Users\Priyanshu Singh\.vscode\extensions\biomejs.biome-2.2.2\out\main.js:36619:16)
    at LanguageClient2.createConnection (c:\Users\Priyanshu Singh\.vscode\extensions\biomejs.biome-2.2.2\out\main.js:15598:28)
    at LanguageClient2.start (c:\Users\Priyanshu Singh\.vscode\extensions\biomejs.biome-2.2.2\out\main.js:15174:30)
    at activate (c:\Users\Priyanshu Singh\.vscode\extensions\biomejs.biome-2.2.2\out\main.js:36368:3)
    at a.n (c:\Users\Priyanshu Singh\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:142:6237)
    at a.m (c:\Users\Priyanshu Singh\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:142:6200)
    at a.l (c:\Users\Priyanshu Singh\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:142:5657)
[cli-stderr] finish
[cli-stdout] finish
[cli-stdout] close
[cli] close 3221225781
[cli-stderr] close

What happens if you run the command yourself:

c:\Users\Priyanshu Singh\AppData\Roaming\Code\User\workspaceStorage\a6c3ddc52fbcb26815c62c9174399ef5\biomejs.biome\biome.exe __print_socket

Thanks @nhedger
Now its fixed
image
image