Error downloading package

I have IDE 1.8.13 (Windows Store 1.8.42.0) whatever that means
Windows 10 enterprise

Everything has been working fine for several months. I've added tons of libraries from various sources and now it seems any library I try and download doesn't work. I get error messages like this:

Error downloading https://dl.espressif.com/dl/package_esp32_index.json

My laptop is pretty locked down due to work but that's nothing new. No admin rights but can add them when needed at the point in time.

I've read numerous other posts similar to my situation. One suggestion was to remove all the files except preferences.txt within the folder. I exited the IDE, backed everything up and moved all the files. Didn't help.

Within the IDE, my Network settings are set to Auto-detect proxy. I can change it but wouldn't know what to change it to. One last thing that might be impact this, I think we added a proxy at work. Since it's new, it probably blocks all sorts of things that it shouldn't but I wouldn't even know what to ask to allow with this problem, if that is the problem.

I have something you can try. It seems like a long shot, but I have seen several reports of people having success with this, and it's easy enough, so worth a try:

Select File > Preferences from the Arduino IDE's menus.

In the "Additional Boards Manager URLs" field, change the URL from:

https://dl.espressif.com/dl/package_esp32_index.json

to

http://dl.espressif.com/dl/package_esp32_index.json

(using the http:// scheme instead of https://)

Click the "OK" button.

Select Tools > Board > Boards Manager from the Arduino IDE's menus.

Hopefully you will now find that the file was able to be downloaded.

Thanks for the suggestion. Unfortunately it did not resolve the issue. It does seem like it might be certificate related so using the non-ssl links is probably heading in the right direction.

I tried to go to Manage Libraries and I get this error. (note, the first few lines are the previous error from the Board manager)

Error downloading https://www.leonardomiliani.com/repository/package_leonardomiliani.com_index.json
Error downloading http://dl.espressif.com/dl/package_esp32_index.json
Error downloading https://mesom.de/atflash/package_atflash_index.json
Error downloading https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json
Error downloading https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
Error downloading https://downloads.arduino.cc/packages/package_index.json
Error downloading https://downloads.arduino.cc/libraries/library_index.json
java.lang.RuntimeException: java.lang.Exception: Error downloading https://downloads.arduino.cc/libraries/library_index.json
at cc.arduino.contributions.libraries.ui.LibraryManagerUI.lambda$onUpdatePressed$2(LibraryManagerUI.java:210)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.Exception: Error downloading https://downloads.arduino.cc/libraries/library_index.json
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:149)
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:130)
at cc.arduino.contributions.JsonDownloader.download(JsonDownloader.java:49)
at cc.arduino.contributions.GZippedJsonDownloader.download(GZippedJsonDownloader.java:66)
at cc.arduino.contributions.libraries.LibraryInstaller.updateIndex(LibraryInstaller.java:84)
at cc.arduino.contributions.libraries.ui.LibraryManagerUI.lambda$onUpdatePressed$2(LibraryManagerUI.java:203)
... 1 more
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:162)
at cc.arduino.utils.network.HttpConnectionManager.makeConnection(HttpConnectionManager.java:155)
at cc.arduino.utils.network.HttpConnectionManager.makeConnection(HttpConnectionManager.java:106)
at cc.arduino.utils.network.FileDownloaderCache.updateCacheInfo(FileDownloaderCache.java:184)
at cc.arduino.utils.network.FileDownloaderCache.getFileCached(FileDownloaderCache.java:153)
at cc.arduino.utils.network.FileDownloader.downloadFile(FileDownloader.java:167)
at cc.arduino.utils.network.FileDownloader.download(FileDownloader.java:129)
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:147)
... 6 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
at sun.security.validator.Validator.validate(Validator.java:262)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
... 23 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
... 29 more

I sort of figured out what's going on. The issue is in some way caused by work's proxy settings on my laptop. I can work around it but it would be better if I knew what the actual issue is. With that information, I could request an exception in the proxy.

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