Anyline / anyline-ocr-react-native-module

Anyline React Native Module for iOS and Android
https://anyline.com/
Other
107 stars 34 forks source link

Unable to get result for Driver License Scan #73

Closed ghost closed 2 years ago

ghost commented 5 years ago

Here are my dependencies:-

"react": "16.8.6", "react-native": "0.60.4", "anyline-ocr-react-native-module": "^12.1.0",

The app is showing Anyline OCR UI with scanner but did not getting any response. Only showing camera nothing is happening in the app. Note- I'm using free demo license.

I have followed the instruction from Anyline OCR Readme file.

JonasLaux commented 5 years ago

Hey, sorry for the late response. Is there any Log you could provide? Which platform are you on? Which Config do you use? How did you implement Anyline?

ghost commented 5 years ago

Hey @JonasLaux , Here find the sample code of the OCR implementation. configuration file of driver license =>

export default { license: "demo license", options: { camera: { captureResolution: '1080p', }, flash: { mode: 'manual', alignment: 'bottom_left', }, viewPlugin: { plugin: { id: 'DRIVING_LICENSE', idPlugin: { drivingLicenseConfig: { scanMode: 'AUTO', }, }, }, cutoutConfig: { style: 'rect', maxWidthPercent: '99%', maxHeightPercent: '99%', alignment: 'center', offset: { x: 1, y: 0, }, ratioFromSize: { width: 134, height: 85, }, strokeWidth: 2, cornerRadius: 4, strokeColor: 'FFFFFF', outerAlpha: 0.3, outerColor: '000000', feedbackStrokeColor: '0099FF', }, scanFeedback: { style: 'CONTOUR_POINT', strokeColor: '0099FF', strokeWidth: 2, blinkOnResult: true, beepOnResult: true, vibrateOnResult: true, blinkAnimationOnResult: true, }, cancelOnResult: true, }, }, };

Here is OCR code =>

try { const result = await AnylineOCR.setupPromise(JSON.stringify(DrivingLicenseConfig), 'scan'); this.setState({ buttonsDisabled: false });

  const data = JSON.parse(result);
  LayoutAnimation.easeInEaseOut();
  const fullImagePath = data.fullImagePath;
  const imagePath = data.imagePath;
  delete data.fullImagePath;
  delete data.imagePath;

  this.setState({
    hasScanned: true,
    result: data,
    imagePath,
    fullImagePath,
  });
} catch (error) {
  if (error !== 'Canceled') {
    console.log(error);
  }
}

I am testing it on iOS. I haven't received any log at all form OCR.

JonasLaux commented 5 years ago

Thanks for providing the informations. Because our Plugin is just a Wrapper around our native SDK (which has heavy native dependencies), we would need the native Log (not JS log) to give you more support on this one. For receiving native Logs, please go into your apps folder to ios/ and open the "myProject.xcworkspace" with XCode. If you start the App via Xcode you should receive the native logs. Thanks!

ghost commented 5 years ago

Hello @JonasLaux Thanks for quick reply, Here find the native iOS log for OCR

MyProject[2061:336347] AnylineSDK Version 12.1 (1413) WARNING: This license is valid until: 2019-09-26 MyProject[2061:336347] [MC] Reading from public effective user settings. MyProject[2061:337689] TIC Read Status [5:0x283c0a880]: 1:57 MyProject[2061:337689] TIC Read Status [5:0x283c0a880]: 1:57 MyProject[2061:337689] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C5.1:2][0x104c66490] get output frames failed, state 8196 MyProject[2061:337689] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C5.1:2][0x104c66490] get output frames failed, state 8196 MyProject[2061:337689] TIC Read Status [5:0x0]: 1:57 MyProject[2061:337689] TIC Read Status [5:0x0]: 1:57 MyProject[2061:337689] TIC Read Status [5:0x0]: 1:57 MyProject[2061:337689] TIC Read Status [5:0x0]: 1:57 MyProject[2061:336347] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service MyProject[2061:336347] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service

berndkamplanyline commented 2 years ago

We don't actively monitor the Github Issues, please raise a support request using the Anyline Helpdesk. Link to Anyline Helpdesk: https://anyline.atlassian.net/servicedesk/customer/portal/2/group/6

When raising a support request based on this Github Issue, please fill out and include the following information:


Support request concerning Anyline Github Repository: [URL to relevant Anyline Github Repository here] Support request based on Github Issue: [URL to relevant Github Issue here]


Thank you so much!