Hi,
I’m trying to add the ESP8266 Board to the Arduino IDE and I’m getting the following error.
I’ve installed the latest IDE software.
Any ideas?
Nadi
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$19(ContributionManagerUI.java:151)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Exception: Error downloading http://downloads.arduino.cc/packages/package_index.json
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:113)
at cc.arduino.contributions.packages.ContributionInstaller.download(ContributionInstaller.java:330)
at cc.arduino.contributions.packages.ContributionInstaller.downloadIndexAndSignature(ContributionInstaller.java:305)
at cc.arduino.contributions.packages.ContributionInstaller.updateIndex(ContributionInstaller.java:283)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$19(ContributionManagerUI.java:147)
… 1 more
Caused by: java.net.SocketException: Address family not supported by protocol family: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:83)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1169)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1148)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:933)
at cc.arduino.utils.network.FileDownloader.downloadFile(FileDownloader.java:170)
at cc.arduino.utils.network.FileDownloader.download(FileDownloader.java:128)
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:111)
… 5 more
Hi,
I tried but it didn’t solve.
The problem solved by running this command from command windows: setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
reference: http://stackoverflow.com/questions/16373906/address-family-not-supported-by-protocol-family-socketexception-on-a-specific
Thank for your support.
Nadi
Hi Nadi,
I’ve never seen that error before and this is not very common. I’ve found this thread: https://github.com/arduino/Arduino/issues/4623
They recommend deleting the file package_index.json that is stored in ~/dist/package_index.json and restarting the IDE?
Then try to install the ESP8266 board in the Arduino IDE. Can you make sure that you copy the exact board URL?
http://arduino.esp8266.com/stable/package_esp8266com_index.json
I hope this helps!
Thank you for your patience,
Rui