Description
When File->Preferences->Sketchbook location is set to a directory which is monitored by dropbox client, installation/upgrade of libraries interfere with dropbox client and do not get renamed to the proper final name of the lib but remain as temporary folder arduino-\d+.
Upon upgrade, this leads to multiple libraries in different directories and the builder not being able to consistently select the most recent version (see also issue https://github.com/arduino/arduino-builder/issues/366).
This issue is discussed on the forum thread https://forum.arduino.cc/index.php?topic=724169.
I tested with ArduinoIDE 1.8.13 on Windows 10 and a recent hourly build 2021-01-24 ... both showing the same behavior.
Attached a trace with Sysinternals Process Manager: Logfile.zip
Filter settings: ProcessMonitorFilterSettings
I suppose the interesting two lines are the ones with Result equal to SHARING VIOLATION and INVALID DEVICE REQUEST.
I also tested the IDE with directories monitored with the latest versions of nextcloud client and megasync client. Both worked well during fresh installs and up-/downgrades of libraries.
On the other hand, arduino-cli worked well with all three sync clients.
Activity
matthijskooijman commentedon Jan 25, 2021
Haven't looked at the logs or the issue in detail, but I wonder if the problem is that dropbox locks files while it syncs them, preventing the IDE from renaming them? If so, I'm not sure if the IDE can actually do anything to fix this (except for retrying until it works, which doesn't seem right).
Does the IDE give any error messages when this happens?
anno73 commentedon Jan 25, 2021
Hmm, arduino-cli manages to update. So I assume that the ArduinoIDE could be able too.
No, there is no error message in the IDE. At least not in the "default settings". Maybe there is some debug option that could be tried?
matthijskooijman commentedon Jan 25, 2021
Maybe that uses a different method (i.e. without first downloading into new directory or something like that), but that -cli manages it is a sign that maybe the IDE could be changed to work as well indeed.
You could try running it on the commandline (you need
arduino-debug.exe
then) and see if that outputs anything else (though in practice, it should only show more startup messages, I think, but it would be worth trying). I wouldn't be surprised if the error is suppressed in the IDE code somewhere, though...anno73 commentedon Jan 26, 2021
I fear, I 'lied' to you ... I just found empty package-\d+ directories. And in addition I got error message from arduino-cli:
This didn't happen on the previous tests I did.
When I start arduino_debug.exe I get following output when installing a library:
and basically more of the same upon upgrade.