MaxiHuHe04/iTunes-Backup-Explorer

java.lang.UnsatisfiedLinkError: Can't load library: libprism_es2.dylib

kennymc-c opened this issue · 5 comments

When I try to load the program via java -jar itunes-backup-explorer-1.2.jar, I get the following error on a M1 Pro MacBook Pro with macOS Ventura 13.0:

java.lang.UnsatisfiedLinkError: Can't load library: /Users/username/.openjfx/cache/18+12/libprism_es2.dylib
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2408)
	at java.base/java.lang.Runtime.load0(Runtime.java:785)
	at java.base/java.lang.System.load(System.java:2011)
	at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:217)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:197)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:138)
	at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:54)
	at com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:63)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:52)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:390)
	at java.base/java.lang.Class.forName(Class.java:381)
	at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
	at java.base/java.lang.Thread.run(Thread.java:1589)
Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: Can't load library: /Users/username/.openjfx/cache/18+12/libprism_sw.dylib
java.lang.UnsatisfiedLinkError: Can't load library: /Users/username/.openjfx/cache/18+12/libprism_sw.dylib
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2408)
	at java.base/java.lang.Runtime.load0(Runtime.java:785)
	at java.base/java.lang.System.load(System.java:2011)
	at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:217)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:197)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:138)
	at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:54)
	at com.sun.prism.sw.SWPipeline.lambda$static$0(SWPipeline.java:43)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at com.sun.prism.sw.SWPipeline.<clinit>(SWPipeline.java:42)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:390)
	at java.base/java.lang.Class.forName(Class.java:381)
	at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
	at java.base/java.lang.Thread.run(Thread.java:1589)
Graphics Device initialization failed for :  es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
	at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:283)
	at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:253)
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:266)
	at javafx.scene.image.Image.loadImage(Image.java:1081)
	at javafx.scene.image.Image.initialize(Image.java:816)
	at javafx.scene.image.Image.<init>(Image.java:706)
	at me.maxih.itunes_backup_explorer.ITunesBackupExplorer.getIcon(ITunesBackupExplorer.java:43)
	at me.maxih.itunes_backup_explorer.ITunesBackupExplorer.<clinit>(ITunesBackupExplorer.java:46)
	at me.maxih.itunes_backup_explorer.ITunesBackupExplorerLauncher.main(ITunesBackupExplorerLauncher.java:6)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
	at java.base/java.lang.Thread.run(Thread.java:1589)
Exception in thread "main" java.lang.ExceptionInInitializerError
	at me.maxih.itunes_backup_explorer.ITunesBackupExplorerLauncher.main(ITunesBackupExplorerLauncher.java:6)
Caused by: java.lang.RuntimeException: No toolkit found
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:278)
	at javafx.scene.image.Image.loadImage(Image.java:1081)
	at javafx.scene.image.Image.initialize(Image.java:816)
	at javafx.scene.image.Image.<init>(Image.java:706)
	at me.maxih.itunes_backup_explorer.ITunesBackupExplorer.getIcon(ITunesBackupExplorer.java:43)
	at me.maxih.itunes_backup_explorer.ITunesBackupExplorer.<clinit>(ITunesBackupExplorer.java:46)
	... 1 more```

Similar to what is described here, the program seems to download the wrong architecture for JavaFX: openjfx/javafx-gradle-plugin#112

@kennymc-c Not sure if you're still interested in getting this to work, I had the same issue, resolved it here #3 (comment)

zzph commented

I'm also having this issue- the solution linked above is pretty technical and I don't understand how to do it.

Has anyone found a solution?

This issue can be solved by installing JDK from the build of JDK 11 with JavaFX , as suggested in this answer https://stackoverflow.com/a/71622655/4523862 . [ NOTE : Follow the link in the answer, and SCROLL DOWN to find the download button for JDK 11 bundled with JavaFX ]

This tool Works!
This tool was my last hope to restore my iPhone backup, since IOS restore backup was failing to restore on my iPhone saying corrupted backup. (If anyone has solution to that too please let me know.)

@ankit-vs Thanks for the info!

I don't own a Mac so I haven't been able to test this yet. When I get the chance, I will try to really fix the issue and/or update the installation instruction for macOS. Maybe a separate jar for macOS/M1 could also help.

This tool was my last hope to restore my iPhone backup, which was failing to restore on my iPhone saying corrupted backup. (If anyone has solution to that too please let me know.)

Regarding this, with a bit of luck I may actually be able to help you. As this doesn't have anything to do with the original issue, can we move to #21?