Library automatic renaming issue

Returning to a topic I've raised before. I had understood that the reason my \libraries folder accumulates unhelpful names like 'arduino_253888'
is to avoid ambiguity because the specified name is already used. But that seems incorrect.

I've just renamed a dozen to meaningful names and I'm sure the names in their .properties files were unique.

For example, before posting I installed this new library:

name=RTC3231
version=1.0.0
author=Fyrus
maintainer=Fyrus <mail@iamfyrus.com>
sentence=A modified RTClib library to handle DS3231 RTC only.
paragraph=Works with DS3231 on multiple architectures
category=Timing
url=https://github.com/fyrus7/RTC3231
architectures=*

It appeared in my folder as 'arduino_253888', which, like all the others, I've now renamed it to the name the author gave it, 'RTC3231'.

Unless I'm missing something here, this unwanted renaming seems to have become essentially automatic whenever a new library is installed?

it looks like your library folder is your build path, where compiler puts object files during the build

I have had that happen to me if I have more than one instance of the IDE open and install a library. It doesn't seem to like that so creates a unique name.

Do you mean multiple sketches (my usual scenario), or two versions like 1.8.19 and 2.0? Or something else? How would you load two instances of 1.8.19 for example?

Interesting suggestion. But how would that arise? More important, how to prevent it? What should be the 'build path', and where is it specified?

yes, more than one sketch open when installing a library

What is that folder? Full path please.
What is the sketchbook folder in file/preferences in the IDE?
Which version of the IDE do you use? If you use both 1.x and 2.x does the problem occur with both.
Which operating system are you using?

C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\libraries

C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES

1.8.19. (Rarely v2 and have not tested for this issue with it.)

Windows 10 Pro.

I'm not Windows user at the moment.
For testing

  1. Create a director called Arduino in your Documents directory (I think that would be C:\Users\terry\Documents (maybe C\Users\terry\MyDocuments) and in that directory create a subdirectory libraries.
  2. Open the IDE and change the sketchbook location to C:\Users\terry\Documents\Arduino.
  3. Install a library.
  4. The library should show in C:\Users\terry\Documents\Arduino\libraries with a normal name.

If that works we know that the culprit is Dropbox.

Note
Please make sure that you have a backup of C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES in case anything goes wrong.

The folder
C:\Users\terry\Documents\Arduino\libraries
already existed and contained 16 library subfolders (mostly Adafruit). A fraction of my full set.

I changed my Sketches folder location as you said to
C:\Users\terry\Documents\Arduino\libraries

I installed a library (while two sketches were open, just to test the unusual idea by @blh64).

Its name appeared correctly in
C:\Users\terry\Documents\Arduino\libraries\libraries\CheapLCD

(BTW, note the extra level of subordination; did you expect that?)

As the only significant difference in this scenario is Dropbox, it looks like your diagnosis was correct. Well done, thank you!

I'll now revert to my original SKETCHES location and live with the chore of name recovery. Dropbox is the essential parent for me, as I use both my iPhone and particularly my iPad for browsing sketches. At home and elsewhere. I don't have a laptop.

Does the earlier assurance that IDE v 2 is immune from this issue still stand? If so that might be a factor to motivate my switching.

But why does the 1.8.19 IDE do this anyway? What is the relevance of sketches being downstream of my PC's Dropbox folder?

No, I did as suggested by @sterretje: "change the sketchbook location to C:\Users\terry\Documents\Arduino"

That's why I posed the query.

No
You changed it to
C:\Users\terry\Documents\Arduino\libraries

as you said yourself in post 11

So even after receiving clear instructions, you still did not do as you were told.

Apologies to both of you, you’re right. Somehow my copy/paste added a redundant ‘libraries’ and I didn’t spot it then or after @Delta_G ‘s post!

I have doubts that that will solve the issue. But you can always install it; using the zip version will be the safest as you can easily delete it.

I do not know; I suspect that it's more a dropbox 'thing' but I do not have experience with dropbox. Any dropbox configuration that can cause this?

You can monitor your libraries directory while installing a library. Check what happens when the installation starts, monitor during the installation and after a sync. Somewhere in that process it should show the incorrect name.

I think the reason is the process of synchronizing the Dropbox folder with the cloud. While I was using Dropbox, I also sometimes encountered duplicate folders when syncing failed.

Perhaps a solution could be to use Dropbox only for the sketch directories, and keep the libraries in the Arduino system directory, without synchronizing them with a cloud.

Sorry for delay responding (have family across from Carlsbad).

I already had IDE 2.2 installed, with same SKETCHES folder as 1.8.19. So just snatched a few minutes on PC and looks encouraging. Used Manage Libraries to install an arbitrary new library (uRTCLib) and pleased to find it under that name in \libraries.

Will do more testing later, but this seems solution. IOW, until I start using v2 as my preferred choice, I'll just switch to it for new library installations.

Thanks, sounds plausible explanation. But see my reply a minute ago in post #18.

Dropbox causes at least one other bizarre issue here. I use Quicken 2000 for logging transactions, reconciling bank and Mastercard, etc. It has a backup feature that never works. Eventually discovered the fix: close Dropbox, do the backup, re-open Dropbox..

just don't bother.

Sometime it occurs on my W10 PC also. When there are to many of them, I just delete these folders and reinstall the library. Currently I don't have any arduino_xxxxxx folders in my libraries folder.

Yes.

I haven't looked in the Arduino IDE 1.x source code, but my hypothesis is the library update process works something like this:

  1. Library archive file is downloaded.
  2. Library archive file is extracted to a temporary folder with the arduino_nnnnnn format under the libraries folder.
  3. The installation of the previous version of the library of the library is removed.
  4. The temporary folder is renamed according to the library name.

So if something goes wrong at step (3), then it is not possible to perform step (4) (since a folder of that name already exists) and thus the folder of the installation for the updated library version retains the temporary folder name.

It might be that DropBox interferes with this process, or else simply slows it down more than Arduino IDE can deal with.

Thanks, reassuring, squares with my brief test yesterday.

Seems most likely, thanks.