Failed_precondition?

I don't understand this message, why it started and how to fix it.


Looks like someone snuck in and stole my candy. :slight_smile:

  • Wes

EDIT: I found a fix by going to the library manager and installing Arduino_BuiltIn 1.0.0, clicking yes to install all dependencies. While it appeared to be already installed, the action of re-installion must have cured some aspect of "Alzduino disease".

Hi @weshowe. Thanks for your report.

I have also experienced this error. For me, it is correlated to the ridiculous number of boards platforms (>40) I have installed. When I reduce the number, the problem no longer occurs, but with the full collection it occurs 100% reliably.

My hypothesis is that there is a concurrency problem with the library installation process happening at the same time as the index download process. Both of these things are triggered on the IDE startup. I believe the reason it only occurs with the full collection of boards platforms is because this slows down the process of Arduino CLI initializing after updating the indexes. During that process, Arduino CLI loses its internal information about which libraries are installed, so if the library installation happens simultaneously, this cryptic error results.

It seems similar to this bug:

This type of environment-specific bug can be extremely difficult for the developers to investigate, prepare potential fixes for, and validate those fixes because most often they are not able to reproduce the bug since their environment does not provide the required conditions. Since nobody else had ever reported experiencing the bug, I decided it was not worth submitting a formal report and instead have been tracking it in my personal notes.

I would be interested to learn about your environment. Is this a clean system with no boards platforms previously installed (including by Arduino IDE 1.x)?

If we can determine the specific conditions required to reproduce the fault (hopefully not including spending hours installing tens of gigabytes of obscure boards platforms), this would be very valuable in resolving the issue.

I have 1.8.19 installed, but haven't run it lately... that was for an old project on a Teensy and that board got updated to work with 2.0.

But I do have many boards installed. AVR, MegaAVR, SAM, SAMD, STM32 and Teensy. I had been using the Teensy, closed IDE 2.0.1, went into town, came back (system stayed on) and when I fired back up that was what I found. However, lately there has been no variation in that routine, up early local time, take a break, back to the grindstone.

I posted my fix for this, maybe it will help someone else. If I encounter anything, I try to post it.

  • Wes
1 Like

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