Boards Manager - Error Downloading http://downloads.arduino.cc/packages/pack...

It looks like others have found this problem while attempting to add the DUE board to their IDE. The DUE board ins't supported by default, so when attempting to add the SAMD files (from a Mac):

Tools | Board* | Boards Manager

Results in an error in the popup which shows:

Error Downloading http://downloads.arduino.cc/packages/package_index.json

However, I can go to a browser and load that JSON text without issue. So it doesn't appear to be anything network related (same symptom also from 2 internet sources).

The console spits out some additional error diagnostics, for me:

Error downloading http://downloads.arduino.cc/packages/package_index.json java.lang.RuntimeException: java.lang.Exception: Error downloading http://downloads.arduino.cc/packages/package_index.json at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$0(ContributionManagerUI.java:151) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.Exception: Error downloading http://downloads.arduino.cc/packages/package_index.json at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:131) at cc.arduino.contributions.packages.ContributionInstaller.download(ContributionInstaller.java:334) at cc.arduino.contributions.packages.ContributionInstaller.downloadIndexAndSignature(ContributionInstaller.java:309) at cc.arduino.contributions.packages.ContributionInstaller.updateIndex(ContributionInstaller.java:287) at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$0(ContributionManagerUI.java:147) ... 1 more Caused by: java.io.IOException: Received invalid http status code from server: 416 at cc.arduino.utils.network.FileDownloader.downloadFile(FileDownloader.java:194) at cc.arduino.utils.network.FileDownloader.download(FileDownloader.java:128) at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:129) ... 5 more Error downloading http://downloads.arduino.cc/packages/package_index.json java.lang.RuntimeException: java.lang.Exception: Error downloading http://downloads.arduino.cc/packages/package_index.json at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$0(ContributionManagerUI.java:151) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.Exception: Error downloading http://downloads.arduino.cc/packages/package_index.json at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:131) at cc.arduino.contributions.packages.ContributionInstaller.download(ContributionInstaller.java:334) at cc.arduino.contributions.packages.ContributionInstaller.downloadIndexAndSignature(ContributionInstaller.java:309) at cc.arduino.contributions.packages.ContributionInstaller.updateIndex(ContributionInstaller.java:287) at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$0(ContributionManagerUI.java:147) ... 1 more Caused by: java.io.IOException: Received invalid http status code from server: 416 at cc.arduino.utils.network.FileDownloader.downloadFile(FileDownloader.java:194) at cc.arduino.utils.network.FileDownloader.download(FileDownloader.java:128) at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:129) ... 5 more Error downloading http://downloads.arduino.cc/packages/package_index.json java.lang.RuntimeException: java.lang.Exception: Error downloading http://downloads.arduino.cc/packages/package_index.json at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$0(ContributionManagerUI.java:151) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.Exception: Error downloading http://downloads.arduino.cc/packages/package_index.json at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:131) at cc.arduino.contributions.packages.ContributionInstaller.download(ContributionInstaller.java:334) at cc.arduino.contributions.packages.ContributionInstaller.downloadIndexAndSignature(ContributionInstaller.java:309) at cc.arduino.contributions.packages.ContributionInstaller.updateIndex(ContributionInstaller.java:287) at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$0(ContributionManagerUI.java:147) ... 1 more Caused by: java.io.IOException: Received invalid http status code from server: 416 at cc.arduino.utils.network.FileDownloader.downloadFile(FileDownloader.java:194) at cc.arduino.utils.network.FileDownloader.download(FileDownloader.java:128) at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:129) ... 5 more

Any ideas?

Maybe a solution in case a previous DUE compiler upload attempt failed, stepwise:

In Menu: File>Preferences, at the bottom of the Preferences window, click in the url: C:\Users...\AppData\Local\Arduino15\preferences.txt

Then select: packages/Arduino/hardware/sam

Delete the sam folder.

Close and reopen an IDE window, in Menu: Tools>Type of Board>Board Manager, select Arduino Sam Boards (Cortex M3), Install.

I think you're on the right track ard_newbie, except probably deleting the wrong thing.

I think this is the explanation of the problem: https://github.com/arduino/Arduino/issues/6628 It seems Arduino IDE 1.8.5 and older try to use a partially downloaded package_index.json file so if something get's corrupted with that file it causes this 416 error. The solution is to delete the file.

This issue has since been resolved, but after the Arduino IDE 1.8.5 release so likely it wouldn't happen when using the hourly build or future IDE releases.

This can also happen if there is an incomplete json file for the board manager in ArduinoData folder.

I deleted it and fixed the issue.

i too have found this problem

i have tried the java commandline code i can navigate to the url i have tried deleting the app data files i have tried installing as a portable installation there is no "relevantKnowledge" spyware installed i have tried navigating to the url copying the text and saving the file in the appropriate app data folder (even on the portable install) i still suspect its a java issue brought about by the I T gestapo anyone with more info? ideas? suggestions? monetary gifts?

What is the selected option you have in File/Preferences, Network folder ?

auto detect proxy settings

I have the same option selected.

Maybe an issue with the last Sam board compiler (32-bits ARM Cortex M3) version. If you delete the sam folder as explained in reply#1, and you select and install an old version (e.g. 1.6.6) and BTW check your USB cable (lots of issues with faulty cables), can you download aminimal sketch ?

um i havent got as far as hooking up a board yet just trying to get the library index and board index to show up then may be i can install the appropriate one(s)

bighole_mcginty, are you getting the "Received invalid http status code from server: 416" error?

i'm using version 1.8.7 if that is of any help no, no error like that. but as per other posts -"caused by java.net.sockettimeoutexcepton:connect timed out

at java. net.twostacksplainsocketimpl.socketconnect(nativemethod) blah blah blah

is there a way i can turn the automatic downloading of index's off and just install them manually from the url while the "the collective" (myself included) comes up with a solution?

bighole_mcginty:
no, no error like that.
but as per other posts -"caused by java.net.sockettimeoutexcepton:connect timed out

at java. net.twostacksplainsocketimpl.socketconnect(nativemethod) blah blah blah

Ah, so your problem is not really the same. Please post the complete output, using code tags (</> button on the toolbar).

bighole_mcginty:
is there a way i can turn the automatic downloading of index’s off

Well, you can turn of automated checks for new releases by unchecking File > Preferences > Check for updates on startup. That same preference controls checks for IDE updates, board updates, and library updates.

bighole_mcginty:
and just install them manually from the url

That is possible, but it’s fairly complex because there are multiple tools that need to be installed in a specific folder structure. Let’s have a look at the error and see if you can get it working properly before diving into a hacky workaround.

Resolved issue not being able to update/download package_index.json

blaaaaaa:~/Downloads/arduino-1.8.8-linux64/arduino-1.8.8$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

—>solution-----> Seems the settings: network proxy selector under ‘network’ ‘network proxy’ was selected to use ‘automatic’ with a proxy pac and this didn’t work. After switching to ‘off’ it worked fine and the index was downloaded without problems after restarting the arduino_ide app.

below was the error starting arduino_ide by cli:

blaaaaaa:~/Downloads/arduino-1.8.8-linux64/arduino-1.8.8$ ./arduino
Picked up JAVA_TOOL_OPTIONS:
Gtk-Message: 10:41:15.894: Failed to load module “canberra-gtk-module”
Error downloading https://downloads.arduino.cc/packages/package_index.json
java.lang.RuntimeException: java.lang.Exception: Error downloading https://downloads.arduino.cc/packages/package_index.json
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$1(ContributionManagerUI.java:150)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.Exception: Error downloading https://downloads.arduino.cc/packages/package_index.json
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:139)
at cc.arduino.contributions.packages.ContributionInstaller.download(ContributionInstaller.java:333)
at cc.arduino.contributions.packages.ContributionInstaller.downloadIndexAndSignature(ContributionInstaller.java:307)
at cc.arduino.contributions.packages.ContributionInstaller.updateIndex(ContributionInstaller.java:285)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$1(ContributionManagerUI.java:146)
… 1 more
Caused by: java.net.SocketTimeoutException
at java.net.SocksSocketImpl.remainingMillis(SocksSocketImpl.java:111)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1199)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:162)
at cc.arduino.utils.network.FileDownloader.downloadFile(FileDownloader.java:181)
at cc.arduino.utils.network.FileDownloader.download(FileDownloader.java:132)
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:137)
… 5 more

1 Like

Thanks for sharing your solution djieno! I'm sure other people having the same problem will be very grateful.

There is also the very real possibility that you need to configure the Arduino IDE to use your proxy (as I found to be the case for me).

Under the Arduino IDE preferences menu, on the Network tab, I needed to add the "Automatic proxy configuration URL" that I found in LAN settings on my computer, (if using chrome, you can drill down to this under settings, advanced settings, open proxy settings and click on the "LAN settings" button (for Crome Version 71.0.3578.98 (Official Build) (64-bit)).

Alternatively you can also go to control panel, Internet options, and the connections tab will have the LAN setting button (if using WIN8)).

Dear Parkolay,

Thanks a lot. After 3 evenings of searching, your suggestion is also the solution in my case. Indeed I needed to add the "Automatic proxy configuration URL"

hello,

i have tried with several ways. but it is not working.
is there any solution for this error

Error downloading https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

Switching to no proxy worked for me in Arduino 1.8.7 preferences.network. I am using win8.1 64bit Thanks for the info, Very good.

ISSUE : error downloading https //downloads.arduino.cc/packages/package_index.json

Delete tmp file at C:\Users\User1\AppData\Local\Arduino15\package_index.json.tmp

Then open Tools > Boards Manager, you can see downloading…