zxing-js / ngx-scanner

Angular QR code, Barcode, DataMatrix, scanner component using ZXing.
https://zxing-js.github.io/ngx-scanner/
MIT License
639 stars 227 forks source link

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

Open anbaran opened 3 months ago

anbaran commented 3 months ago

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:

werthdavid commented 3 months ago

Hm the only thing that happened from 17.0.1 to 17.0.2 is #557 which should do a proper cleanup... can you post the whole stacktrace?

anbaran commented 3 months ago

Hm the only thing that happened from 17.0.1 to 17.0.2 is #557 which should do a proper cleanup... can you post the whole stacktrace?

Hello David

Thank you for looking into this issue. Below I paste you the console output from the device and the obfuscated part of your code from the suspected area. It is hard to read the stacktrace because it is obfuscated code but I hope it will give you an idea of what going on under the hood is. If you need any more information, let me know

image

Screenshot from 2024-07-03 09-43-04

werthdavid commented 2 months ago

plz test 18.0.1

anbaran commented 2 months ago

plz test 18.0.1

Hello, Thanks for reacting to that. I have just tried it out but unfortunately I still get the error when stopping scanner, below the log file.

setPhotoOptionsFailed.log