-
-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing callback on error in decodeFromInputVideoDevice #175
Comments
I can confirm this behavior once I experienced it lots of times in recently. I'm sorry I couldn't fix it yet, I'm pretty out of time. |
Right now I have a manual workaround that takes this code ngx-scanner/src/app/modules/zxing-scanner/browser-code-reader.ts Lines 143 to 146 in 8ff38b6
and add catch (err) {
/* handle the error, or not */
console.error(err);
callbackFn();
} Is that a sufficient fix for you? |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
2 similar comments
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Where there is an issue inside
decodeFromInputVideoDevice
, the error is not propagate up via scanFailure observable, this leave the library user in undefined state without any option to recoverhttps://github.com/zxing-js/ngx-scanner/blob/master/src/app/modules/zxing-scanner/browser-code-reader.ts#L143-L146
This came up when testing on iPad which (for some reason known only to apple) doesn't like to use the back ("environment") camera
To Reproduce
OverconstrainedError { message: "Invalid constraint", constraint: "deviceId" }
Expected behavior
The library user should receive an error via scanFailure observable
Smartphone
Device: Apple iPad Mini 2
OS: 12.1.4
Browser: Safari
Version: 12
The text was updated successfully, but these errors were encountered: