Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] JCEF Slow Download #4896

Closed
vapidinfinity opened this issue Dec 15, 2024 · 4 comments
Closed

[BUG] JCEF Slow Download #4896

vapidinfinity opened this issue Dec 15, 2024 · 4 comments
Labels
🐛 bug Something isn't working 🌑 nextgen
Milestone

Comments

@vapidinfinity
Copy link

LiquidBounce Branch

Nextgen

LiquidBounce Build/Version

0.21.0

Operating System

macOS

Minecraft Version

1.21.1

Describe the bug

Upon initial launch of liquidbounce, JCEF is downloaded and extracted as one of its dependencies.
However, this download process is extremely slow (~15 minutes), and the 'extracting...' phase hangs sometimes. @1zun4 and I were on discord trying to rectify this problem to no avail!!
directly downloading JCEF from origin took less than a minute, so the problem is definitely with liquidbounce.

Steps to reproduce

  1. Open liquidbounce

Client Log

null[21:34:31] [main/INFO]: Loading Minecraft 1.21.1 with Fabric Loader 0.16.9
[21:34:31] [main/INFO]: Loading 56 mods:
	- fabric-language-kotlin 1.13.0+kotlin.2.1.0
	   |-- org_jetbrains_kotlin_kotlin-reflect 2.1.0
	   |-- org_jetbrains_kotlin_kotlin-stdlib 2.1.0
	   |-- org_jetbrains_kotlin_kotlin-stdlib-jdk7 2.1.0
	   |-- org_jetbrains_kotlin_kotlin-stdlib-jdk8 2.1.0
	   |-- org_jetbrains_kotlinx_atomicfu-jvm 0.26.1
	   |-- org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm 1.9.0
	   |-- org_jetbrains_kotlinx_kotlinx-coroutines-jdk8 1.9.0
	   |-- org_jetbrains_kotlinx_kotlinx-datetime-jvm 0.6.1
	   |-- org_jetbrains_kotlinx_kotlinx-io-bytestring-jvm 0.6.0
	   |-- org_jetbrains_kotlinx_kotlinx-io-core-jvm 0.6.0
	   |-- org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm 1.7.3
	   |-- org_jetbrains_kotlinx_kotlinx-serialization-core-jvm 1.7.3
	   \-- org_jetbrains_kotlinx_kotlinx-serialization-json-jvm 1.7.3
	- fabricloader 0.16.9
	   \-- mixinextras 0.4.1
	- java 21
	- liquidbounce 0.21.0
	   |-- com_github_ccbluex_discordipc 4.0.0
	   |-- com_github_ccbluex_mc-authlib 1.4.1
	   |-- com_github_ccbluex_netty-httpserver 2.1.1
	   |-- com_google_code_gson_gson 2.10.1
	   |-- com_kohlschutter_junixsocket_junixsocket-common 2.8.3
	   |-- com_kohlschutter_junixsocket_junixsocket-native-common 2.8.3
	   |-- com_thealtening_api_api 4.1.0
	   |-- com_vdurmont_semver4j 3.1.0
	   |-- commons-io_commons-io 2.15.1
	   |-- io_netty_netty-codec-http 4.1.97
	   |-- io_netty_netty-codec-socks 4.1.97
	   |-- io_netty_netty-handler 4.1.97
	   |-- io_netty_netty-handler-proxy 4.1.97
	   |-- io_netty_netty-resolver 4.1.97
	   |-- io_netty_netty-transport-native-unix-common 4.1.97
	   |-- mcef 1.2.1-1.21.1
	   |-- net_fabricmc_tiny-mappings-parser 0.3.0+build.17
	   |-- net_lenni0451_reflect 1.3.2
	   |-- org_ahocorasick_ahocorasick 0.6.3
	   |-- org_apache_commons_commons-exec 1.3
	   |-- org_apache_commons_commons-lang3 3.12.0
	   |-- org_apache_logging_log4j_log4j-api 2.23.1
	   |-- org_apache_logging_log4j_log4j-core 2.23.1
	   |-- org_apache_tika_tika-core 2.9.2
	   |-- org_graalvm_js_js-language 24.0.2
	   |-- org_graalvm_polyglot_polyglot 24.0.2
	   |-- org_graalvm_regex_regex 24.0.2
	   |-- org_graalvm_sdk_collections 24.0.2
	   |-- org_graalvm_sdk_jniutils 24.0.2
	   |-- org_graalvm_sdk_nativeimage 24.0.2
	   |-- org_graalvm_sdk_word 24.0.2
	   |-- org_graalvm_shadowed_icu4j 24.0.2
	   |-- org_graalvm_truffle_truffle-api 24.0.2
	   |-- org_graalvm_truffle_truffle-compiler 24.0.2
	   |-- org_graalvm_truffle_truffle-runtime 24.0.2
	   |-- org_jetbrains_annotations 13.0
	   \-- org_slf4j_slf4j-api 2.0.10
	- minecraft 1.21.1
[21:34:31] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.7 Source=file:/Users/{COMPUTER_USERNAME}/Library/Application%20Support/ModrinthApp/meta/libraries/net/fabricmc/sponge-mixin/0.15.4+mixin.0.8.7/sponge-mixin-0.15.4+mixin.0.8.7.jar Service=Knot/Fabric Env=CLIENT
[21:34:31] [main/INFO]: Compatibility level set to JAVA_21
[21:34:31] [main/WARN]: Error loading class: com/viaversion/viaversion/protocol/packet/PacketWrapperImpl (java.lang.ClassNotFoundException: com/viaversion/viaversion/protocol/packet/PacketWrapperImpl)
[21:34:32] [main/WARN]: Error loading class: net/caffeinemc/mods/sodium/client/render/chunk/compile/pipeline/BlockOcclusionCache (java.lang.ClassNotFoundException: net/caffeinemc/mods/sodium/client/render/chunk/compile/pipeline/BlockOcclusionCache)
[21:34:32] [main/WARN]: Error loading class: net/caffeinemc/mods/sodium/client/model/light/data/LightDataAccess (java.lang.ClassNotFoundException: net/caffeinemc/mods/sodium/client/model/light/data/LightDataAccess)
[21:34:32] [main/INFO]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.4.1).
[21:34:32] [Datafixer Bootstrap/INFO]: 226 Datafixer optimizations took 162 milliseconds
[21:34:36] [main/ERROR]: FabricAPI is not installed, please install it to use the page buttons in the creative inventory
[21:34:36] [Render thread/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[21:34:36] [Render thread/INFO]: Setting user: {MINECRAFT_USERNAME}
[21:34:36] [Render thread/INFO]: Backend library: LWJGL version 3.3.3-snapshot
[21:34:37] [Render thread/INFO]: Launching LiquidBounce v0.21.0 by CCBlueX
[21:34:37] [Render thread/INFO]: Probing environment...
[21:34:37] [Render thread/INFO]: Intermediary environment detected.
[21:34:37] [Render thread/INFO]: Loaded language en_us
[21:34:38] [Render thread/INFO]: [ScriptAPI] Engine Version: Development Build, Supported languages: [ js ]
[21:34:38] [Render thread/WARN]: HolesFiller is missing fallback description key liquidbounce.module.holesFiller.description
[21:34:39] [Render thread/INFO]: Successfully extracted default theme
[21:34:39] [Render thread/INFO]: Inserted 12 components
[21:34:39] [Render thread/INFO]: Successfully loaded config 'combattargets'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'combattargets'.
[21:34:39] [Render thread/INFO]: Successfully loaded config 'visualtargets'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'visualtargets'.
[21:34:39] [Render thread/INFO]: Successfully loaded config 'modules'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'modules'.
[21:34:39] [Render thread/INFO]: Successfully loaded config 'commands'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'commands'.
[21:34:39] [Render thread/INFO]: Successfully loaded config 'friends'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'friends'.
[21:34:39] [Render thread/INFO]: Successfully loaded config 'proxy'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'proxy'.
[21:34:39] [Render thread/INFO]: Successfully loaded config 'accounts'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'accounts'.
[21:34:39] [Render thread/INFO]: Successfully loaded config 'tabs'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'tabs'.
[21:34:39] [Render thread/INFO]: Successfully loaded config 'lang'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'lang'.
[21:34:39] [Render thread/INFO]: Successfully loaded config 'account'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'account'.
[21:34:39] [Render thread/INFO]: Successfully loaded config 'storage'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'storage'.
[21:34:39] [Render thread/INFO]: Successfully loaded config 'theme'.
[21:34:39] [Render thread/INFO]: Successfully saved config 'theme'.
[21:34:39] [Render thread/INFO]: Default port unavailable. Falling back to random port.
[21:34:39] [Render thread/INFO]: Refresh Rate: 75 Hz
[21:34:39] [Render thread/INFO]: JCEF Commit: 0e837c94ea090b6eb4b9bc65428ec28fd75d1d72
[21:34:39] [Render thread/INFO]: [Downloading Checksum] Started task
[21:34:39] [netty-websocket/INFO]: Starting Netty server...
[21:34:39] [nioEventLoopGroup-2-1/INFO]: [id: 0x53246252] REGISTERED
[21:34:39] [nioEventLoopGroup-2-1/INFO]: [id: 0x53246252] BIND: 0.0.0.0/0.0.0.0:16251
[21:34:39] [netty-websocket/INFO]: Netty server started on port 16251.
[21:34:39] [nioEventLoopGroup-2-1/INFO]: [id: 0x53246252, L:/[0:0:0:0:0:0:0:0]:16251] ACTIVE
[21:34:40] [Render thread/INFO]: [Downloading Checksum] Progress 100%
[21:34:40] [Render thread/INFO]: Checksum matches: false
[21:34:40] [Render thread/INFO]: Platform directory exists: false
[21:34:40] [mcef-downloader/INFO]: Downloading JCEF...
[21:34:40] [mcef-downloader/INFO]: [Downloading JCEF] Started task
[21:34:40] [Render thread/INFO]: Successfully loaded client!
[21:34:40] [Render thread/INFO]: Reloading ResourceManager: vanilla
[21:34:40] [Render thread/INFO]: Loaded background image for theme default
[21:34:40] [Worker-Main-2/INFO]: Found unifont_all_no_pua-15.1.05.hex, loading
[21:34:41] [Worker-Main-4/INFO]: Found unifont_jp_patch-15.1.05.hex, loading
[21:34:41] [DefaultDispatcher-worker-1/INFO]: Loading Discord IPC configuration...
[21:34:41] [Render thread/WARN]: Missing sound for event: minecraft:item.goat_horn.play
[21:34:41] [Render thread/WARN]: Missing sound for event: minecraft:entity.goat.screaming.horn_break
[21:34:41] [mcef-downloader/INFO]: [Downloading JCEF] Progress 0%
[21:34:41] [Render thread/INFO]: OpenAL initialized on device Esiayo’s AirPods Pro #2
[21:34:41] [Render thread/INFO]: Sound engine started
[21:34:42] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas
[21:34:42] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/signs.png-atlas
[21:34:42] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[21:34:42] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[21:34:42] [Render thread/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/armor_trims.png-atlas
[21:34:42] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[21:34:42] [Render thread/INFO]: Created: 128x64x4 minecraft:textures/atlas/decorated_pot.png-atlas
[21:34:42] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[21:34:42] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[21:34:42] [Render thread/INFO]: Created: 512x256x0 minecraft:textures/atlas/particles.png-atlas
[21:34:42] [Render thread/INFO]: Created: 512x256x0 minecraft:textures/atlas/paintings.png-atlas
[21:34:42] [Render thread/INFO]: Created: 256x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[21:34:42] [Render thread/INFO]: Created: 64x64x0 minecraft:textures/atlas/map_decorations.png-atlas
[21:34:42] [Render thread/INFO]: Created: 1024x512x0 minecraft:textures/atlas/gui.png-atlas
[21:34:42] [Render thread/WARN]: Shader rendertype_entity_translucent_emissive could not find sampler named Sampler2 in the specified shader program.
[21:34:42] [IO-Worker-1/INFO]: Requesting to login into Mojang...
[21:34:42] [Render thread/ERROR]: Failed to load UI blur shader
java.io.FileNotFoundException: liquidbounce:shaders/post/ui_blur.json
	at knot/net.minecraft.class_5912.method_43043(class_5912.java:23) ~[client-intermediary.jar:?]
	at java.base/java.util.Optional.orElseThrow(Unknown Source) ~[?:?]
	at knot/net.minecraft.class_5912.getResourceOrThrow(class_5912.java:23) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_279.method_1256(class_279.java:61) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_279.<init>(class_279.java:57) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_757.handler$zea000$liquidbounce$hookUIBlurLoad(class_757.java:1759) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_757.method_34538(class_757.java:547) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_757$1.method_45777(class_757.java:419) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_757$1.method_18788(class_757.java:396) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_4080.method_18790(class_4080.java:13) ~[client-intermediary.jar:?]
	at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source) ~[?:?]
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(Unknown Source) ~[?:?]
	at knot/net.minecraft.class_4014.method_18365(class_4014.java:69) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_1255.method_18859(class_1255.java:162) [client-intermediary.jar:?]
	at knot/net.minecraft.class_4093.method_18859(class_4093.java:23) [client-intermediary.jar:?]
	at knot/net.minecraft.class_1255.method_16075(class_1255.java:136) [client-intermediary.jar:?]
	at knot/net.minecraft.class_1255.method_5383(class_1255.java:121) [client-intermediary.jar:?]
	at knot/net.minecraft.class_310.method_1523(class_310.java:1240) [client-intermediary.jar:?]
	at knot/net.minecraft.class_310.method_1514(class_310.java:882) [client-intermediary.jar:?]
	at knot/net.minecraft.client.main.Main.main(Main.java:256) [client-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480) [fabric-loader-0.16.9.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.16.9.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.16.9.jar:?]
[21:34:42] [Render thread/ERROR]: Failed to load outline shader
java.io.FileNotFoundException: liquidbounce:shaders/post/outline_shader.json
	at knot/net.minecraft.class_5912.method_43043(class_5912.java:23) ~[client-intermediary.jar:?]
	at java.base/java.util.Optional.orElseThrow(Unknown Source) ~[?:?]
	at knot/net.minecraft.class_5912.getResourceOrThrow(class_5912.java:23) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_279.method_1256(class_279.java:61) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_279.<init>(class_279.java:57) ~[client-intermediary.jar:?]
	at knot/net.ccbluex.liquidbounce.render.engine.MinecraftFramebufferShader.load(MinecraftFramebufferShader.kt:44) ~[liquidbounce.jar:?]
	at knot/net.minecraft.class_761.handler$zek000$liquidbounce$onLoadEntityOutlineShader(class_761.java:3211) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_761.method_3296(class_761.java:532) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_761.method_14491(class_761.java:508) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_4013.method_29490(class_4013.java:15) ~[client-intermediary.jar:?]
	at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(Unknown Source) ~[?:?]
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(Unknown Source) ~[?:?]
	at knot/net.minecraft.class_4014.method_18365(class_4014.java:69) ~[client-intermediary.jar:?]
	at knot/net.minecraft.class_1255.method_18859(class_1255.java:162) [client-intermediary.jar:?]
	at knot/net.minecraft.class_4093.method_18859(class_4093.java:23) [client-intermediary.jar:?]
	at knot/net.minecraft.class_1255.method_16075(class_1255.java:136) [client-intermediary.jar:?]
	at knot/net.minecraft.class_1255.method_5383(class_1255.java:121) [client-intermediary.jar:?]
	at knot/net.minecraft.class_310.method_1523(class_310.java:1240) [client-intermediary.jar:?]
	at knot/net.minecraft.class_310.method_1514(class_310.java:882) [client-intermediary.jar:?]
	at knot/net.minecraft.client.main.Main.main(Main.java:256) [client-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480) [fabric-loader-0.16.9.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.16.9.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.16.9.jar:?]
[21:34:42] [DefaultDispatcher-worker-1/INFO]: Successfully connected to Discord RPC.
[21:34:42] [Render thread/WARN]: Failed to place all characters (4104) on the atlas, using a reduced charset (3848) instead!
[21:34:42] [Render thread/INFO]: Completed loading fonts in 505 ms.
[21:34:42] [Render thread/INFO]: Fonts: [ Helvetica, Inter Light, Inter Medium, Inter Regular, Inter Bold ]
[21:34:43] [Render thread/INFO]: Loaded Discord IPC configuration.
[21:34:43] [Render thread/INFO]: Refreshing local IP info...
[21:34:44] [Render thread/INFO]: Loading heads...
[21:34:46] [Render thread/INFO]: Successfully loaded 956 heads from the database
[21:34:46] [Render thread/INFO]: Loading settings list from API...
[21:34:47] [Render thread/INFO]: Loaded 20 settings from API.
[21:34:47] [Render thread/INFO]: Disabled conflicting options.
[21:34:47] [Render thread/INFO]: Successfully loaded 363 cosmetics carriers.
[21:34:52] [mcef-downloader/INFO]: [Downloading JCEF] Progress 1%
[21:35:03] [mcef-downloader/INFO]: [Downloading JCEF] Progress 2%

Screenshots

image

@github-actions github-actions bot added 🌑 nextgen 🐛 bug Something isn't working labels Dec 15, 2024
@DataM0del
Copy link
Contributor

DataM0del commented Dec 15, 2024

[21:34:41] [Render thread/INFO]: OpenAL initialized on device Esiayo’s AirPods Pro #2

top 5 reasons to not use MacOS

@DataM0del
Copy link
Contributor

Could start my hackintosh and see if I can reproduce it there.
Obviously there's architecture and hardware differences

@1zun4
Copy link
Member

1zun4 commented Dec 15, 2024

I'm still pretty sure it's a routing/connection issue - but I had already planned to move the download to use Cloudflare R2 and make the resource manager more robust.

That it downloads faster on the browser for you might be an HTTP and compression difference, which Java does not support(?) with the basic URL connection implementation. I might look into using a different method.

@1zun4 1zun4 added this to the 0.22.0 milestone Dec 15, 2024
@1zun4 1zun4 changed the title [BUG] Extremely slow JCEF download times on macOS [BUG] JCEF Slow Download Dec 15, 2024
@1zun4 1zun4 closed this as completed in c482931 Dec 15, 2024
@1zun4
Copy link
Member

1zun4 commented Dec 15, 2024

This commit introduces a more robust resource manager - which will now make use of the new LiquidBounce Resource API:
https://api.liquidbounce.net/api/v3/resource/:name/:commit/:platform
https://api.liquidbounce.net/api/v3/resource/:name/:commit/:platform/checksum

This means from now on downloads are being served via Cloudflare R2 - which should be much faster and not rely on our infrastructure so much.

An example:
https://api.liquidbounce.net/api/v3/resource/mcef-cef/0e837c94ea090b6eb4b9bc65428ec28fd75d1d72/linux_amd64
https://api.liquidbounce.net/api/v3/resource/mcef-cef/0e837c94ea090b6eb4b9bc65428ec28fd75d1d72/linux_amd64/checksum

Error handling was slightly improved as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🌑 nextgen
Projects
None yet
Development

No branches or pull requests

3 participants