Resource pack HTTPS

Discussion in 'BungeeCord Plugin Development' started by RobinMC, Apr 17, 2017.

Thread Status:
Not open for further replies.
  1. In the past I used this code for sending resource packs:
    Code (Text):
    player.setResourcePack("http://something");
    (this worked)

    I have recently secured my webserver with HTTPS, and I noticed resource packs no longer work. It gets stuck at "Making request: 100%..."
    [​IMG]

    Is there a way I can get HTTPS to work, or should I create subdomain without HTTPS?

    EDIT: I have updated my URL to say https://something
     
  2. Are there any client side logs that could indicate why it's not progressing?
     
  3. Code (Text):
    [18:48:45] [Netty Client IO #4/INFO]: Deleting old server resource pack legacy
    [18:48:45] [Downloader 0/INFO]: [STDERR]: 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
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1917)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:301)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:295)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1471)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.Handshaker.processLoop(Handshaker.java:936)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.Handshaker.process_record(Handshaker.java:871)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1043)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1343)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1511)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at ol$1.run(SourceFile:143)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at java.lang.Thread.run(Thread.java:745)
    [18:48:45] [Downloader 0/INFO]: [STDERR]: Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.validator.Validator.validate(Validator.java:260)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1453)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     ... 18 more
    [18:48:45] [Downloader 0/INFO]: [STDERR]: Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:145)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
    [18:48:45] [Downloader 0/INFO]: [STDERR]:     ... 24 more
     
  4. electronicboy

    IRC Staff

    Your certificates trust chain is not trusted/in the clients trusted CA certificates, basically meaning that as far as the client is concerned your certificate is untrusted.
    Easiest route is to, as you've already said, just create a subdomain that isn't protected, or get a certificate that is trusted by default (e.g. not a letsencrypt one, or any that isn't in common certificate chains by default)
     
    • Useful Useful x 1
  5. I don't want to spend loads of money on a 'proper' certificate, so I'll go with creating a subdomain.
     
Thread Status:
Not open for further replies.