Puzzling error message when manually updating libraries

On accepting the IDE notification to manually update some libraries I get this sort of error for several.

Failed to install library: 'DHTlib:0.1.37'. 13 INTERNAL: Library install failed: could not remove old library: removing library directory: remove C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\libraries\DHTLib\examples: The process cannot access the file because it is being used by another process.

I'm not using any of them at the time of the attempt. So why the message? Never seen similar in 1.8.19.

maybe this helps

Thanks. I have occasionally resorted to Process Explorer. Presumably the Resource Monitor you’ve suggested is an alternative? But it’s rather tedious, and another is the quick but brutal step of closing explore.exe from Task Mgr, attempting the original task again, then restarting.

BTW, that first link within the stackoverflow thread

stackoverflow.com/a/24126882/470749

gives a Page Not Found msg. I did find Resource Monitor elsewhere but it’s even more complicated than Process Explorer. As was Handler from SysInternals.


I tried 1.8.19 and nothing appeared as Updatable. Installed showed I have your DHTlib 0.1.3.7.

mmm should be 3 fields not 4
maybe I added an incorrect version number in the last update.

I will check’

from

library.properties

name=DHTlib
version=0.1.37
...

Library.json

{
  "name": "DHTlib",
....
  "version": "0.1.37",
...
}

So the version number is correct in the archive

Yes, my typo, sorry.

I had a hypothesis that this might have been caused by you having one of the examples open in Arduino IDE. This won't be a problem if the example is opened via the File > Examples menu (or the equivalent menu in Library Manager), due to the fact that Arduino IDE creates a copy of the example as a new sketch when you do that. However, it can be a problem if you opened the example sketch directly using the File > Open... dialog, as in this case the actual file is open in Arduino IDE.

However, I found that a different error was produced under these conditions:

Error: 13 INTERNAL: Library install failed: moving extracted archive to destination dir: removing library directory: remove C:\Users\per\Documents\Arduino\libraries\DHTlib\examples\dht_test1: The process cannot access the file because it is being used by another process.

Note that in your error message, specified path is only of the examples folder. Conversely, my error message specifies the path of the "dht_test1" example I had open in Arduino IDE at the time.

So I think the interference with the removal of the library folder on your system was caused by some external lock on the examples folder, rather than by the Arduino IDE application itself.

There is an archive of the page here:

https://web.archive.org/web/20161129074058/http://stackoverflow.com/questions/3565218/how-to-know-what-process-is-using-a-given-file#24126882

Thanks.

There were various consequences from that failure, such as eventually discovering several libraries had been emptied of all content.

Until I’m confident the problem won’t arise again I now switch to 1.8.19 whenever I get notification of available updates.

Can this be caused by Dropbox? I don't know anything about Dropbox but the "access denied" might be caused by Dropbox using the file while syncing with the Dropbox servers.

Although Dropbox insist it’s not, I think it could indeed be a possibility. However, as mentioned, I’ve not had a similar problem with 1.8.19.

Also, the files are all local on my Win 10 PC, and I don’t see how the syncing with those in the cloud could cause such an issue.

Is your "Sketchbook location" preference also set to C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\ in the Arduino IDE 1.8.19 preferences? Or is that version of Arduino IDE using a different sketchbook location?

Both identical.

I’ve been getting regular reminders from 2.3.6 like that on the right of my screenshot. I’ve ignored them as explained earlier. Should they not also appear automatically when I then open IDE 1.8.19? Or after working in it for a few minutes?

Check your settings in 1.8.19.

Thanks :slightly_smiling_face:

I always found the appearance of the update notifications in Arduino IDE 1.x to be quite sporadic. I'm not sure what the exact conditions under which they appeared was.

If I remember correctly, it shows notification for updatable boards platforms, but not for updatable libraries.

I had fairly frequent 1.8.19 library update notifications. I think I had some board notifications too, but if so they were (unsurprisingly) rare.

After the post from @sterretje I’ve only just now gone back into 1.8.19 to look at Preferences. I already had ‘Check for updates on startup’ enabled. And I’ve already dealt with the 2.3.6 updates so we’ll have to wait to pursue the puzzle of why 1.8.19 did not echo those notifications.

IDE 1.8.19 and IDE 2.x share the same sketchbook directory and the same boards (Arduino15) directory. So if you did update while using one of the IDEs you will not see update suggested in the other IDE.

Yes, that’s why I said we must wait for another opportunity.

You can create the opportunity. Just install an older version of a library or platform. Then the only wait required is for whatever it is that causes Arduino IDE 1.x to make an update check.