blinkid-in-browser icon indicating copy to clipboard operation
blinkid-in-browser copied to clipboard

"Missing video feed" error thrown in recognitionLoop are not always caught

Open sveres opened this issue 3 years ago • 9 comments

Hi,

We've tried enabling barcode reading via the camera feed but run into some issues on production.

We saw a lot of "Uncaught (in promise): Error: Missing video feed!\nError: Missing video feed!" unhandled errors.

It seems to me that the "Missing video feed" error thrown in VideoRecignozer's recognitionLoop method is not handled properly sometimes. https://github.com/BlinkID/blinkid-in-browser/blob/6b2af6dcaba91006de70b7ec7a8b2905e987fa9e/src/MicroblinkSDK/VideoRecognizer.ts#L551

As far as I can see there are 3 calls to this method and only one of them handles the error, in the two other cases, the recognitionLoop is called within a setTimeout. In this case the error cannot be caught and processed properly. e.g. https://github.com/BlinkID/blinkid-in-browser/blob/6b2af6dcaba91006de70b7ec7a8b2905e987fa9e/src/MicroblinkSDK/VideoRecognizer.ts#L598

Can you confirm that this is the case or do we miss something and there is a way to handle this outcome?

sveres avatar May 17 '21 09:05 sveres

Hi @sveres,

Thank you for the report.

Could you clarify what you mean by "enabling barcode reading"? Does that mean that you're using the IdBarcodeRecognizer, or you're enabling specific options on the BlinkIdRecognizer?

Regardless of your use case, we're going to look into the error handling system of the VideoRecognizer class to ensure that it can properly handle all errors.

Sincerely, Vjekoslav

vjekoart avatar May 18 '21 13:05 vjekoart

Hi @vjekoart,

What I meant is we already use IdBarcodeRecognizer in our app for uploaded images and in a recent release we wanted to enable the same for video feed. Hope that makes sense. I am happy to provide any more info if something is not clear.

Please let me know when will have an ETA.

sveres avatar May 19 '21 07:05 sveres

Hi @sveres,

Thank you for the information. I think that is all we need to try and reproduce the issue.

After we can consistently reproduce the issue and find the root cause, we'll be able to make an ETA. That should happen during the next week.

Also, we'll communicate the progress of #46 and #47 in this issue since it looks like they are all related.

Sincerely, Vjekoslav

vjekoart avatar May 19 '21 08:05 vjekoart

Hi @sveres,

Just letting you know that we're working on a solution, and we're going to publish a hotfix release. We're targeting to solve this problem by the end of the week.

Sincerely, Vjekoslav

vjekoart avatar May 31 '21 08:05 vjekoart

Hi @vjekoart ,

Thanks for letting me know, we can't wait to get the fix :)

sveres avatar May 31 '21 09:05 sveres

Hi @vjekoart, do you have any updates on this one? Thanks, Mark

mburrett-jumio avatar Jun 11 '21 07:06 mburrett-jumio

Hi @mburrett-jumio,

We're currently working on this problem. The current estimation is that we should solve this issue sometime this week or in the worst-case scenario during the next week.

Sincerely, Vjekoslav

vjekoart avatar Jun 14 '21 15:06 vjekoart

Hi @sveres, @mburrett-jumio,

We've released a new version of BlinkID, 5.12, in which we changed the logic regarding error handling in VideoRecognizer class.

We've managed to catch all errors with the new mechanisms. Could you make the update on your side and test out the latest version to see if everything is working as expected?

Sincerely, Vjekoslav

vjekoart avatar Jun 29 '21 10:06 vjekoart

Hi @vjekoart ,

We will start to upgrade and the testing soon. Although https://github.com/BlinkID/blinkid-in-browser/issues/52 might block us from releasing, unless we can find a solution either within our implementation or as a new feature.

I took a look at the changes and it seems promising, thank you. We will get back to you once we had the chance to try it out.

sveres avatar Jun 29 '21 11:06 sveres