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

🐛 error access vscode extensions #20

Closed
1 task done
wcastand opened this issue Sep 15, 2023 · 13 comments
Closed
1 task done

🐛 error access vscode extensions #20

wcastand opened this issue Sep 15, 2023 · 13 comments

Comments

@wcastand
Copy link

wcastand commented Sep 15, 2023

Environment information

biome rage return :

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

Server:
  Version:                      1.1.2

yarn v3 on a monorepo.

What happened?

update vscode extension got an error:

Biome client: couldn't create connection to server.

/node_modules/.bin/biome: Permission denied

Discord asked me to run this command and it fixed the issue:

chmod +x ./node_modules/.bin/biome

been asked to reference this issue: rome/tools#3800

Expected result

update the vscode extension and it works

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@nhedger
Copy link
Member

nhedger commented Sep 15, 2023

Could you provide a repository that reproduces this issue? This would help a lot.

@wcastand
Copy link
Author

wcastand commented Sep 15, 2023

sorry but at work so not really the time, plus no idea why it happened so can't really reproduce. i just update my vscode extensions :/ someone on discord asked me to report the issue so here i am but not sure i will be a great help. :/

@Conaclos
Copy link
Member

Which OS do you use?

@Vivalldi
Copy link
Contributor

Vivalldi commented Sep 15, 2023

Same thing here. It's failing on macOS for me

Here's a rage I took before applying permission change

CLI:
  Version:                      1.2.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.14.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/3.6.1"

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

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Server:
  Status:                       stopped

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

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

Server:
  Version:                      1.1.0

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

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

Server:
  Version:                      1.1.2


@Conaclos
Copy link
Member

I have no issue with npm on linux. Maybe a yarn-specific issue?

@nhedger
Copy link
Member

nhedger commented Sep 15, 2023

I just tested with Yarn 3 on macOS with Biome 1.2.0 and had no issues.

@wcastand
Copy link
Author

wcastand commented Sep 15, 2023

@nhedger
Copy link
Member

nhedger commented Sep 15, 2023

Could you please:

  1. Delete your node_modules folder
  2. Reinstall your modules by running yarn
  3. Run the following command ls -la node_modules/.bin/biome and paste the output here

@Vivalldi
Copy link
Contributor

Vivalldi commented Sep 15, 2023

I've been able to reproduce by doing the following

  1. Delete node_modules
  2. Install biome vscode extension 1.2.2
  3. Install biome at 1.1.2
  4. Open a ts file to trigger biome extension

Perform double update
5. Install biome @ 1.2.0
6. Install latest biome vscode extension
7. Reload vscode window (focus ts file if you need)
8. Get Biome client: couldn't create connection to server. error

Output of ls -la

lrwxr-xr-x  1 cosgrove  staff  27 Sep 15 12:36 node_modules/.bin/biome -> ../@biomejs/biome/bin/biome

Rage

CLI:
  Version:                      1.2.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.14.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/3.6.1"

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

Workspace:
  Open Documents:               0

Discovering running Biome servers...

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

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

Server:
  Version:                      1.2.0
  Name:                         biome_lsp
  CPU Architecture:             aarch64
  OS:                           macos

Workspace:
  Open Documents:               0

Other Active Server Workspaces:

Workspace:
  Open Documents:               0
  Client Name:                  Visual Studio Code
  Client Version:               1.82.2

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

###### last few lines below #####
├─2041630ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
├─┐biome_lsp::server::initialize{capabilities=ClientCapabilities { workspace: None, text_document: None, window: None, general: None, experimental: None }, client_info=ClientInfo { name: "biome_service", version: Some("1.2.0") }}
│ ├─0ms INFO biome_lsp::server Starting Biome Language Server...
├─┘
├─┐biome_lsp::server::biome/rage{params=RageParams}
├─┘
├─2046625ms ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)

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

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

Server:
  Version:                      1.1.0

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

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

Server:
  Version:                      1.1.2


@quantizor
Copy link

quantizor commented Sep 15, 2023

This just popped up after upgrading to 1.2

Error - 12:51:43 PM] Biome client: couldn't create connection to server.
Error: Command "/Users/esj/code/frontend-v2/node_modules/.bin/biome __print_socket" exited with code 126
Output:
/bin/sh: /Users/esj/code/frontend-v2/node_modules/.bin/biome: Permission denied

	at getSocket (/Users/esj/.vscode/extensions/biomejs.biome-1.4.0-darwin-arm64/out/main.js:19600:11)
ℹ Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      1.1.2

yarn.lock

"@biomejs/biome@npm:^1.2.0":
  version: 1.2.0
  resolution: "@biomejs/biome@npm:1.2.0"
  dependencies:
    "@biomejs/cli-darwin-arm64": 1.2.0
    "@biomejs/cli-darwin-x64": 1.2.0
    "@biomejs/cli-linux-arm64": 1.2.0
    "@biomejs/cli-linux-x64": 1.2.0
    "@biomejs/cli-win32-arm64": 1.2.0
    "@biomejs/cli-win32-x64": 1.2.0
  dependenciesMeta:
    "@biomejs/cli-darwin-arm64":
      optional: true
    "@biomejs/cli-darwin-x64":
      optional: true
    "@biomejs/cli-linux-arm64":
      optional: true
    "@biomejs/cli-linux-x64":
      optional: true
    "@biomejs/cli-win32-arm64":
      optional: true
    "@biomejs/cli-win32-x64":
      optional: true
  bin:
    biome: bin/biome
  checksum: 952f9faa1e8b814807829e0e46b8fe77382abf5d73659c8825c28971367ce062f75ffec66dcdd75aa706cdd01abc146b013d665a69373bab961ca33e6df327d2
  languageName: node
  linkType: hard

"@biomejs/cli-darwin-arm64@npm:1.2.0":
  version: 1.2.0
  resolution: "@biomejs/cli-darwin-arm64@npm:1.2.0"
  conditions: os=darwin & cpu=arm64
  languageName: node
  linkType: hard

"@biomejs/cli-darwin-x64@npm:1.2.0":
  version: 1.2.0
  resolution: "@biomejs/cli-darwin-x64@npm:1.2.0"
  conditions: os=darwin & cpu=x64
  languageName: node
  linkType: hard

"@biomejs/cli-linux-arm64@npm:1.2.0":
  version: 1.2.0
  resolution: "@biomejs/cli-linux-arm64@npm:1.2.0"
  conditions: os=linux & cpu=arm64
  languageName: node
  linkType: hard

"@biomejs/cli-linux-x64@npm:1.2.0":
  version: 1.2.0
  resolution: "@biomejs/cli-linux-x64@npm:1.2.0"
  conditions: os=linux & cpu=x64
  languageName: node
  linkType: hard

"@biomejs/cli-win32-arm64@npm:1.2.0":
  version: 1.2.0
  resolution: "@biomejs/cli-win32-arm64@npm:1.2.0"
  conditions: os=win32 & cpu=arm64
  languageName: node
  linkType: hard

"@biomejs/cli-win32-x64@npm:1.2.0":
  version: 1.2.0
  resolution: "@biomejs/cli-win32-x64@npm:1.2.0"
  conditions: os=win32 & cpu=x64
  languageName: node
  linkType: hard

How could an old version be hanging around after upgrade?

Even weirder:

yarn biome version
CLI:        1.2.0
Server:     not connected

Starting and stopping via yarn biome stop && yarn biome start did not fix the apparently running older version of the server.

After clearing out node_modules and reinstalling, the error goes away. So it looks like there might be an issue around disposal of prior versions.

@harrytran998
Copy link

Same issue here, hope your team can fix this!

/bin/sh: project_path/node_modules/.bin/biome: Permission denied
at getSocket (/Users/.vscode/extensions/biomejs.biome-1.4.2-darwin-x64/out/main.js:19600:11)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async createMessageTransports (/Users/.vscode/extensions/biomejs.biome-1.4.2-darwin-x64/out/main.js:19615:16)
	at async LanguageClient2.createConnection (/Users/.vscode/extensions/biomejs.biome-1.4.2-darwin-x64/out/main.js:15576:28)
	at async LanguageClient2.start (/Users/.vscode/extensions/biomejs.biome-1.4.2-darwin-x64/out/main.js:15152:30)
	at async activate (/Users/.vscode/extensions/biomejs.biome-1.4.2-darwin-x64/out/main.js:19421:3)
	at async E.n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:6206)
	at async E.m (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:6169)
	at async E.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:5626)
[cli-stderr] finish

@nhedger
Copy link
Member

nhedger commented Oct 6, 2023

Hey 👋, this issue may be fixed in the latest nightly version.

Could you try it and tell us if you're still experiencing the issue?

Here's the command to install the nightly version

code --install-extension [email protected]

After your tests, you can revert to the current stable version with the following command.

code --install-extension [email protected]

@nhedger nhedger transferred this issue from biomejs/biome Nov 26, 2023
@ematipico
Copy link
Member

It's been 2 months since the last message, I assume the bug is fixed.

If anybody happens to arrive here, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants