I downloaded a fresh copy of the IDE 2.0.3 MacOS Intel version and on the first start when it tries to unpack/install some additional libraries it fails on the Format library with the following error:
Error: 2 UNKNOWN: Library Firmata@2.5.9 is already installed, but with a different Version: Firmata@2.5.8.
I checked the libraries folder from a previous IDE 1 and removed it. But that did also not help.
Hi @joerg-schmitz. The first time you run Arduino IDE 2.x, it installs the latest version of some fundamental libraries, which include the "Firmata" library. These are referred to as the "built-in" libraries.
When that feature was first implemented, the libraries were installed to the normal location in the libraries subfolder of the Arduino sketchbook folder. This caused problems for some users who already had a different version of one of those "built-in" libraries installed there because it caused the previous library installation to be updated and some users intentionally wanted the previous specific version to be installed:
In order to address that complaint, the feature was changed to never update previously installed libraries; only installing each "built-in" library if it was not already installed:
Since that time, the feature was changed again to install the "built-in" libraries to a special dedicated location separate from the libraries stored under the sketchbook folder. On macOS, that location is at this path:
~/Library/Arduino15/libraries/
So now that the libraries are in a dedicated location, that change of behavior to not overwrite previously installed versions is not really so important any more. But the installation of the "built-in" libraries is only ever expected to happen once, on the first run after a user makes a fresh installation of Arduino IDE 2.x, so we never worried either way because there would not be any libraries under that dedicated location to update anyway.
It seems you must have caused that "built-in" library installation to happen multiple times (which can happen if you delete the data files where Arduino IDE records whether it already had that first run). In this case, it is not clear what the ideal behavior should be. Should the existing "built-in" libraries be updated, or is it safer for the previous versions to be left alone? The purpose of the feature is to ensure the libraries will always be present when the user uses the IDE for the first time. They can always install the latest version of any of the "built-in" libraries via the Arduino IDE Library Manager as usual (this installs the library under the sketchbook as usual).
Regardless of whether the current behavior of not updating is optimum, it won't cause any problems so you can safely ignore this error message.
I am interested to hear opinions on whether Arduino IDE's current behavior is correct. The behavior could be changed very easily.