Not planned
Description
Describe the problem
Arduino IDE is storing hardware packages in the folder C:\Users\<username>\AppData\Local\Arduino15\packages\arduino\hardware
. If this folder or any of its parents is a symlink (or junction in Windows terminology), then Boards Manager fails to install and load existing board packages.
And Arduino IDE log contains the following entry during startup:
ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Error loading hardware platform: following symlink c:\Users\<username>\AppData\Local\Arduino15\packages: EvalSymlinks: too many links
To reproduce
- Run cmd.exe with administrator privileges
- Create a junction for packages folder:
mklink /J "C:\hardware" "%USERPROFILE%\AppData\Local\Arduino15\packages\arduino\hardware"
- Run Arduino IDE and install any board package using Board Manager
- Ensure the installed package wasn't installed and not available
Expected behavior
- A new board package is installed and available
- Failed board packages installation should fail explicitly and show an error to the user
- IDE allows to use a custom directory for storing its settings for cases when a user profile is stored in junction folder and cannot be used for storing board packages
Arduino IDE version
2.3.4
Operating system
Windows
Operating system version
Windows 11
Additional context
No response
Issue checklist
- I searched for previous reports inI verified the problem still occurs when using the latestMy report contains all necessary details
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
per1234 commentedon Apr 12, 2025
Hi @a-nanasov.
I just gave it a try with a valid file junction configuration and it worked fine for me.
Here we see the real cause of your problem. This error occurs when you have created a loop, where the link contains a link to itself. It is not possible for Arduino IDE to work with a filesystem that produces this condition.
You need to carefully check through the folder to find and remove the link that is causing the loop. Or if the folder doesn't contain any unique data (i.e., modifications you made to the platforms), then simply delete it and then use the Arduino IDE Boards Manager to reinstall the platforms. That should fix the problem. After that, make sure to be careful when you are creating file junctions so that you don't create loops.
Your command doesn't make sense. The syntax of the command is:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/mklink
So you are creating a link at
C:\hardware
that targets%USERPROFILE%\AppData\Local\Arduino15\packages\arduino\hardware
. If you wanted to create a link from the folder used by Arduino to some arbitrary folder at another path, you would need to reverse the order of the arguments:I guess your link loop was caused by an error in your
mklink
commands.I agree that Arduino IDE should do a better job of communicating about this type of problem to the user. However, this is a very rare and self-inflicted problem, so it is not something we have the resources to address directly. We may address it as a matter of course through a general campaign of properly handling this class of failure. However, We are tracking the work that is required to be able to do that at arduino/arduino-cli#1762.
We don't have this for Arduino IDE's settings, but it is possible to configure the location of the "data folder", which is at
%USERPROFILE%\AppData\Local\Arduino15
by default:All Arduino IDE windows will close.
<custom data folder path>
placeholder with the path of the folder you want Arduino IDE to use instead of%USERPROFILE%\AppData\Local\Arduino15