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

Cannot read property 'raw' of null #8

Open
rena2019 opened this issue Feb 24, 2022 · 1 comment
Open

Cannot read property 'raw' of null #8

rena2019 opened this issue Feb 24, 2022 · 1 comment

Comments

@rena2019
Copy link

Hi,
I tried your package with the following code:

const uic = require('uic-918-3');
// https://braweria.de/wp-content/uploads/2020/10/HVV-Card-Detail-und-Hinzufuegen.png
const image = "HVV-Card-Detail-und-Hinzufuegen.png";
uic.readBarcode(image).then((ticket)=>{
console.log(JSON.stringify(ticket, null, 4));
});

but it fails with
(node:3051) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'raw' of null
at fixZXING (/root/node_modules/uic-918-3/index.js:20:68)

what's wrong?

@seveneleven
Copy link

The problem here is, that the underlying library could not find a barcode and therefore returned null. This case is not handled properly.

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