arduino1.8.4 Board Manager is hanging with "Downloading Platforms Index..."

Last Edit: Jul 20, 2017, 09:45 am by stychokiller (originally posted for arduino-1.8.3!)

Title describes my problem succinctly. Is this a Java issue? [edit]: The Library Manager is also hanging with "Downloading Libraries Index..."

WHERE in the IDE does one specify the IP addresses that the IDE should use for looking up these indices? (I'm betting that these URLs are embedded in your .jar files)

Java is generating a plethora of errors when arduino gets run:

Picked up JAVA_TOOL_OPTIONS: Index error: could not find referenced tool name=dfu-util version=0.9.0-arduino1 packager=arduino Index error: could not find referenced tool name=avr-gcc version=4.8.1-arduino5 packager=arduino Index error: could not find referenced tool name=avrdude version=6.0.1-arduino5 packager=arduino Index error: could not find referenced tool name=avr-gcc version=4.8.1-arduino5 packager=arduino Index error: could not find referenced tool name=avrdude version=6.0.1-arduino5 packager=arduino Index error: could not find referenced tool name=arm-none-eabi-gcc version=4.8.3-2014q1 packager=arduino Index error: could not find referenced tool name=bossac version=1.5-arduino packager=arduino Index error: could not find referenced tool name=openocd version=0.9.0-arduino packager=arduino Index error: could not find referenced tool name=CMSIS version=4.0.0-atmel packager=arduino etc. I went to the trouble of installing dfu-util, avrdude, avr-gcc, bossac, openocd, etc. On my PC, but it's apparent that Java does not know where they are. :confused: Of course, these errors are being generated when Java parses package_index.json in the .arduino15 directory. I really think that someone on this forum should know what java security exceptions have to be added via jcontrol in order for the Arduino IDE program to access the internet (LOOK, youse guys are the fools that thought using java was a pretty neat idea, so SUPPLY SOME INFORMATION!) >:(

stychokiller: WHERE in the IDE does one specify the IP addresses that the IDE should use for looking up these indices? (I'm betting that these URLs are embedded in your .jar files)

Looks like here: https://github.com/arduino/Arduino/blob/1.8.4/arduino-core/src/cc/arduino/Constants.java#L77 and here: https://github.com/arduino/Arduino/blob/1.8.4/arduino-core/src/cc/arduino/Constants.java#L90-L91

stychokiller: I went to the trouble of installing dfu-util, avrdude, avr-gcc, bossac, openocd, etc. On my PC, but it's apparent that Java does not know where they are.

Those tools are supposed to be automatically installed along with the hardware packages that reference them. avrdude and avr-gcc are installed along with the version of Arduino AVR Boards bundled with Arduino IDE and those versions should be all that's required unless you install a hardware package that specifies a different version.

I'll add those links to the preferences.txt file and see what happens. Unfortunately, I've fallen into an Alice-sized rabbit hole wrt the additional software necessary for the Arduino Due, which is WHY I need to get the IDE to do it for me. There are header files #including header files #including... (Many levels deep), so doing it by hand is like pushing string. Using Wine in Linux Mint (or on a Windows-7 PC), I can see the Arduino IDE working properly, but the file structure must be totally different than what Linux Mint expects to find! >:(

Grr! Those links did not fix the problem! Here is what java (and glib) say when the
Boards Manager is invoked:

Picked up JAVA_TOOL_OPTIONS:

(java:6426): GLib-GObject-WARNING **: cannot register existing type ‘GDesktopAppInfoLookup’

(java:6426): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion ‘G_TYPE_IS_INTERFACE (interface_type)’ failed

(java:6426): GLib-CRITICAL **: g_once_init_leave: assertion ‘result != 0’ failed

(java:6426): GLib-GObject-WARNING **: cannot register existing type ‘GFileMonitor’

(java:6426): GLib-GObject-WARNING **: cannot add private field to invalid (non-instantiatable) type ‘’

(java:6426): GLib-CRITICAL **: g_once_init_leave: assertion ‘result != 0’ failed

(java:6426): GLib-GObject-CRITICAL **: g_type_register_static: assertion ‘parent_type > 0’ failed

(java:6426): GLib-CRITICAL **: g_once_init_leave: assertion ‘result != 0’ failed

stychokiller: I'll add those links to the preferences.txt file and see what happens.

Probably won't help at all.

stychokiller: so doing it by hand is like pushing string. Using Wine in Linux Mint (or on a Windows-7 PC), I can see the Arduino IDE working properly, but the file structure must be totally different than what Linux Mint expects to find! >:(

I suspect you're going to end up digging yourself in deeper by whatever you're "doing by hand". It is possible to manually install the hardware package and tools, reproducing what Boards Manager does, but you have to create a very specific folder structure.

It's really not clear what you have going on. It sounds like maybe you have a partial installation of these hardware packages but the tools are missing. I'd suggest deleting your /home/{username}/.arduino15 (a.k.a. ~/.arduino15) (on Linux) or C:\Users{username}\AppData\Local\Arduino15 (on Windows) folder and starting over. If you've done anything weird in the hardware subfolder of your sketchbook folder then get rid of that too. Of course you may want to save that stuff just in case so you can just rename it instead of deleting to back it up.

Usually when the Arduino IDE can't download these .json files it's caused by network security settings. You should make sure that your firewall is not blocking the Arduino IDE from accessing the internet.

Beyond that, I really can't give you any more help unless you explain exactly what's going on.

If I knew exactly what is going on, I wouldn't be trying to find help in a forum! I have close to 40-years of programming experience, so I ain't no amateur when it comes to fixing computer problems.

I just did a fresh re-install of V1.8.4 after saving my .arduino15 directory. The IDE STILL hangs once the boards manager menu item gets selected. Examining the new .arduino15 directory shows that the IDE creates a file called "package_index.json.tmp", and the size of the file is ZERO! There is no valid "package_index.json" file present in the directory, even though the default Arduino package is listed in the boards manager Window as "installed."

What I'm trying to accomplish is being able to select Arduino Due (NATIVE PORT) or Arduino Due (Programmer Port) in the boards manager menu list, then program a simple "Blink" program into the arduino due. It's my understanding that the Arduino due requires the Bossa program to actually program the Arduino due (which is a separate problem right now). It's also my understanding that Java has a "high security" setting that means that all java code ain't gonna be able to contact just anywhere on the internet. There is a "trusted site" list that's shown in the jcontrol Windows.

BTW, should the URLs be prefixed with https or with http? (Both are present on the internet, according to firefoxV55+)