LiquidBounce icon indicating copy to clipboard operation
LiquidBounce copied to clipboard

[BUG] MCEF still downloads x86 libraries on ARM64

Open dudethis opened this issue 11 months ago • 9 comments

LiquidBounce Branch

Nextgen

LiquidBounce Build/Version

0.1.4 (aka latest artifact)

Operating System

Linux

Minecraft Version

1.20.4

Describe the bug

Was expecting the client to launch properly, but the client crashed. This is because the automatically downloaded files are for the AMD64 or x86 cpu architecture, but my cpu is ARM64. MCEF says that it supports ARM64, so the problem shouldn't be too much of a hastle to fix.

Steps to reproduce

  1. Have arm64 cpu architecture
  2. Download and launch client with fabric
  3. wait for it to load to around 90% where the crash happens

Client Log

[21:22:13] [mcef-downloader/INFO]: Extracting JCEF...
[21:22:13] [mcef-downloader/INFO]: Task: Extracting with progress 0.0 %
[21:22:14] [Render thread/INFO]: Loaded fonts successfully!
[21:22:15] [Render thread/INFO]: Loaded Discord IPC configuration.
[21:22:15] [Render thread/INFO]: Refreshing local IP info...
[21:22:15] [nioEventLoopGroup-5-1/INFO]: Successfully requested IP info ##.##.###.###
[21:22:15] [Render thread/INFO]: Loading heads...
[21:22:16] [Render thread/INFO]: Successfully loaded 956 heads from the database
[21:22:16] [Render thread/INFO]: Loading settings list from API...
[21:22:17] [Render thread/INFO]: Loaded 27 settings from API.
[21:22:17] [Render thread/INFO]: Successfully loaded 233 cape carriers.
[21:22:22] [Render thread/INFO]: Initializing CEF on linux_arm64...
[21:22:22] [Render thread/ERROR]: Fatal error
java.lang.UnsatisfiedLinkError: /home/dudethis/.local/share/PrismLauncher/instances/1.20.4/.minecraft/LiquidBounce/mcef/libraries/linux_arm64/libcef.so: /home/dudethis/.local/share/PrismLauncher/instances/1.20.4/.minecraft/LiquidBounce/mcef/libraries/linux_arm64/libcef.so: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64 .so on a AARCH64 platform)
	at jdk.internal.loader.NativeLibraries.load(Native Method) ~[?:?]
	at jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(Unknown Source) ~[?:?]
	at jdk.internal.loader.NativeLibraries.loadLibrary(Unknown Source) ~[?:?]
	at jdk.internal.loader.NativeLibraries.loadLibrary(Unknown Source) ~[?:?]
	at java.lang.ClassLoader.loadLibrary(Unknown Source) ~[?:?]
	at java.lang.Runtime.load0(Unknown Source) ~[?:?]
	at java.lang.System.load(Unknown Source) ~[?:?]
	at org.cef.CefApp.startup(CefApp.java:452) ~[liquidbounce.jar:?]
	at net.ccbluex.liquidbounce.mcef.CefUtil.init(CefUtil.java:94) ~[liquidbounce.jar:?]
	at net.ccbluex.liquidbounce.mcef.MCEF.initialize(MCEF.java:71) ~[liquidbounce.jar:?]
	at net.ccbluex.liquidbounce.web.browser.supports.JcefBrowser.initBrowserBackend(JcefBrowser.kt:73) ~[liquidbounce.jar:?]
	at net.ccbluex.liquidbounce.web.browser.BrowserManager$initBrowser$1.invoke(BrowserManager.kt:66) ~[liquidbounce.jar:?]
	at net.ccbluex.liquidbounce.web.browser.BrowserManager$initBrowser$1.invoke(BrowserManager.kt:63) ~[liquidbounce.jar:?]
	at net.ccbluex.liquidbounce.web.browser.supports.JcefBrowser$makeDependenciesAvailable$2.invoke$lambda$0(JcefBrowser.kt:63) ~[liquidbounce.jar:?]
	at com.mojang.blaze3d.systems.RenderSystem.replayQueue(RenderSystem.java:227) ~[client-intermediary.jar:?]
	at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:214) ~[client-intermediary.jar:?]
	at net.minecraft.class_1041.method_15998(class_1041.java:287) ~[client-intermediary.jar:?]
	at net.minecraft.class_310.method_1523(class_310.java:1349) ~[client-intermediary.jar:?]
	at net.minecraft.class_310.method_1514(class_310.java:888) ~[client-intermediary.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:265) ~[minecraft-1.20.4-client.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.7.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.7.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.7.jar:?]
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87) ~[NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130) ~[NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) ~[NewLaunch.jar:?]

Screenshots

2024-03-09-213159_1152x864_scrot

dudethis avatar Mar 10 '24 05:03 dudethis

I'm going to try manually downloading libraries, but should i report this somewhere else?

dudethis avatar Mar 10 '24 05:03 dudethis

update: I replaced the x86 version of libcef.so with the arm64 version, now it crashes because of libjcef.so. I also just realized that every other .so file in there is for x86_64, so... if i cant get those files after I build jcef imma give up

dudethis avatar Mar 10 '24 07:03 dudethis

I think the issue is that he downloads the correct zip, but the binaries itself are built using AMD64. I think the GitHub workflow that made them is borked.

1zun4 avatar Mar 10 '24 15:03 1zun4

Okay that makes sense. Should I post this issue on the jmcef git or mcef or...?

dudethis avatar Mar 10 '24 22:03 dudethis

No, you can keep this here. I will look this, but not now.

1zun4 avatar Mar 10 '24 22:03 1zun4

I think I found the fix, going to try this now. https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=17849

dudethis avatar Mar 17 '24 21:03 dudethis

Is this issue still present? I recently rebuilt all the natives for MCEF and the ARM natives are built on ARM hardware so it should work.

The natives are built using https://github.com/CCBlueX/java-cef/blob/master/.github/workflows/build-jcef.yml

Maybe I made a mistake?

1zun4 avatar Mar 17 '24 22:03 1zun4

How long ago was that? I'm still encountering the issue on the latest release 0.1.9

dudethis avatar Mar 18 '24 00:03 dudethis

the issue is still there

cxh06 avatar Mar 18 '24 04:03 cxh06