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

Error loading libusb4java #134

Open
lia-dias opened this issue Feb 15, 2023 · 7 comments
Open

Error loading libusb4java #134

lia-dias opened this issue Feb 15, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@lia-dias
Copy link

This is the first time I'm trying to use this on Mac, so no history of success. It's a M1 processor and trying to connect through USB Cable using NS-USBLoader v7.0 for M1.

Have a 19.0.2 Java Version

liadias@Lias-MacBook-Air Downloads % java --version
java 19.0.2 2023-01-17
Java(TM) SE Runtime Environment (build 19.0.2+7-44)
Java HotSpot(TM) 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)

And got the following error on clicking 'Upload to NS' after selecting NSP file.

liadias@Lias-MacBook-Air Downloads % java -jar ns-usbloader-7.0-m1.jar
Feb 15, 2023 4:33:15 PM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @4d740d85'
2023-02-15 16:33:19.023 java[5319:179314] +[CATransaction synchronize] called within transaction
Exception in thread "Thread-6" java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/x3/f08ktst504gdly9hj65ll9480000gn/T/usb4java14668318304370977457.tmp/libusb4java.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 org.usb4java.Loader.load(Loader.java:323)
at org.usb4java.LibUsb.(LibUsb.java:690)
at nsusbloader.com.usb.UsbConnect.createContextAndInitLibUSB(UsbConnect.java:115)
at nsusbloader.com.usb.UsbConnect.connectHomebrewMode(UsbConnect.java:82)
at nsusbloader.com.usb.UsbCommunications.run(UsbCommunications.java:54)
at java.base/java.lang.Thread.run(Thread.java:1589)

It's running on a 15.0.1 Firmware, Hekate 6.0.1.

Can anyone help me with this error?

@developersu
Copy link
Owner

Could you please check if this build works for you?

@paperschool
Copy link

Fixed this issue for me with this - brew install libusb, @developersu might be worth making this a required dependency in the readme!

@developersu
Copy link
Owner

Fixed this issue for me with this - brew install libusb, @developersu might be worth making this a required dependency in the readme!

It should not be a dependency. This library already compiled for apple's aarch64 and added inside jar. It has to be picked up automatically on application startup as it's already done for another platforms.

That's why I'm asking to check another build.

@paperschool
Copy link

I checked your other build and it failed with the same error.

@lia-dias
Copy link
Author

Sorry for delaying a reply, but it hasn't worked. Got the same error.

@developersu developersu added the bug Something isn't working label Feb 17, 2023
@developersu
Copy link
Owner

@lia-dias thank you! Please install libusb via brew install libusb and it will be working.
Information about what brew is: https://brew.sh

Will fix this a bit later.

@lia-dias
Copy link
Author

No problem. The brew method worked pretty well for me, thank you. When a new release fixing this is out, I'll try again and let you know.

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

No branches or pull requests

3 participants