Cannot read property 'x' of null
See original GitHub issueI get this error from this line: https://github.com/ericblade/quagga2/blob/156938f0a83935744c375ad235c2d16dd06fb3f7/src/locator/barcode_locator.js#L58
It looks like _patchSize
can be null
. I would create a PR to fix this but I’m not sure what you want to happen in the case that _patchSize
is null
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property of null - iDiallo
This error occurs when you read a property or call a method on a null object . That's because the DOM API returns...
Read more >Can't solve "Can't read property X of null" error - Stack Overflow
Basically the message says that null (as in, no object ref) does not have a property or method 'appendChild', which is obvious, because...
Read more >TypeError: Cannot read property x of null - Codefresh
Symptoms When attempting to start a build, you receive the error TypeError: Cannot read property 'x' of null, where x is usually title,......
Read more >Uncaught TypeError: Cannot read property 'x' of null #867
It seems to happen when you have a symbol that you scale to zero, and then have an onClick handler on another element....
Read more >Uncaught TypeError: Cannot read property of undefined In
This error occurs in Chrome Browser when you read a property or call a method on an undefined object . There are a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I queued the call to
init
so if the button is pressed three times in quick succession the first press will callinit
the second press will be queued to be called after the first finishes and the third press will replace the second in the queue since the first one hadn’t finished yet and cancel the secondinit
. Once the firstinit
is done I runstop
since there is another one queued and the third press will be executed.Here is the code I used to do that:
Good find. I’m still not sure if that should throw an error or if it should just pass all 0’s to the remainder of the function. I’ve been spending most of my programming time on other projects but I’ll do some thinking / research on this one and see what i can find. i know there’s already an issue to investigate spamming start/stop potentially causing problems, which this seems like it would be related to.
can you share what your fix in your code involved?