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

License expired crashes app #12

Open
tubibuto opened this issue Nov 5, 2024 · 4 comments
Open

License expired crashes app #12

tubibuto opened this issue Nov 5, 2024 · 4 comments

Comments

@tubibuto
Copy link

tubibuto commented Nov 5, 2024

We have the issue where we can't properly catch the exception coming from native code in our Javascript code and it results in the App crash.

2024-11-05 16:10:04.274 24961-2439  line:54                 com.taptapsend.debug                 E  License has expired on 2024-11-03
2024-11-05 16:10:04.276 24961-2439  unknown:ReactNative     com.taptapsend.debug                 E  Exception in native call
                                                                                                    com.microblink.blinkcard.licence.exception.InvalidLicenceKeyException: License has expired on 2024-11-03
                                                                                                    	at com.microblink.blinkcard.licence.LicenceManager.llIIlIlIIl(line:19)
                                                                                                    	at com.microblink.blinkcard.licence.LicenceManager.IllIIIllII(line:2)
                                                                                                    	at com.microblink.blinkcard.MicroblinkSDK.setLicenseKey(line:2)
                                                                                                    	at com.microblink.blinkcard.reactnative.MicroblinkModule.setLicense(MicroblinkModule.java:243)
                                                                                                    	at com.microblink.blinkcard.reactnative.MicroblinkModule.prepareScanning(MicroblinkModule.java:175)
                                                                                                    	at com.microblink.blinkcard.reactnative.MicroblinkModule.scanWithCamera(MicroblinkModule.java:78)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
                                                                                                    	at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
                                                                                                    	at com.facebook.jni.NativeRunnable.run(Native Method)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:938)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:226)
                                                                                                    	at android.os.Looper.loop(Looper.java:313)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
@somyaguptagit
Copy link

Hello, thank you for reaching out!
Could you please share the license number(starting LIC0..) with us so that we can inspect it and check its validity?
You can find it in the developer hub portal.

@tubibuto
Copy link
Author

tubibuto commented Nov 6, 2024

Hello, thank you for reaching out! Could you please share the license number(starting LIC0..) with us so that we can inspect it and check its validity? You can find it in the developer hub portal.

@somyaguptagit It was trial license which did expire. I think the best course of action for this issue would be to actually reject promise if this part of the code responsible for license check fails. This way RN developer on JS side would be able to properly handle this new LICENSE_ERROR type and prevent app from crashing.

What do you think?

@somyaguptagit
Copy link

Hello @tubibuto
Thank you for your response!
In order for our SDK to work properly, you need a valid license key so that you don't encounter any issues running it.
However, we would kindly request you to contact us at [email protected] so that we can assist you further.

@tubibuto
Copy link
Author

tubibuto commented Nov 6, 2024

Hello @tubibuto Thank you for your response! In order for our SDK to work properly, you need a valid license key so that you don't encounter any issues running it. However, we would kindly request you to contact us at [email protected] so that we can assist you further.

@somyaguptagit I understand that and we updated the license with valid key, however we'd like to be able to have more control over unexpected errors coming form BlinkCard SDK side - for instance:

  • License expiring
  • License API failing

Currently if the license check code throws an exception, our app will crash since you don't reject promise in native code meaning we can't properly do error handling.

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