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.

Cannot read properties of undefined (reading 'stop')

See original GitHub issue

Bug, feature request, or proposal:

What is the current behavior?

Following the https://github.com/zxing-js/ngx-scanner/wiki/Getting-Started doc

When put the <zxing-scanner></zxing-scanner>

-The browser request permissions -The webcam light on macbook pro starts -Black screen appears on browser

Then the inspector console returns:

zxing-ngx-scanner.js:486 zxing scanner component: TypeError TypeError: Cannot read properties of undefined (reading 'stop')
    at zxing-ngx-scanner.js:56
    at loop (BrowserCodeReader.js:1108)
    at BrowserMultiFormatContinuousReader.BrowserCodeReader.scan (BrowserCodeReader.js:1125)
    at BrowserMultiFormatContinuousReader.<anonymous> (BrowserCodeReader.js:705)
    at step (BrowserCodeReader.js:43)
    at Object.next (BrowserCodeReader.js:24)
    at fulfilled (BrowserCodeReader.js:15)
    at ZoneDelegate.invoke (zone.js:372)
    at Object.onInvoke (core.js:28672)
    at ZoneDelegate.invoke (zone.js:371)

Which versions of Angular, ngx-scanner, OS, TypeScript, browsers are affected?

Mac OSX Big Sur
Safari browser

@zxing/browser@0.0.9
@zxing/library@0.18.3
@zxing/ngx-scanner@3.2.0

"@angular/common": "12.2.1",
"@angular/compiler": "12.2.1",
"@angular/core": "12.2.1",
"@angular/forms": "12.2.1",
"@angular/platform-browser": "12.2.1",
"@angular/platform-browser-dynamic": "12.2.1",

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
marikamokucommented, Oct 7, 2021

I had the same issue on Mac OSX Big Sur on Chrome, changing “@zxing/library” from “^0.18.3” to “^0.18.6” worked for me

"@zxing/browser": "^0.0.9",
"@zxing/library": "^0.18.6",
"@zxing/ngx-scanner": "^3.2.0"
0reactions
rvalitovcommented, Oct 13, 2021

I updated the docs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
[Solved] Cannot read Properties of Undefined in JavaScript
The "Cannot read properties of undefined" error occurs when you try to access a property or a method on a variable that stores...
Read more >
TypeError: Cannot read properties of undefined (reading 'id')
I got the error "Cannot read properties of undefined (reading 'spec')" when attempting to install a local npm module with npm install [path ......
Read more >
Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >
throw `Cannot read properties of undefined (reading 'stop')` on ...
throw Cannot read properties of undefined (reading 'stop') on component unmount, and use nested watch. #5783 · A workaround has been found to ......
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