Skip to content

InvalidLicenceKeyException #46

@Javimay

Description

@Javimay

Hi Microblink Team!

I have implemented the PDF417 module in my application for a month and it worked perfectly with a DEMO license, however, today, the InvalidLicenceKeyException has started to come out. I already verified in the console and the license is valid until September 22 (9 days of validation). This exception is coming out in the following line:

ActivityRunner.startActivityForResult (this, MICROBLINK_SCAN_REQUEST, settings);

The call to the startActivityForResult method of the ActivityRunner class is in a Try and Catch getting the exception InvalidLicenceKeyException but the error is not recovering.

try {
mRecognizer = new Pdf417Recognizer();
mRecognizerBundle = new RecognizerBundle(mRecognizer);
startScanning();
} catch (InvalidLicenceKeyException microblinkException) {
LogUtil.error(TAG,"Microblink licence error: " + microblinkException.getMessage());
Toast.makeText(getContext(), "La licencia de Microblink no es valida.", Toast.LENGTH_SHORT).show();
microblinkException.printStackTrace();
} catch (Exception e){
e.printStackTrace();
}

private void startScanning(){
BarcodeUISettings settings = new BarcodeUISettings(mRecognizerBundle);
settings.setShowDialogAfterScan(false);
settings.setSplashScreenLayoutResourceID(0);

    ActivityRunner.startActivityForResult(this, MICROBLINK_SCAN_REQUEST, settings);
}

Now, the application stops with the following error.

Process: co.qoopa.lupaap, PID: 10620
java.lang.RuntimeException: Unable to start activity ComponentInfo{co.qoopa.lupaap/com.microblink.activity.BarcodeScanActivity}: com.microblink.recognition.InvalidLicenceKeyException: Please set valid license key before creating RecognizerRunnerView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2747)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2808)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:165)
at android.app.ActivityThread.main(ActivityThread.java:6365)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:883)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
Caused by: com.microblink.recognition.InvalidLicenceKeyException: Please set valid license key before creating RecognizerRunnerView
at com.microblink.view.recognition.RecognizerRunnerView.llIIIlllll(line:135)
at com.microblink.view.recognition.RecognizerRunnerView.(line:128)
at com.microblink.fragment.RecognizerRunnerFragment.IlIllIlIIl(line:265)
at com.microblink.fragment.RecognizerRunnerFragment.onCreateView(line:218)
at android.app.Fragment.performCreateView(Fragment.java:2352)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:995)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
at android.app.BackStackRecord.run(BackStackRecord.java:815)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1580)
at android.app.FragmentController.execPendingActions(FragmentController.java:371)
at android.app.Activity.performStart(Activity.java:6877)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2710)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2808) 
at android.app.ActivityThread.-wrap12(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:165) 
at android.app.ActivityThread.main(ActivityThread.java:6365) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:883) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773) 

For me this is a very critical error because I can not capture this exception and the app is closing even verifying that the time of the license is still valid.
I appreciate any information that I can implement to solve this error.

Thanks!!

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions