ngx-scanner
ngx-scanner copied to clipboard
Cannot read property 'stop'
Describe the bug Even after a fresh installation after starting the scanner it works for around 3 Seconds and than stops working. In the console i can see this error message
zxing scanner component: TypeError TypeError: Cannot read property 'stop' of undefined
at zxing-ngx-scanner.js:56
at loop (BrowserCodeReader.js:1108)
at BrowserMultiFormatContinuousReader.push.1M1C.BrowserCodeReader.scan (BrowserCodeReader.js:1125)
at BrowserMultiFormatContinuousReader.
Steps to reproduce the behavior:
- Install Scanner
- Import scanner
- serve application
- try to access Scanner
- get Error
Desktop (please complete the following information):
- OS: Windows 10
- Browser Chrome
- Version 90.0.4430.93
Having the exact same issue. Scanner worked fine until a few weeks ago, and then it suddenly stopped to work
I have the same problem, but it seems that it is working on any other browser besides of Chome. Seems like it is a Problem with Angular 11 and Chrome.
EDIT: Got the Camera running by downgrading the "@zxing/browser" and "@zxing/library" like mentioned here: https://github.com/zxing-js/ngx-scanner/issues/380#issuecomment-827356386
.... unfortunately the detection quality is very ...well ... "wobbly"...
"@zxing/browser": "0.0.7", "@zxing/library": "^0.18.3",
This may be fixed by https://github.com/zxing-js/browser/pull/53.
try "@zxing/browser": "^0.0.9", "@zxing/library": "^0.18.6", "@zxing/ngx-scanner": "^3.2.0"
It works fine with those versions
Having this exact issue on windows for angular 14 "@zxing/ngx-scanner": "3.6.0" "@zxing/browser": "^0.1.1", "@zxing/library": "^0.19.1"