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

Crash after scanning #171

Open
jcbdev opened this issue Jan 1, 2021 · 5 comments
Open

Crash after scanning #171

jcbdev opened this issue Jan 1, 2021 · 5 comments
Assignees

Comments

@jcbdev
Copy link

jcbdev commented Jan 1, 2021

I have an issue with the react-native module on an ios device.

Sometimes I can scan a document once but every time after that (and sometime the first time) I get the follow error EXC_BAD_ACCESS as is in the following screenshot

Screenshot 2021-01-01 at 19 45 27

I suspect this is something to do with the lifecycle of functional react-native components. Any idea why this could be occurring?

Thanks.

EDIT

More info - works fine on android but not iphone device. Tested with react-native v0.63.2 and v0.63.4 and BlinkId 5.6.0 and 5.9.0 and same issue.

@juraskrlec
Copy link
Member

Hi @jcbdev

can you please tell me are you getting this on our sample app or do you have your own implementation and if that's the case, can you please tell us your steps to reproduce it? Do you have maybe some small sample where we can see what's going on? I am testing this with our sample app, and I am not able do get this error.

Thanks.

@jcbdev
Copy link
Author

jcbdev commented Jan 16, 2021

For me it's doing it on a newly created react-native project on a real ios mobile device. I can try and put a repro together (but I have major time constraints at the moment) but essentially if you create a new react-native project. Add blink and then call the scanner from a page with the following code

// eslint-disable-next-line react/prefer-stateless-function
class Scanner extends React.Component {
  constructor(props) {
    super(props);
  }

  async scan() {
    const mrtdCombinedRecognizer = new BlinkIDReactNative.MrtdCombinedRecognizer();
    mrtdCombinedRecognizer.returnFullDocumentImage = true;
    mrtdCombinedRecognizer.returnFaceImage = true;

    const passportRecognizer = new BlinkIDReactNative.PassportRecognizer();
    passportRecognizer.returnFullDocumentImage = true;
    passportRecognizer.returnFaceImage = true;

    // BlinkIDCombinedRecognizer automatically classifies different document types and scans the data from
    // the supported document
    const blinkIdCombinedRecognizer = new BlinkIDReactNative.BlinkIdCombinedRecognizer();
    blinkIdCombinedRecognizer.returnFullDocumentImage = true;
    blinkIdCombinedRecognizer.returnFaceImage = true;

    const scanningResults = await BlinkIDReactNative.BlinkID.scanWithCamera(
      new BlinkIDReactNative.DocumentVerificationOverlaySettings({
        enableBeep: true,
      }),
      new BlinkIDReactNative.RecognizerCollection([passportRecognizer, mrtdCombinedRecognizer, blinkIdCombinedRecognizer]),
      licenseKey,
    );

    return scanningResults;
  }

  render() {
    return <></>;
  }
}

Every time I do this then I get the error above when I scan on an iphone 10x and iphone 10xs. (ios 13)

@mparadina
Copy link
Contributor

Hi @jcbdev

Do you maybe have any additional steps that you did along the way, or these steps mentioned above are the only ones you need to reproduce the issue?

Also, just to double-check, do you get the same behavior with our sample application when you try to run it?

Regards,
Milan

@jcbdev
Copy link
Author

jcbdev commented May 9, 2021

Did you try this on a real ios device? It still happens for me event with the sample project.

@mparadina
Copy link
Contributor

Hi @jcbdev

Does the issue also happen when you only leave the BlinkIdCombinedRecognizer in the RecognizerCollection?

We recommend only using the BlinkID recognizer in this configuration since both the Passport and MRTD recognizers have been deprecated since version 5.8.0. Therefore, it is advised to use the BlinkID recognizer instead.

Regards,
Milan

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

3 participants