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

dlopen failed: library "libBlinkID.so" not found #332

Open
mohamadbadr opened this issue Oct 2, 2024 · 10 comments
Open

dlopen failed: library "libBlinkID.so" not found #332

mohamadbadr opened this issue Oct 2, 2024 · 10 comments

Comments

@mohamadbadr
Copy link

mohamadbadr commented Oct 2, 2024

A crash is occurring during setting the license in our application class

implementation
MicroblinkSDK.setLicenseFile("microblink.license", this)

here is the stack trace

Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: library "libBlinkID.so" not found
       at java.lang.Runtime.loadLibrary0(Runtime.java:1107)
       at java.lang.Runtime.loadLibrary0(Runtime.java:1028)
       at java.lang.System.loadLibrary(System.java:1664)
       at com.microblink.blinkid.secured.lIlIllllII.IllIIIllII(line:9)
       at com.microblink.blinkid.secured.lIlIllllII.llIIlIlIIl(line:1)
       at com.microblink.blinkid.MicroblinkSDK.<clinit>(line:1)
       at com.example.ApplcationClass.onCreate(ApplcationClass.kt:55)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1204)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6795)
       at android.app.ActivityThread.access$1300(ActivityThread.java:240)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1940)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:223)
       at android.app.ActivityThread.main(ActivityThread.java:7743)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

we are using version 6.11.0

@mparadina
Copy link
Collaborator

Hi @mohamadbadr

Can you tell me if you are running the SDK on a simulator, or a physical device?
Is the behavior occurring on multiple devices?

@mohamadbadr
Copy link
Author

mohamadbadr commented Oct 2, 2024

Hi @mparadina

its a production issue that is occurring with the users on multiple devices and all android os versions

@mparadina
Copy link
Collaborator

Hi @mohamadbadr

Thank you for the swift response.

Are you able to share on which devices, along with Android OS versions, the crashes are occurring?

@mohamadbadr
Copy link
Author

Hi @mparadina,

Here is a small sample:

Brand Model Android OS version
Samsung Galaxy S22 11
Google Pixel 5 13
Oneplus OnePlus 10 Pro 5G 9
Xiaomi Mi 10 Pro 12
Huawei MED-LX9 10

The issue is happening with 63 Users and occurred 666 times in the last 7 days. We think it started when we migrated to Android SDK 34

@mohamadbadr
Copy link
Author

@mparadina
any updates?

@mohamadbadr
Copy link
Author

Hello there,

We have been getting a new crash log regarding the same issue

  Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: library "libBlinkID.so" not found
       at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
       at java.lang.Runtime.loadLibrary0(Runtime.java:998)
       at java.lang.System.loadLibrary(System.java:1661)
       at com.microblink.blinkid.secured.IllIllIIll.IlIllIlIIl(line:5)
       at com.microblink.blinkid.secured.IllIllIIll.llIIlIlIIl(line:1)
       at com.microblink.blinkid.MicroblinkSDK.<clinit>(line:1)
       at io.telda.app.TeldaApplication.onCreate(TeldaApplication.kt:55)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1277)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6759)
       at android.app.ActivityThread.-$$Nest$mhandleBindApplication()
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2133)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:201)
       at android.os.Looper.loop(Looper.java:288)
       at android.app.ActivityThread.main(ActivityThread.java:7872)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

@mparadina
Copy link
Collaborator

Hi @mohamadbadr

I've checked with the team internally, and they've asked if you know are the reported devices, by any chance, rooted?
This shouldn’t happen on non-rooted devices if the SDK .so file is present in the APK.

Could maybe double-check if the libBlinkID.so is in your APK or App bundle?
It should be located inside lib/<architecture> folders when you extract the App bundle.

@mohamadbadr
Copy link
Author

mohamadbadr commented Oct 15, 2024

Hi @mparadina
I have checked the APK and the libBlinkID.so exits forarm64-v8a and arm64-v7a architectures, but it doesn't exist for x86 and x86_64 architectures.

And is it a requirement to use the SDK for the app not to be rooted, I think we would have captured this issue earlier if that was the case.

@mparadina
Copy link
Collaborator

Hi @mohamadbadr

Thank you for the feedback.
If you are using other native libraries in your application, the issue could be with architectures that we do not support.
The BlinkID SDK has support for the 'armeabi-v7a' and 'arm64-v8a' architectures. More info is explained here.

If the application is launched on a device with a different architecture that we do not support, the crash will happen.
To ensure that only ARMv7 and ARM64 are used, you will need to set the abiFilters and keep only 'armeabi-v7a' and 'arm64-v8a'. More info here:

android {
    ...
    ndk {
        // Tells Gradle to package the following ABIs into your application
        abiFilters 'armeabi-v7a', 'arm64-v8a'
    }
}

@mparadina
Copy link
Collaborator

Hi @mohamadbadr

Just wanted to follow-up here.
Did the answer above help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants