Arduino 1.x.x. worked perfectly. Why does nothing work properly in 2.3.x?

I had the IDE working perfectly in versions 1.0.x right up the 1.8.19. The sketch folder was where I waned it (D:\Files\Arduino). The library folder was in the right place (D:\Files\Arduino\library). Libraries worked perfectly. Libraries that I had saved to my hard drive and then added using the Add zip option worked fine.

Then I installed version 2 and it's been an absolute nightmare. I’m currently on version 2.3.6. I’ve already wasted a day fighting the IDE and I’m still no closer to getting projects to compile that used to work under 1.8.19.

There's no option to change the location of the library folder from the default (C:\Users\Bob\AppData\Local\Arduino15\libraries). Supposedly it can be done by editing a config file but those are splattered across at least 4 different and obscure folders, with no information about how or which of the many config files need to be edited. Saved libraries that worked under version 1.x.x. now fail all attempts to add them in 2.3.6. The add library from zip function doesn't even remember the last folder it just looked at, instead returning to C:\Users[username]\ every time.

What gives? How do you get the IDE to actually do the job of being an IDE instead of fighting every attempt to get it to work?

It got IDE 2.x working in approximately 5 minutes :smiley: Most of the time was spent on downloading.
I admit that I only have one harddisk.

You can configure that in C:\Users\yourUsername\.arduinoIDE\arduino-cli.yaml

directories:
    builtin:
        libraries: C:\Users\bugge\AppData\Local\Arduino15\libraries
    data: c:\Users\bugge\AppData\Local\Arduino15
    downloads: C:\Users\bugge\AppData\Local\Arduino15\staging
    user: c:\Users\bugge\OneDrive\Documents\Arduino

If needed, more details at https://support.arduino.cc/hc/en-us/articles/4415103213714-Find-sketches-libraries-board-cores-and-other-files-on-your-computer#boards.

You'll have to give the details; e.g. the errors that you got.

True. You can see if an issue was already raised at https://github.com/arduino/arduino-ide/issues or raise a feature request.

Those are the "built-in" libraries, comprising only ten: Arduino_BuiltIn Ethernet Firmata Keyboard LiquidCrystal Mouse SD Servo Stepper TFT

Third-party libraries, usually under the direction of the Library Manager, do in fact use <sketchbook>/libraries (plural, again) by default.

Ok, that’s the first problem. Why are the config files, libraries and other stored there when I told the the program to install on D drive? I did find that config file, updated it and copied the libraries folder to D:\Files\Arduino\library. Since then I haven’t been able to add libraries using the add zip method.

Error messages. There is this one every time I open the IDE. If I say yes it then pops up the windows firewall. I allow access then get two UAC popups in a row wanting internet access. This is not a one off thing, it’s every time I open the IDE.
The "Arduino AVR Boards [v 1.8.6]" core has to be installed for the currently selected "Arduino Uno" board. Do you want to install it now?

Compiling I get

D:\Files\Arduino\AISlogger01\AISlogger01.ino:87:10: fatal error: Adafruit_Sensor.h: No such file or directory
#include <Adafruit_Sensor.h>
^~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: Adafruit_Sensor.h: No such file or directory

Adding the library from zip I get:

Error: 13 INTERNAL: Library install failed: moving extracted archive to destination dir: user directory not set

I have no idea. There is one difference between IDE2.x and IDE 1.x that might be relevant.

IDE 1.x comes with the AVR board package (for IDE 1.8.19 it is AVR 1.8.3); it will be in the installation directory.
IDE 2.x does not come with the AVR board package and the IDE wants to download and install it at first run (and needs internet access for that).

  1. I assume that you said yes.
  2. Please show the content of the arduino-cli.yaml with regards to the directories?
  3. Did you check if the AVR core is installed in the specified data directory after you confirmed the installation (and before you close the IDE again)? De full path (on my system) is C:\Users\bugge\AppData\Local\Arduino15\packages\arduino\hardware\avr with a subdirectory for the version.
  4. Did you check if the AVR core is still there after you closed the IDE?

The library is either not installed or incorrectly installed / corrupt :wink:

Please provide arduino-cli.yaml (or at least the relevant section) as in my previous reply.

If the only thing that you want to achieve is to have the sketchbook directory (with the libraries directory) somewhere on your D: drive the only thing you have to change is the user directory in arduino-cli.yaml.

And that setting is also available from File → Preferences.

I did not switch, I stayed with 1.1.18 and I keep the libraries in the sketch folder, that way when something changes the code stills compiles.

I did not know that that version did exist :smiley:

OOPS I read it wrong, it is 1.8.18.

That is a Windows issue not an IDE problem.

IDE 2.x does not come with the AVR board package and the IDE wants to download and install it at first run (and needs internet access for that).

That is a truly awful decision on the part of the developers. Many of operate in places that have no internet access whatsoever. Having a project stuck for months at a time because some developer decided not to bother including everything in the installer is a major issue. Looks like version 2 of the IDE can’t be trusted so I’ll be going back to 1.8.19.

Looks like it was caused by the IDE wanting to download extras after it was installed. That’s 100% on the IDE.

Even it that wasn’t the exact cause it’s still the IDE trying to connect, so still an issue caused by the IDE.

It just gets worse. The uninstaller leaves 1GB of files on the drive after it finishes. Who wrote this thing?!

That is not an issue, that is how it works.

The motivation was, as far as I know, that you will get the latest AVR platform installed.

So you actually want the IDE to come with every possible platform (ESP32, STM32, ...)? That has never been the case (IDE 1.x versions included). And there are workable workarounds as long as you have one system (with the same operating system) that has the IDE and can connect to the internet.

The AVR core version that comes with IDE 1.8.19 is AVR core 1.8.3. What would you do if you would have bought a Arduino Uno Mini Ltd? Not supported so you will have to upgrade to AVR core 1.8.5.
And users that started with the Make Your Uno Kit have to upgrade to AVR core 1.8.6.
It will be a lot easier if the latest (and always the latest) AVR core can be installed when the IDE is installed.

What about libraries? Do you want every single one of them to be included as well?

Clearly it is or I wouldn’t be here.

Well, apparently only to you. 2xx just does not work the same as 1xx
The software is FREE, if you don't like it then don't use it.