Hi there,
I’m using the Barcode & QR Code Reader plugin (latest version installed), and I’ve run into a consistent issue that seems related to its initialization.
I have two buttons in my app:
- One to Start Scanning
- One to Stop Scanning
The scanning works perfectly once it’s up and running.
However, the first time I open the page and trigger the “Start Scanning” action, the plugin throws the following error:
TypeError: Cannot destructure property ‘deviceId’ of ‘a.data[…]’ as it is undefined.
To get around this, I have to manually click Stop Scanning and then Start Scanning again. After doing that, the scanner works smoothly and reliably for the rest of the session — as long as the page remains open.
But if I reload or reopen the page, the issue returns again on the first scan attempt. So basically, it only works after I intentionally cause the error, stop the scanner, and start it again.
My app is already using the latest version of the plugin (v1.69.0). I’d appreciate any help in resolving this, or suggestions on how to prevent the scanner from erroring on first launch after page load.
Thanks in advance!