arduino / arduino/Arduino

SSL Errors

Open
#10,685 10 comments 1 reaction 0 assignees View on GitHub
Component: IDE Type: Bug
Dominant language
Java
Stars
14.6k
Forks
7k
PR merge metrics
No merged PRs in 30d

Description

When I start the Arduino IDE I get the following errors:
```
Exception in thread "Thread-14" java.lang.ExceptionInInitializerError
at javax.crypto.Cipher.getInstance(Cipher.java:518)
at sun.security.ssl.JsseJce.getCipher(JsseJce.java:189)
at sun.security.ssl.SSLCipher.isTransformationAvailable(SSLCipher.java:483)
at sun.security.ssl.SSLCipher.(SSLCipher.java:472)
at sun.security.ssl.SSLCipher.(SSLCipher.java:81)
at sun.security.ssl.CipherSuite.(CipherSuite.java:67)
at sun.security.ssl.SSLContextImpl.getApplicableSupportedCipherSuites(SSLContextImpl.java:345)
at sun.security.ssl.SSLContextImpl.access$100(SSLContextImpl.java:46)
at sun.security.ssl.SSLContextImpl$AbstractTLSContext.(SSLContextImpl.java:577)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.security.Provider$Service.getImplClass(Provider.java:1701)
at java.security.Provider$Service.newInstance(Provider.java:1659)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
at javax.net.ssl.SSLContext.getDefault(SSLContext.java:96)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:122)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:332)
at javax.net.ssl.HttpsURLConnection.(HttpsURLConnection.java:289)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.(HttpsURLConnectionImpl.java:99)
at sun.net.www.protocol.https.Handler.openConnection(Handler.java:62)
at sun.net.www.protocol.https.Handler.openConnection(Handler.java:57)
at java.net.URL.openConnection(URL.java:1001)
at java.net.URL.openStream(URL.java:1067)
at processing.app.UpdateCheck.readInt(UpdateCheck.java:134)
at processing.app.UpdateCheck.run(UpdateCheck.java:90)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism
at javax.crypto.JceSecurity.(JceSecurity.java:93)
... 28 more
Caused by: java.lang.SecurityException: The jurisdiction policy files are not signed by the expected signer! (Policy files are specific per major JDK release.Ensure the correct version is installed.)
at javax.crypto.JarVerifier.verifyPolicySigned(JarVerifier.java:336)
at javax.crypto.JceSecurity.loadPolicies(JceSecurity.java:378)
at javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:323)
at javax.crypto.JceSecurity.access$000(JceSecurity.java:50)
at javax.crypto.JceSecurity$1.run(JceSecurity.java:85)
at java.security.AccessController.doPrivileged(Native Method)
at javax.crypto.JceSecurity.(JceSecurity.java:82)
... 28 more
Exception in thread "Timer-0" java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$DefaultSSLContext
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.security.Provider$Service.getImplClass(Provider.java:1701)
at java.security.Provider$Service.newInstance(Provider.java:1659)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
at javax.net.ssl.SSLContext.getDefault(SSLContext.java:96)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:122)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:332)
at javax.net.ssl.HttpsURLConnection.(HttpsURLConnection.java:289)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.(HttpsURLConnectionImpl.java:99)
at sun.net.www.protocol.https.Handler.openConnection(Handler.java:62)
at java.net.URL.openConnection(URL.java:1050)
at cc.arduino.utils.network.HttpConnectionManager.makeConnection(HttpConnectionManager.java:130)
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)
at cc.arduino.contributions.DownloadableContributionsDownloader.downloadIndexAndSignature(DownloadableContributionsDownloader.java:165)
at cc.arduino.contributions.packages.ContributionInstaller.updateIndex(ContributionInstaller.java:306)
at cc.arduino.contributions.ContributionsSelfCheck.updateContributionIndex(ContributionsSelfCheck.java:215)
at cc.arduino.contributions.ContributionsSelfCheck.run(ContributionsSelfCheck.java:75)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
```
Os: MacOS 10.13.6
`java -version` (installed via homebrew):
```
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
```

Contributor guide

Open the contributing guide

Research direction

Start with the stack-trace entry points in processing.app.UpdateCheck, cc.arduino.utils.network.HttpConnectionManager, and the contribution downloader classes. Reproduce the SSL failure on macOS 10.13.6 with the reported Java 11 setup, then determine the relevant runtime or update-check behavior. Done means the startup and contribution update paths no longer produce these errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.