-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
🐛 __print_socket error: Operation not supported within DevContainer #273
Comments
Thanks for the report. Would you mind providing a reproduction repo that contains the devcontainer configuration already set up ? |
Sure! Here is a minimal repro where I just tested that it still happens: https://github.com/ffMathy/biome-repro-1 Remember to start the project in the Dev Container. I also think it is necessary to run it from a Mac machine. |
Hey, I appreciate you taking the time. However, I'm not able to start the dev container because some mounts seem to be missing. It looks like this may be related to your personal setup. If you could provide a minimal setup, it would go a long way. |
Actually I don't think the mounts are needed to repro it. I just forgot to remove those. |
@nhedger any update given my reply? I updated the repro now to remove the bind mounts. |
We will fix this in v3 #201 |
Should be fixed in the latest nightly. |
@nhedger this is still an issue in the latest nightly. Can you reopen this? Log output (from "Biome LSP"):
|
I can now confirm that only our Mac users are having this issue. The people with Windows work just fine. |
Thanks for the deets, I'll try to reproduce it later today |
Because Biome is installed globally using PNPM
and
the extension's Path Environment strategy is resolving the Biome binary to
This fails because There are a couple of solutions:
|
I already have it installed in my project's dependencies too, as well as global. It's still happening. |
The reproduction you provided did not include project dependencies. Please update your reproduction with the relevant setup. |
Alright, fair enough, but then I tried installing the package with the Dockerfile command you provided. Here's the log output:
|
I see that you devcontainer config also references the latest stable version of the extension. Have you tried with the pre-release ? "customizations": {
"vscode": {
"extensions": [
- "biomejs.biome"
+ "biomejs.biome@prerelease"
]
}
}, |
Yeah, what I just do when I start up is to manually go in and switch to prerelease in the Extensions tab after the dev container has been built the first time. My version in the above was: v2024.9.91939 |
I'm wondering if that leaves the devcontainer in a weird state. When I start it with the |
Do you have the same settings in Docker as I posted above in the screenshot? More specifically, I am suspecting the "filesystem" part might be relevant. Edit: Changing to |
I wish the extension could somehow debug on which line it's happening. Is that possible to retrieve somehow? Then maybe I can also help a bit. |
I actually run OrbStack by default, but I just installed Docker Desktop and confirm that it works even with the same Docker settings as shown in your screenshot.
It is possible to debug the extension, but I don't know how/if this works in a devcontainer. Edit: looks like it's possible, I pushed a devcontainer config to the repo if you'd like to try and reproduce. |
After switching away from PNPM to Bun, all my issues (even with the old Biome) went away. So must be related to how node_modules gets built. In our project, we also had a
|
Okay, it started happening again. Interestingly, when it happens, if I rebuild the DevContainer, it stops happening. I noticed that by running tests a lot, we open a lot of ports. Could it have something to do with it trying to open sockets, but being exhausted due to some maximum socket count? Does Biome try to communicate with any form of network connection somehow? |
The current version of the extension does communicate with the Biome Daemon via sockets. I suggest you try the preview release of the extension, which changes the way the extension connects to the Daemon (it won't use sockets anymore) |
Then I don't think sockets is the root cause. Because when I was using the prerelease version earlier, it'd fail in the same way with the same error. Right now, switching to the prerelease version of Biome does indeed work, but then again, I also currently can't repro the issue with the old stable version of Biome. So let's leave this issue open until it happens again, and I can fully decide if switching to the prerelease will work. But since I do not believe it will, can we theorize as to what might then be causing it? What kind of file-related operations is the Biome VS Code extension trying to do? Can it have something to do with symlinking, binary aliases, long path names, or something similar? |
Can we insert more logging to maybe find the cause? Any suggestions on how I can help? ❤️ |
I'd like to focus on releasing the current prerelease as stable. In your previous you mentioned switching to the prerelease kinda solved it. Are you now experiencing it also on the prerelease ? If so, we can try adding some more logging when we create the LSP session. |
It still happens on the pre release. For both prerelease and current stable, it doesn't happen if I rebuild my container without cache and reinstall all my dependencies. Never tried just one of those, so not sure which one solves it. But then after some time, it starts happening. Also on prerelease. The latest logs I posted were from the prerelease. |
VS Code version
1.91.1
Extension version
2.3.0
Biome version
0.3.3
Operating system
Description
Steps to reproduce
Use the following Dockerfile as your DevContainer in VS Code, with the "dev-container" multi-stage image as the target:
I am running Docker on Mac, but the image is a Linux image.
Expected behavior
I expected it to not fail.
Does this issue occur when using the CLI directly?
Not sure / Not applicable
Logs
The text was updated successfully, but these errors were encountered: