Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 biome __print_socket Permission denied error #177

Closed
1 task done
TooTallNate opened this issue Mar 9, 2024 · 12 comments
Closed
1 task done

🐛 biome __print_socket Permission denied error #177

TooTallNate opened this issue Mar 9, 2024 · 12 comments
Labels

Comments

@TooTallNate
Copy link

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
@Sec-ant Sec-ant transferred this issue from biomejs/biome Mar 27, 2024
@nhedger
Copy link
Member

nhedger commented Mar 27, 2024

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

@nhedger nhedger added the Triage label Mar 27, 2024
@TooTallNate
Copy link
Author

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

@Sec-ant
Copy link
Member

Sec-ant commented Mar 27, 2024

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?

@TooTallNate
Copy link
Author

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.

@nhedger
Copy link
Member

nhedger commented Mar 27, 2024

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"

@TooTallNate
Copy link
Author

$ 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

@TooTallNate
Copy link
Author

TooTallNate commented Mar 27, 2024

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)

@ffMathy
Copy link

ffMathy commented Apr 15, 2024

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)

@priyanshusingh305
Copy link

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

@nhedger
Copy link
Member

nhedger commented Apr 23, 2024

What happens if you run the command yourself:

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

@priyanshusingh305
Copy link

priyanshusingh305 commented Apr 24, 2024

Thanks @nhedger
Now its fixed
image
image

@nhedger
Copy link
Member

nhedger commented Aug 22, 2024

Closing because the upcoming version of the extension no longer uses sockets.

@nhedger nhedger closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants