IDE not working with source in a UNC path
Hi @meins_da. Thanks for giving the Arduino IDE 2.0.0 release candidate a try, and for your report.
Please provide a detailed description of what you mean by "not working". If you are encountering any warnings or error messages, please provide the full and exact text of those messages.
Please provide a detailed description of what you mean by "source".
What is the path to? For example, is it a network drive?
Open a project you have saved on a network drive without a drive letter like "\server\Projects\myproject" my ide don't open the files.
Which operating system are you using on your PC @meins_da? (e.g., "Windows")
yes, Windows 10
I'm going to ask you to post some additional information that might be useful in the investigation.
Please do this:
- Start Windows "File Explorer".
- Open the Arduino IDE installation folder.
(usuallyC:\Program Files\Arduino IDE
orC:\Users\<user name>\AppData\Local\Programs\Arduino IDE
). - In the folder listing of the Arduino IDE installation folder, hold the Shift key while clicking the right hand button on the mouse.
- From the context menu, click "Open PowerShell window here".
PowerShell will now open with the current directory set to the Arduino IDE installation folder. - Type the following command:
& ".\Arduino IDE"
- Press the Enter key.
Debug output should now be printed to the PowerShell window as the Arduino IDE starts (or fails to start). - Wait for the Arduino IDE to finish starting
- Attempt to open a sketch from a UNC path.
- Switch back to the PowerShell window.
- Right click on the title bar of the PowerShell window.
This will open a context menu. - Select Edit > Select All from the context menu.
This will select all the text in the PowerShell window. - Press Ctrl+C.
This will copy the contents of the PowerShell window to the clipboard. - Open a forum reply here by clicking the Reply button.
- Click the
</>
icon on the post composer toolbar.
This will add the forum's code block markup (```
) to your reply to make sure the error messages are correctly formatted.
- Press Ctrl+V.
This will paste the output into the code block. - Move the cursor outside of the code block markup before you add any additional text to your reply.
- Click the Reply button to post the output.
Please let me know if you have any questions or problems while following those instructions.
Can i send you the file via pm? Its to big and also possible that personal details are postet
Sure. Just click the "Message" button on my forum profile:
I have the same problem (Win11, windows domain) if I do "file then open \server\workshop\arduino\sketch\sketch1.ino, then it opens a blank code. If I map a disk to the same path, then the file opens normally.
Hi all. I did an investigation into this last weekend and was able to reproduce it.
Unfortunately, I found that it is caused by a bug in one of the Arduino IDE's dependencies (I did not find out exactly which one, but it is part of the Eclipse Theia IDE framework the Arduino IDE is built on). This makes it a bit more challenging to fix than if it was a problem in the code Arduino maintains.
I'm going to try to follow up on this and I will report back here once I have any news about it.
Hi @ptillisch,
Maybe an interesting fact I've seen with the newest Arduino IDE version.
When trying to open a sketch of the sketchbook from UNC path via doubleclick it will open an empty one.
But after restarting the IDE it somehow opens the last opened sketch correctly.
So it seems it can somehow access it when open the whole IDE but not by clicking on the sketch.
I finally found the time to research the issue a bit more and submit a bug report:
I apologize for being so slow on this. I'm better about tracking defects in the Arduino IDE codebase, but things get pretty complex for me when it turns out the defect is instead in a dependency I'm not very familiar with (or maybe one the dependencies of the dependency, and so on).
That is definitely interesting!
Hi, I just wanted to chip in and say that this is a major issue, indeed a show-stopper, for me too.
I am using Arduino IDE on Windows 10 with everything fully up to date.
All my Arduino sketches are held on a network drive, served from another windows box, so that I can move between several different Windows machines and see the same libraries and sketches. I locate my Arduino folder on a shared drive and do not use the Sketches folder for my code, just for libraries. I keep all my sketches within folder trees specific to individual projects to to keep hardware, software and documentation all in one place.
I understand that this fault may well be in the application framework that you are using but I, and the other posters, are not doing anything exotic, this is how windows is supposed to be used.
I do hope that this issue will be be addressed soon. A lot of work has obviously gone into IDE 2 and I would like to be able to benefit from it.
Many thanks
Hi @dlplummer. I think you should be able to workaround the issue by mapping the share to a drive:
Once you have done that, open the sketch from the drive instead of from the network share. Arduino IDE can handle the standard path to the sketch under the mapped drive no problem.
Thanks for responding. Yes I can confirm it works that way.
It is far from ideal because I have loads of scripts using the UNC path, which I do not propose to change, so that leaves me with two routes to each sketch, one that works and one that does not. I have to keep an eye on whether there is a drive letter in the path.
I had a very quick look and could not see anything about this on the Eclipse bug list so I think it should be logged.
Thanks for working on the IDE, it is a great environment for developing Arduino projects.
Dave
Here it is:
There is also now an issue tracking it in the Arduino IDE issue tracker:
If you have a GitHub account, you can subscribe to those issues to get notifications of any new developments related to this subject.
That is great, thank you for the confirmation. The mapped drive solution is working for me.
You are welcome. I'm glad the workaround is working sufficiently for now.
Hopefully we will get full support for UNC paths soon. I have been impressed with how quickly the other bugs I reported to the Theia project were resolved so I'm optimistic. Also good news is that VS Code has no problem with UNC paths. Since Theia is somewhat based on VS Code, this indicates there is no insurmountable technical obstacle blocking such support.
Regards,
Per
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.