-
-
Notifications
You must be signed in to change notification settings - Fork 546
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 'getCodewords' of null #318
Comments
Similar issue here, not sure its the same: PDF417 reader throws always the following error: |
Getting same issue too on Chrome and latest
@odahcam |
No, I was finishing the text-encoding project, so no progress in here. My next goal is to implement E2E tests for the browser layer, so we should be able to spot and fix these kind of issues. I'm a little rusty and really do not have time to debug PDF417 now, so unless there isn't possible, I would suggest some workaround. Sorry guys. Also, just to give some context, it doesn't happen with every PDF417 type, but it seems just in one. There's in fact a piece of decoding that is not implemented in the codebase because we couldn't port the entire code at the time the module was ported from Java. Now I believe it should be a lot easier (as contributors and I fixed a lot of stuff, created similar code in other parts of the project), so if anyone wants to take a shot, just open a PR and ping me. |
All good, E2E tests would point everything in the right direction and help a ton. I'll create a mininal reproduced project very soon and provide some sample PDF 417 barcodes ( sample ID cards ) that work consistently and ones that throw this error ( I have a sample barcode that throws the error, both on the video scanning method and decodeFromImage method ) so we can narrow down whats going and go from there. |
@odahcam Hey yall, i recreated a simple project that recreates the issue here: https://github.com/zacharytyhacz/zxing-pdf417-bug Also here's some sample codes that are in my test repo that we all can use to test things: This one consistently fails on an image upload to scan This one is 50/50 if it fails or successfully scans And no data get's found in this one, from both |
I am also getting the same issue. Any workarounds to resolve this? |
Also running into the same issue, getting |
@zacharytyhacz did you end up solving the issue with those cards? |
It is a simple fix in DetectionResult.ts in core/pdf417/decoder. You have to add null checks in 2-3 places. Tried to merge that but I have lot of changes from the day I changed. Not sure whether this is fixed already. I could get it to work after fixing that. |
@bradens Hey there, no I do not have a work around at the moment. @boxidilshan You are correct about that "fix", but if you test adding a null check, the scanning gets stuck in an endless loop for some images, not good. |
I did a little bit more digging and it seemed to be problems with the error correction algorithm, testing against the zxing jarfile though, it seemed like it was having problems with the same images. I was able to fix my case by getting higher quality images, which I know isn't a great fix. :| |
@boxidilshan do you still have the code with the fixes you made? |
@boxidilshan - would it be possible to post where these 'fixes' can be applied? Trying to get a POC together and this is killing me.. cheers |
Hello, any progress on this one? @odahcam |
I would like a progress update as well @odahcam I may look back into the code myself and see if I could make a PR fix, but I am just not familiar with the codebase and adjusting the OCR or whatever it uses to image-parse the data could be complicated ( I've never dealt with stuff like this, thats why Im using this library ) |
I injured my right arm and i am unable to contribute on the library for the past 4 weeks plus next 4 weeks. sorry guys, I'm doing everything I can so I heal faster. |
@odahcam Hope your arm healed up! I'm hitting this same issue as well. I'm not familiar with the code base, so if anyone has any pointers as to where/what the "fixes" are, I'd appreciate it. |
hello @outprove , I am planning on taking a look this weekend to hopefully find a fix and create a PR. the code is actually pretty organized and there are tests. If you have a reproduce-able issue project, that will help a lot |
Describe the bug
PDF417 reader throws the error below sometimes (I would say 50% chance) when barcode gets presented to the camera.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should not throw a TypeError exception when barcode is presented.
Screenshots
Code used:
Error:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: