-
Notifications
You must be signed in to change notification settings - Fork 154
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
The native library is loaded in the main thread, which generates an ANR #299
Comments
Hello! Thank you for reaching out! Would you mind sharing how you are setting up the license? Would you also share the license number(starting LIC00..) that you are using? |
Hello! Thank you for your response!
We are setting up the license as follows:
The issue appears mostly on Samsung devices. Take a look at this screenshot from Crashlytics for the last 30 days
I'm testing on a Moto G (5) Plus but I can't reproduce the error. However, if I enable StrictMode I get several strict policy violations:
LIC03000054510 |
Thank you for sharing the requested information. This is a known issue on Samsung devices and we have forwarded it to our internal teams, as soon as we have an update, we will make a follow-up here. |
Hello @giacomuzzi, Our internal teams have requested the below details in order to reproduce the crash. |
Hello @somyaguptagit , you can enable StrictMode to detect which operations shouldn't be executed on the main thread, if you keep those operations off the main thread you will fix the bug. |
Hi @somyaguptagit I have the same issue with ANR events. When initializing the Microblink SDK in the application's onCreate method. The libBlinkID.so library is being loaded in the main thread and generate ANR. |
Hello @aottonello Would you kindly reach out to Microblink Support([email protected]) with the below-requested information so we can continue troubleshooting over there? |
Description
We are experiencing ANR events when the license is set in the
Application.onCreate
callback. The ANR is triggered because the libBlinkID.so library is being loaded in the main thread. Please refer to the following stack trace for more detailsEnvironment Details
BlinkID version:
6.1.2
Device model:
multiple devices (Samsung Galaxy A51, Samsung Galaxy A50, Samsung Galaxy M31)
Device Android version:
Android 11, 12 and 13
Device ABI (processor architecture, e.g. ARMv7):
arm64-v8a
Additional information
In addition to the bug, I would like to comment that we'd prefer not to initialize Microblink in the
Application.onCreate
callback. This is because Microblink is not used every time the app is opened; on the contrary, most of the time it is not used. Instead, we'd like to initialize Microblink only when we need it. Could you provide a way to initialize the library only when needed?The text was updated successfully, but these errors were encountered: