Question on 2.0.0 IDE

Hi,

When I start the app, I get the following error:

Failed to install library: AceButton:1.9.2.
Error: 2 UNKNOWN: destination dir c:\SharedFiles\Arduino\My Projects\libraries\AceButton already exists, cannot install

If the library already exists, why it's trying to install it again?
TIA

Hi @ebolisa1. Thanks for your report.

Does it really happen always when you start the app, or is it actually only after you update the libraries?

The two are related because the IDE shows a notification of available library updates on startup:

image

But it is important for us to understand the exact conditions this error occurs under.

Did you click the "INSTALL ALL" or "INSTALL MANUALLY" button before getting the error?

Hi,

I solved that problem by removing the AceButton folder from the libraries folder and restarting the app.

However, every time I start the app (win 11) it seems the software is reinstalling all the files shown in the preferences's URLs manager, mainly: Package_esp32_index.json.

Also, I get the "Updates are available..." message always for the same libraries and when I choose "Install all" I get this:

Failed to update TFT_eSPI. Error: Request install failed with message: 13 INTERNAL: Library install failed: moving extracted archive to destination dir: rename C:\SharedFiles\Arduino\My Projects\libraries\package-2260268436\TFT_eSPI-2.4.72 c:\SharedFiles\Arduino\My Projects\libraries\TFT_eSPI: Access is denied

and this:

Downloading TFT_eSPI@2.4.72
Installing TFT_eSPI@2.4.72
Failed to install library: TFT_eSPI:2.4.72.
Error: 13 INTERNAL: Library install failed: moving extracted archive to destination dir: rename C:\SharedFiles\Arduino\My Projects\libraries\package-2260268436\TFT_eSPI-2.4.72 c:\SharedFiles\Arduino\My Projects\libraries\TFT_eSPI: Access is denied.
Already installed TM1637TinyDisplay@1.7.0
Already installed FauxmoESP@3.4.0
Already installed Adafruit BusIO@1.13.2
Already installed TJpg_Decoder@1.0.5
Already installed ESP Mail Client@2.5.2

Hope this helps.
Thank you.

PS
I also tried to run the app as admin.

That is correct. These index files must be downloaded periodically so that the IDE can check for new versions of the boards platforms and libraries you have installed. However, the behavior can be refined by finding the right balance between downloading the files more often than necessary vs being slow to notify users of the availability of important updates.

Work is in progress now to reduce the frequency of these downloads:

If you would like to give it a try, tester builds are available. Details on that are available here:

https://github.com/arduino/arduino-ide/blob/main/docs/contributor-guide/beta-testing.md#readme

This type of "Access is denied" error is most often caused by an "on access"/"real time" scan by your antivirus software interfering with the installation process. You can do a quick test to see if that is the case by :warning: TEMPORARILY :warning: disabling your antivirus for a single update attempt to see if the problem goes away, then turn the antivirus back on.

If the problem doesn't occur with the antivirus off you will need to adjust the settings of your antivirus to put the appropriate file, folder, or process on the "allow list" so it doesn't interfere with updates.

:warning: Please be cautious about working without an antivirus. This is only about temporarily disabling it for a quick test. If you don't feel comfortable doing that, fine. You can try going straight to configuring the antivirus to not interfere with the Arduino software.


The problem is being tracked by the Arduino IDE developers here:

(that report happened to be about the a boards platform installation failing with this error, but the the subject matter is similar regardless of whether it is a library or a platform being installed/updated)

Ok, I disabled my McAfee and ran the IDE but got the same "Access is denied" msg.
Ran the IDE as admin and I got a different error:

Already installed Adafruit BME280 Library@2.2.2
Already installed FauxmoESP@3.4.0
Already installed TJpg_Decoder@1.0.5
Already installed TM1637TinyDisplay@1.7.0
Already installed WebSockets@2.3.6
Already installed Adafruit BusIO@1.13.2
Failed to install library: TFT_eSPI:2.4.72.
Error: 9 FAILED_PRECONDITION: Library 'TFT_eSPI@2.4.72' not found

In my libraries folder I don't have "TFT_eSPI...".

Is there something special about this c:\SharedFiles folder. For example, is it a network share folder or on a cloud storage service?

It's a folder on my laptop's SSD where all my projects and data is stored. The whole folder is then copied to a Diskstation server using Synology Drive Client app. So, the folder is local.

Please try this quick experiment:

  1. Copy the folder at this path:
    c:\SharedFiles\Arduino
    
    to here:
    c:\test\Arduino
    
  2. Select File > Preferences from the Arduino IDE menus.
  3. Change the path in the "Sketchbook location" field to:
    c:\test\Arduino
    
  4. Click the "OK" button.
  5. Select File > Quit from the Arduino IDE menus.
  6. Start the Arduino IDE.
  7. Wait until you see the "Updates are available for some of your libraries" notification.
  8. Click the "INSTALL ALL" button.

Does the error still occur?

Done.
On step 7 the msg "Updates are available for some of your libraries" didn't come up. Even closing/opening the IDE few times.
So, I removed the libraries folder and restarted the IDE, curiously enough, the above msg didn't come up either.
Restored the original path in preferences and the msg still didn't came back. :hushed:
I guess some hung up during the installation process and fixed itself? Who knows...

I'm glad it is working now. Even if it is not so satisfying as finding the real cause of the problem, I guess we can be happy the problem has gone away.

Please let us know if you experience any more problems.

Regards,
Per

Will do. Thank you!!

Your topic has been moved to the more suitable IDE 2.0 section of the forum.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.