ngx-scanner icon indicating copy to clipboard operation
ngx-scanner copied to clipboard

Cannot read property 'stop'

Open MisterSleider opened this issue 3 years ago • 5 comments

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. (BrowserCodeReader.js:705) at step (BrowserCodeReader.js:43) at Object.next (BrowserCodeReader.js:24) at fulfilled (BrowserCodeReader.js:15) at ZoneDelegate.invoke (zone-evergreen.js:364) at Object.onInvoke (core.js:28301) at ZoneDelegate.invoke (zone-evergreen.js:363) dispatchScanError @ zxing-ngx-scanner.js:486

Steps to reproduce the behavior:

  1. Install Scanner
  2. Import scanner
  3. serve application
  4. try to access Scanner
  5. get Error

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 90.0.4430.93

MisterSleider avatar May 03 '21 07:05 MisterSleider

Having the exact same issue. Scanner worked fine until a few weeks ago, and then it suddenly stopped to work

StefanKern avatar May 05 '21 07:05 StefanKern

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",

deskaria avatar May 06 '21 12:05 deskaria

This may be fixed by https://github.com/zxing-js/browser/pull/53.

PadraigGalvin avatar Jun 13 '21 23:06 PadraigGalvin

try "@zxing/browser": "^0.0.9", "@zxing/library": "^0.18.6", "@zxing/ngx-scanner": "^3.2.0"

It works fine with those versions

Kratheon avatar Jun 24 '21 15:06 Kratheon

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"

neeraj-vts avatar Sep 06 '23 09:09 neeraj-vts