platformio-core icon indicating copy to clipboard operation
platformio-core copied to clipboard

PlatformIO Home does not work over SSH tunnel

Open ivankravets opened this issue 4 years ago • 14 comments

VSCode Remote development / LInux SSH.

ivankravets avatar Sep 22 '20 18:09 ivankravets

Is known what parts exactly are the culprit?

septatrix avatar Mar 21 '21 22:03 septatrix

any update on this? would be great to code using PIO on a remote device using VS Code

btw, i just came across PIO and absolutely love it! great job!

sergerold avatar Apr 18 '21 20:04 sergerold

I have noticed that when PlatformIO creates folders on the remote, it uses the windows "\" as a directory separator rather than the Unix "/". So, for me it I already have a path /home/username/Documents/PlatformIO/Projects with several projects below it from developing locally on that remote. However, when using ssh-remote from my Windows laptop and I try to create a new project, it escapes the backslash and creates the path /home/lnelson/Documents/PlatformIO/Projects\\NewProject. This is a directory called Projects\\NewProject, parallel to Projects, not a directory NewProject under Projects. This probably also explains why I can navigate withing VSCodes remote file explore but can't traverse directories when looking for files in PlatformIO's "Add Existing" and similar commands.

path1

When prompted by VSCode's ssh-remote for the system type, I do specify "Linux", so somewhere in the depth's of ssh-remote, it knows I connected to a unix system.

nelsonov avatar Nov 06 '21 22:11 nelsonov

Also, when I fix the path on the remote system so that I have ...Projects/NewProject instead of ...Projects\\NewProject, I'm still unable to open it. When I go to "Open Existing" to open the path to NewProject, it opens the directory but the path shown in the top of the window is Projects / NewProject (with the spaces) and it's unable to find platformio.ini even thought it's right there in front of my eyes.

path2 path3 path4

nelsonov avatar Nov 06 '21 22:11 nelsonov

When I run the Linux-native version of VSCode inside WSL on the same machine, then everything works correctly. It looks to me like the Windows version of PlatformIO is having trouble composing unix-style paths when using remote-ssh.

nelsonov avatar Nov 07 '21 02:11 nelsonov

I have the same problem using VSCode on Windows 10 an connection using Remote-SSH to my Linux (Ubuntu 20.04) system, to which the board is attached. It would be great if you managed to get this working.

plinnie avatar Mar 17 '22 12:03 plinnie

Hi, Do you have some new info about it or a workaround?

BR, NiSche

nische avatar Jun 28 '22 21:06 nische

I see the same with VSCode on Windows, connecting to a WSL2 Ubuntu 22.04.1 At a glance this seems related to #3963 in where the webinterface run on a linux machine, but accessed from a windows machine detects the operating system of the web browser and not where the application is actually running.

elestedt avatar Sep 26 '22 18:09 elestedt

has anyone come up with a solution or a workaround?

delhub avatar Oct 15 '22 14:10 delhub

has anyone come up with a solution or a workaround?

I have a sample PR to fix this, which has the frontend determine the path style to use based on the PIO backend, rather than the OS the browser is running in.

I've not contributed here, I'm not sure if/when we could expect to see a maintainer assist with it.

https://github.com/platformio/platformio-home/pull/5018

cbundy avatar Oct 23 '22 05:10 cbundy

Has there been any update on this?

Possibly adding a setting to the extension that'll force unix style directories?

CDejoEcobee avatar Mar 14 '24 21:03 CDejoEcobee

I made a PR but I've closed it as the owners want to fix this in an upcoming major release

cbundy avatar Mar 15 '24 06:03 cbundy

I made a PR but I've closed it as the owners want to fix this in an upcoming major release

could you share the change so i can fix temporarily?

skullcrushercmd avatar Apr 07 '24 00:04 skullcrushercmd