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

DOMException: setPhotoOptions failed when stoping scanner after upgrade from v17.0.1 to 17.0.2 or above

Open anbaran opened this issue 1 year ago • 5 comments

I have recently upgraded @zxing/ngx-scanner from v17.0.1 to 17.0.2 (or above the same error occurs as well) and as soon as the scanner is stopped by either calling scanStop() or enabled = false or removing component from DOM then the error DOMException: setPhotoOptions failed appears in the console.

I noticed the following things:

  • it does not occur in v17.0.1 but in versions above
  • it does not occur in browser but on devices both Android & iOS (cordova hybrid app i.e. webapp packed for device)
  • it seams like the difference between browser and device is torch , in browser not available , on device available
  • dependent zxing libraries are in versions: "@zxing/browser": "0.1.5", "@zxing/library": "0.21.1",

anbaran avatar Jun 21 '24 15:06 anbaran