Error 13: Library install failed at mkdir

Hi,

I recently upgraded to the new IDE 2 and the installation went pretty smooth.
I did install it for all users.
Now I would like to update (or install) some libraries (either "Install all" or without dependencies) but it always fails with the following error:

Error: 13 INTERNAL: Library install failed: creating temp dir for extraction: mkdir \\<networkpath>\Arduino\libraries\package-8833159: The system cannot find the file specified.

In my environment the standard document folder is moved to a network location but the user has rw permissions on this folder and subfolders.

Any clues what I'm missing here or what's wrong?

Thx.

No clues?

Hi @nightmare1942. I am aware that Arduino IDE does not support opening sketches from UNC paths (IDE not working with source in a UNC path). I am able to reproduce that bug. However, I can not reproduce the problem you experienced with installing a library when the sketchbook location is set to a UNC path. These different levels of support make sense when you consider that opening the sketch is handled within the Arduino IDE codebase (actually by the Eclipse Theia IDE framework it is built on), while library installation is handled by a completely separate helper tool named Arduino CLI.

So I'm wondering what is different between our systems or procedures that causes the different results.

In the error message you shared:

did you replace the part where it says "<networkpath>" in order to avoid exposing private information, or is this the error message verbatim?

Can you provide some details about this network location?

Hi @ptillisch,

I replaced the <networkpath> for mitigation of private infos.
But maybe the issue occurs because of the following:

My network path looks like: \\<IP>\Documents$
As this is an SMB share the $ only hides it from being openly seen. And it's not the standard admin share.
Maybe the dollar sign ($) is making some troubles?

Edit:
I was wrong. The documents folder used an old path which was: \\<IP>\<disk_share>$\Documents
Even though it had the exact same permissions set it didn't work.
After changing the path to the one mentioned above it now works.

I would still like to understand what is the difference between these two methods for accessing as the permissions are identical?

Unfortunately I am not very knowledgeable about this subject. This is how I've been creating UNC paths in order to test Arduino IDE's support for them:

  1. Right click on a folder.
  2. Select "Properties" from the context menu.
  3. Select the "Sharing" tab.
  4. Click the "Share..." button.
  5. Click the "Share" button.
  6. Confirm the share in the Windows UAC prompt dialog.
  7. Click the "Done" button on the "Your folder is shared" dialog.
  8. Click the "Close" button on the "Properties" dialog.
  9. Start the Arduino IDE.
    This can be on the same machine as the shared folder; there is no need to share on one machine and open the sketch on another.
  10. Select File > Preferences from the Arduino IDE menus.
    This will open a "Preferences" dialog.
  11. Click the "Browse" button to the right of the "Sketchbook location" field in the dialog.
    This will open a "Select new sketchbook location" dialog.
  12. Select "Network" from the file tree in the navigation panel of the "Select new sketchbook location" dialog.
  13. Select the name of the machine that has the shared folder.
  14. Select the shared folder or a subfolder of the shared folder.
  15. Click the "Choose" button in the "Select new sketchbook location" dialog.
  16. Click the "OK" button in the "Preferences" dialog.
  17. Select any library in Library Manager.
  18. Click the "INSTALL" button.

No matter what I have tried, the library installation has always been successful when I did this.

I tried it with a folder that was shared only with the "Administrators" Windows group, but the attempt to update the sketchbook location failed when I did that ("Cannot read 1 resource(s): /UNCAdministrativeShare"), so I was not even able to get to step 16. I also tried just appending a $ character to the folder names in the share (e.g., \\HAL\UNCTarget$\\Documents\Arduino), but not restricting the share to administrators. The library installation was still successful when I did that.

As I mentioned before, I can reproduce the problem where opening a sketch that is located in any of these network shares does fail as described in this topic:

Well, I'm in a domain, so this might be different, too.
Additionally I'm using the advanced sharing feature and granular permissions so only users from a specific group could access it.

But as this one is solved I'm looking forward to the fix for the other bug :wink:
Thanks again.

I saw there is a similar bug report here: