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

Firefox - TypeError: track.getCapabilities is not a function

Open Cristian-Latartara opened this issue 3 years ago • 2 comments

Describe the bug Using camera on Dev Tools appear TypeError: track.getCapabilities is not a function but everything works seemingly fine

Angular CLI

@angular-devkit/architect 0.1202.15 @angular-devkit/build-angular 12.2.15 @angular-devkit/core 12.2.15 @angular-devkit/schematics 12.2.15 @angular/cdk 12.2.13 @angular/material 12.2.13 @schematics/angular 12.2.15 rxjs 6.6.7 typescript 4.3.5

@zxing/ngx-scanner version

"@zxing/browser": "0.0.10", "@zxing/library": "0.19.1", "@zxing/ngx-scanner": "3.4.0",

To Reproduce Use the camera

Expected behavior No errors in devtools

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Firefox
  • Version 96.0.1 (64 bit)

Additional context Add any other context about the problem here.

Cristian-Latartara avatar Jan 18 '22 12:01 Cristian-Latartara

Hello, any news on this please ?

That's quite annoying to get this issue logged in sentry, even if everything seems to work as expected. I can help if needed, just let me know :)

Thank you !

lakhalkarim avatar Mar 21 '22 10:03 lakhalkarim

Not a maintainer of zxing-js, but I also came across this.

Here in @zxing-js/browser is where the console error is emitted. There should be a warning in the console immediately after the error. It states:

Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available.

Seems like this function doesn't handle FF not supporting the getCapabilities function, but you can ignore the error if you don't use a flashlight/torch.

nolanshah avatar Apr 06 '22 02:04 nolanshah