Open cacklinglaughing opened 1 month ago
I don't think the problem is the fault of the mod but which Java version/distribution is being used. I will try to reproduce the error on my end. But I can't imagine where it can come from.
It could be. I want to blame the minecraft launcher, this never happened under multimc. It's probably something wrong with their runtime. But it doesn't occur until the mod is installed. My friend and I did not have this problem until installing modflared, then swapping away from the built in runtime fixed it.
It is possible that Modflared uses a newer method to establish an HTTPS connection that the runtime does not like.
This happens before cloudflared even launches, it can't download cloudflared. I wonder if it is something with a certificate being used to download.
Most but not all https connections fail is the interesting part. For example, this infernal expansion one works but the citadel and travelersbackpack GitHub ones don't.
[23:50:25] [main/WARN]: @Redirect conflict. Skipping tombstone.mixins.json:FogRendererMixin->@Redirect::methodHasEffect(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/potion/Effect;)Z with priority 1000, already redirected by origins.mixins.json:BackgroundRendererMixin->@Redirect::hasStatusEffectProxy(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/potion/Effect;)Z with priority 1000
[23:50:25] [Worker-Main-14/INFO]: 78 material render infos loaded
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: 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
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1497)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at com.github.alexthe666.citadel.web.WebHelper.getURLContents(WebHelper.java:19)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at com.github.alexthe666.citadel.Citadel.setup(Citadel.java:103)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at com.github.alexthe666.citadel.Citadel$$Lambda$3344/757648358.accept(Unknown Source)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at net.minecraftforge.eventbus.EventBus$$Lambda$2971/775739186.invoke(Unknown Source)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at net.minecraftforge.eventbus.EventBus$$Lambda$3156/1928589644.invoke(Unknown Source)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:120)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:121)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at net.minecraftforge.fml.ModContainer$$Lambda$3242/1827573818.run(Unknown Source)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1618)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1610)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:24]: at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:634]: Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:634]: at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:634]: at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:634]: at sun.security.validator.Validator.validate(Validator.java:260)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:634]: at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:634]: at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:634]: at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:634]: at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1479)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:634]: ... 30 more
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:643]: Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:643]: at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:145)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:643]: at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:643]: at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:643]: at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
[23:50:26] [Worker-Main-14/INFO]: [java.lang.Throwable:printStackTrace:643]: ... 36 more
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: java.lang.NullPointerException
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at com.github.alexthe666.citadel.web.WebHelper.getURLContents(WebHelper.java:28)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at com.github.alexthe666.citadel.Citadel.setup(Citadel.java:103)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at com.github.alexthe666.citadel.Citadel$$Lambda$3344/757648358.accept(Unknown Source)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at net.minecraftforge.eventbus.EventBus$$Lambda$2971/775739186.invoke(Unknown Source)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at net.minecraftforge.eventbus.EventBus$$Lambda$3156/1928589644.invoke(Unknown Source)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:120)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:121)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at net.minecraftforge.fml.ModContainer$$Lambda$3242/1827573818.run(Unknown Source)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1618)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1610)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
[23:50:26] [Worker-Main-14/INFO]: [com.github.alexthe666.citadel.web.WebHelper:getURLContents:30]: at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
[23:50:26] [Worker-Main-14/WARN]: Failed to load patreon contributor perks
[23:50:26] [Worker-Main-14/INFO]: Registering 3 command argument types.
[23:50:26] [Worker-Main-14/INFO]: Registering 13 loot conditions.
[23:50:26] [Forge Version Check/INFO]: [infernalexp] Starting version check at https://infernalstudios.org/api/mods/infernalexpansion/forge
[23:50:26] [Forge Version Check/INFO]: [infernalexp] Found status: AHEAD Current: 2.5.0 Target: null
[23:50:26] [Forge Version Check/INFO]: [clumps] Starting version check at https://updates.blamejared.com/get?n=clumps&gv=1.16.5
[23:50:27] [Worker-Main-14/INFO]: [com.hollingsworth.arsnouveau.common.capability.ManaCapability:register:62]: Finished Registering ManaCapability
[23:50:27] [Worker-Main-14/INFO]: [com.hollingsworth.arsnouveau.api.familiar.FamiliarCap:register:97]: Finished Registering FamiliarCap
[23:50:27] [Worker-Main-14/INFO]: [com.hollingsworth.arsnouveau.common.network.Networking:registerMessages:27]: Registering packets!!
[23:50:27] [Forge Version Check/INFO]: [clumps] Found status: BETA Current: 6.0.0.28 Target: 6.0.0.28
[23:50:27] [Forge Version Check/INFO]: [travelersbackpack] Starting version check at https://gist.githubusercontent.com/Tiviacz1337/906937677aa472285dff9d6c2a189d5e/raw
[23:50:27] [Forge Version Check/WARN]: Failed to process update information
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) ~[?:1.8.0_51]
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) ~[?:1.8.0_51]
I can reproduce this simply by going to CurseForge, creating a blank modpack for 1.16.5 using the default Forge (36.2.34), copy-pasting in modflared-1.2.0+release.49.jar, hitting play, then hitting play again once the Launcher shows up. Chances are you'll see this: If not, there's something wrong on my end and my friend's end which would be some sort of coincidence. This is with the default runtime: If I then set the runtime to jre-1.8/bin/javaw.bin, the error does not occur.
Even without going through CurseForge, if I just use its copy of the Minecraft Launcher with that Forge version it uses, the same issue happens.
Long story short, this should be reproducible with just this mod.
The problem seems to be very specific to CurseForge version on 1.16.5. I've looked into it for a while and haven't found any reason why this could happen.
Java probably cannot verify the required certificates; it may have something to do with the certificates coming from Github.
What happens if we change the site? Obviously I'm not asking you to make an entire website just to host cloudflare binaries, but I am curious what would happen if we temporarily changed the URL to a certificate that isn't Github
The thing is it seems to break other mods too
I don't think I can do anything about the problem. The error says that Java doesn't trust the server's certificate. But Modflared doesn't change the certificates or use its own, so it can only be related to the Windows Certificate Store. It could be that Java 8 uses APIs that no longer work properly. That would also explain why I couldn't reproduce this problem on Linux but could on Windows. I would simply write this off as "another case where you can see that Java 8 is outdated". The problem also only seems to occur with the specific Java distribution that the Curseforge Minecraft launcher uses. If you find anything else, please let me know. As an alternative to the Curseforge launcher, you can also use Prismlauncher, because I couldn't reproduce the problem with that either.
What about if you provide the cloudflared executable to the mod, forcing it not to download and only use a local one? Does this still cause issues for other mods in the modpack like it did for mine? I wonder if skipping all HTTP(S) requests would mitigate whatever issue also causes other mods to have connection issues.
Including the binary(only amd64) in modflared is going to increase modflared to ~65 MB, for only including the Windows version. Modflared in its current state supports all Architectures that cloudflared support including arm64 etc.
That makes sense. I was more asking about what would happen if that was done for testing purposes. Not that that should be included in the actual mod, just asking what would happen.
Describe the bug For myself and one other person, once modflared is installed into a curseforge pack manually it bricks the internet access for that modpack. Changing the java from bundled to my java 8 fixed it but I've noticed the launcher changed it back without me knowing and it still works.
Which version of the mod/game are you using? 1.16.5 1.2.0+49
To Reproduce Steps to reproduce the behavior:
Expected behavior No error
Additional context The issue happened on my computer, I swapped to my own java and it fixed it, but it has since swapped back and is still working. Now it is happening on my friend's computer. In this case, this is the modflared version of the error, but ALL mods spam the console with some reiteration of this