-
Notifications
You must be signed in to change notification settings - Fork 4
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
Can't connect from dev container #269
Comments
Hey there @Muzosh there could be a few reasons why the docker container is unable to reach your host machine. You are definitely on the right track here, debugging firewall rules. The fact that Pieces was able to launch is interesting, this is done in the app by opening a custom URI: A good first check is to see if you can reach your host machine from a shell running in your docker container. Try running I think it would be ideal to try and hop on to debug this one together live, schedule with me here if you're interested: https://calendar.google.com/calendar/u/0/appointments/schedules/AcZssZ3IijT1qgm0GgFeIllIuyy5ehWktuYQiPI6jegH4HlNGApAOMMVPiWCcoj_2aPfvgUiDmHHKcQE |
Interesting, your Setting the |
Removing |
Anyway, thanks a lot. Would you like to still debug this one live? |
@Muzosh Very interesting! I have an idea on how I can resolve this one already, thanks for debugging this one with me. One piece of advice I have for this is, when you are using VS Code dev containers, make sure that Pieces OS is running before VS Code launches. The extension code for determining that it's running in a dev container actually makes a request to Pieces via the host.docker.internal DNS name provided by docker, so it's currently assuming that it's not in a container if the request fails (which it will also fail if Pieces OS is not running). I'm still willing to hop on a call about this, although it seems we have narrowed the issue down. I have an idea on how to improve this, so there will be no requirement to have Pieces OS running prior to launching VS Code in order for this to work. |
Before I release this however, I recommend using that custom URL setting as a sort of override until I can get this process streamlined in the next release. |
Let's put the meeting on hold. I also think this issue is significantly less important now. I will be looking forward for the next release. One thing to keep in mind: in VSCode, there is a global setting
Maybe another (or complementary) approach would be to allow users specify multiple URLs in |
@Muzosh This is an interesting approach, we could definitely do something like this! When you open VS Code settings, is there a tab for you to select 'dev container' settings? Would that also help you in setting the custom URL for only while you are in a dev container? ![]() |
Hi, this limitation also affects any remote development environment. For example, Gitpod. So, I think there needs to be a robust implementation in this case, as part of the VSCode instance is thus running on a distant remote server, files are not local, and the extension needs to be able to talk to the VSCode frontend on the user's computer. |
Hello @eliezedeck . This is a great point, and in the future we should definitely do more to support things like this in a more user friendly way, however we currently don't have a way to get a cloud based IP address of Pieces OS from the user, without the user taking some action to 1: port forward their Pieces OS instance to the cloud and 2: give the VS Code extension that IP address that Pieces OS is port forwarded to. I go into this in detail on this documentation page: https://docs.pieces.app/product-highlights-and-benefits/connecting-to-a-remote-pieces-os-instance |
Hey @caleb-at-pieces, well I didn't know about this. So, I think one improvement I could propose, is to put this guide in the page where the error is appearing: both on the notification and the Pieces page. Personnaly, I thought there should have been a portforwarding that I should have done, but I didn't bother because I doubted it might not be fully supported. So, having that in the notification and the Pieces section will be a good indication to the right direction. Thanks a lot! |
I added a different notification on startup when a remote environment is detected that should ink to the documentation. The VS Code extension should work without any finicking with dev containers. Thanks for the discussion on this! |
Software
Pieces OS, VS Code
Operating System / Platform
macOS
Your Pieces OS Version
9.0.7
Early Access Program
Kindly describe the bug and include as much detail as possible on what you were doing so we can reproduce the bug.
Issue description
Hi,
Pieces OS is working fine in VSCode (extension version:
v1.16.2
), until I load into a dev container.VSCode gives me these notifications:
![image](https://private-user-images.githubusercontent.com/30979983/342752070-48d644e3-c170-4caf-8258-d96f2323c2cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTA1MDUsIm5iZiI6MTczOTM1MDIwNSwicGF0aCI6Ii8zMDk3OTk4My8zNDI3NTIwNzAtNDhkNjQ0ZTMtYzE3MC00Y2FmLTgyNTgtZDk2ZjIzMjNjMmNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA4NTAwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThmMDkyZjZmMjM0YzJjZDAyNmIzNWMwNmU5Yjk3NmIyZWU0MjU5YmYyY2I4ODI3NWQzOTk0MDhkMGM1YjA2YmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wCrXtwHvEeXjcNS2M4R5TtENshVU4-GlDuj22KvX25Y)
![image](https://private-user-images.githubusercontent.com/30979983/342752224-a393edaf-8405-4581-9807-3ae093d078e3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTA1MDUsIm5iZiI6MTczOTM1MDIwNSwicGF0aCI6Ii8zMDk3OTk4My8zNDI3NTIyMjQtYTM5M2VkYWYtODQwNS00NTgxLTk4MDctM2FlMDkzZDA3OGUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA4NTAwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMwYjRkZmNiN2YyNmY2MmM0YTdlYWYwYjczYWNkYmVkMWEwOTk0YzY1YWViYjkzNzZmMDEyNTMzODc3ODRiNDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wqBvJIeMjXF06Kv3nPzfMSaBBpDeCOd7oq8PEdpVGtI)
Pieces explorer looks like this:
![image](https://private-user-images.githubusercontent.com/30979983/342752328-386b3e62-4f29-48d3-86b5-3fc09664fc84.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTA1MDUsIm5iZiI6MTczOTM1MDIwNSwicGF0aCI6Ii8zMDk3OTk4My8zNDI3NTIzMjgtMzg2YjNlNjItNGYyOS00OGQzLTg2YjUtM2ZjMDk2NjRmYzg0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA4NTAwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM0NzUxMTU2MDM0M2I1YTkwMGM3MWE3YWY0OWNjMmEwZjI3OTY2MzQ0NjI0MWY2OTZiNzhiNjY2MzBjMzVkMDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.LaIeU9ywujdrcYBKrREmhzInLgI0xJGTwIT4hF9Unz8)
Attempted fixes
I tried to turn off / disable macOS native firewall as well as Lulu completely, but the issue still persists. Not sure how to make inbound firewall rule for port 1000 on macOS, where you need to specify an exact application associated with firewall rules.
One strange behavior
Now, one thing is strange - if PiecesOS is turned off before opening VSCode and I open a VSCode in dev container straight away, PiecesOS automatically starts and shows me the welcome window:
![image](https://private-user-images.githubusercontent.com/30979983/342752744-07cd8e60-1b29-4757-8204-c82d87cd39ce.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTA1MDUsIm5iZiI6MTczOTM1MDIwNSwicGF0aCI6Ii8zMDk3OTk4My8zNDI3NTI3NDQtMDdjZDhlNjAtMWIyOS00NzU3LTgyMDQtYzgyZDg3Y2QzOWNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA4NTAwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQzMWZlYTVlZWQ3YTM0MjE0NjJhZDIyMmY2ODljMjM2MzFhYTNhMjMxMGRmYTU1OWE0M2I0ZmUzNWMxMmY3MDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.33L8nzI_avNnra7LG0PZ2ToGY374F8XEABsNnCyQpxQ)
Does it mean, that the VSCode extension inside dev container (i.e. docker container) can communicate with host and startup the application? If so, why does it fail to communicate further?
The text was updated successfully, but these errors were encountered: