fabianonline / telegram_backup

Java app to download all your telegram data.
GNU General Public License v3.0
450 stars 91 forks source link

Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty #60

Closed jukey closed 6 years ago

jukey commented 7 years ago

Running telegram_backup using the JRE from OpenJDK 9, Ubuntu 17.10.

While downloading media telegram_backup always stops at the same point throwing these error message(s):

  javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at java.base/sun.security.ssl.Alerts.getSSLException(Alerts.java:214)
    at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1969)
    at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1921)
    at java.base/sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1904)
    at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1436)
    at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
    at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
    at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1563)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1491)
    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:236)
    at org.apache.commons.io.FileUtils.copyURLToFile(FileUtils.java:1489)
    at de.fabianonline.telegram_backup.DownloadManager.downloadExternalFile(DownloadManager.java:388)
    at de.fabianonline.telegram_backup.mediafilemanager.GeoFileManager.download(GeoFileManager.java:76)
    at de.fabianonline.telegram_backup.DownloadManager._downloadMedia(DownloadManager.java:276)
    at de.fabianonline.telegram_backup.DownloadManager.downloadMedia(DownloadManager.java:229)
    at de.fabianonline.telegram_backup.CommandLineController.<init>(CommandLineController.java:173)
    at de.fabianonline.telegram_backup.CommandLineRunner.main(CommandLineRunner.java:77)
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at java.base/sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:89)
    at java.base/sun.security.validator.Validator.getInstance(Validator.java:181)
    at java.base/sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:330)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:180)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:192)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:133)
    at java.base/sun.security.ssl.ClientHandshaker.checkServerCerts(ClientHandshaker.java:1825)
    at java.base/sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1655)
    at java.base/sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:260)
    at java.base/sun.security.ssl.Handshaker.processLoop(Handshaker.java:1086)
    at java.base/sun.security.ssl.Handshaker.processRecord(Handshaker.java:1020)
    at java.base/sun.security.ssl.SSLSocketImpl.processInputRecord(SSLSocketImpl.java:1137)
    at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1074)
    at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
    at java.base/sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1402)
    at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1429)
    ... 13 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at java.base/java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
    at java.base/java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
    at java.base/java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
    at java.base/sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:86)
    ... 28 more

----- EXIT -----
fabianonline commented 6 years ago

That kind of error should be fixed by using Fuel to download files since version... 1.1.0, I think.