question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configuration error

See original GitHub issue

Hi, when i try to open the scanner i get “Configuration error”

Phone: Xiaomi 9S Android: 11

Both available() and hasCameraPermission() return true

Permissions:

<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />

tns platform remove android then tns platform add android didnt help

Package.json

"@angular/animations": "~11.0.0",
"@angular/common": "~11.0.0",
"@angular/compiler": "~11.0.0",
"@angular/core": "~11.0.0",
"@angular/forms": "~11.0.0",
"@angular/platform-browser": "~11.0.0",
"@angular/platform-browser-dynamic": "~11.0.0",
"@angular/router": "~11.0.0",
"@aspnet/signalr": "^1.0.27",
"@nativescript/angular": "~11.0.0",
"@nativescript/core": "~7.1.3",
"@nativescript/theme": "~3.0.0",
"@nstudio/nativescript-checkbox": "^2.0.4",
"@triniwiz/nativescript-toasty": "^4.1.1",
"core-js": "^3.8.0",
"nativescript-barcodescanner": "^4.1.0",
"nativescript-theme-core": "^2.0.24",
"nativescript-ui-listview": "^9.1.0",
"nativescript-ui-sidedrawer": "^9.0.3",
"nativescript-websockets": "^1.5.6",
"reflect-metadata": "~0.1.12",
"rxjs": "~6.6.0",
"tslib": "~2.0.0",
"zone.js": "~0.11.1"
doScanWithBackCamera() {
    this.scan(false, true);
}

private scan(front: boolean, flip: boolean, torch?: boolean) {
    new BarcodeScanner().scan({
      formats: "QR_CODE,PDF_417",   // Pass in of you want to restrict scanning to certain types
      cancelLabel: "EXIT. Also, try the volume buttons!", // iOS only, default 'Close'
      cancelLabelBackgroundColor: "#333333", // iOS only, default '#000000' (black)
      message: "Use the volume buttons for extra light", 
      showFlipCameraButton: true,  
      preferFrontCamera: false,     
      showTorchButton: true,      
      beepOnScan: true,            
      fullScreen: true,  
      torchOn: false,
      closeCallback: function() { console.log("Scanner closed"); }, 
      resultDisplayDuration: 500, 
      orientation: "landscape",  
      openSettingsIfPermissionWasPreviouslyDenied: true previously denied
    }).then(
      function(result) {
        console.log("Scan format: " + result.format);
        console.log("Scan text:   " + result.text);
      },
      function(error) {
        console.log("No scan: " + error);
      }
    );
  }
  

HTML

<Button class="btn btn-primary btn-rounded-sm" text="OPEN" (tap)="doScanWithBackCamera()"></Button>

Thanks for any help

EDIT 1: Its seems intent.resolveActivity returns null even after removing and adding platform

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
EddyVerbruggencommented, Apr 20, 2021

Seems like the publish-script fired back at me. I’ve just published 4.1.1 which should fix the issue for both iOS and Android. Thanks for your patience!

3reactions
EmmieAndreascommented, Apr 15, 2021

Going back to nativescript-barcodescanner@4.0.1 fix the problem for me, maybe 4.1.0 only supports ns8+? After downgrading, if you are getting Cannot read property 'client' of undefined make sure to delete and add platform tns platform remove android then tns platform add android

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration error - Encyclopedia - The Free Dictionary
If "configuration error" is the actual message displayed without additional data, it is really the programmer's error. Invalid input received by any program...
Read more >
Configuration Error Messages
Issue: Configuration fails, or you receive error messages during configuration. Solution: Review the configtool_summary.log file in EPM_ORACLE_INSTANCE/ ...
Read more >
Configuration error messages - IBM
Message Cause So... CLFRO0045E: Failed to verify request. This issue is caused because of session timeout. Us... CLFRO2008E: internal error An unspecified error occurred. Ch......
Read more >
Configuration error messages - HCL Product Documentation
Message Cause So... CLFRO0045E: Failed to verify request. This issue is caused because of session timeout. Us... CLFRO2008E: internal error An unspecified error occurred. Ch......
Read more >
How to resolve configuration errors - Contact Form 7
Contact Form 7 provides Configuration Validator, which validates your contact form configurations to detect errors; this saves you from future troubles that ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found