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

Error thrown in FrameCapture.captureFrame is not handled

Open sveres opened this issue 3 years ago • 0 comments

Hi,

This issue relates to https://github.com/BlinkID/blinkid-in-browser/issues/45 and because of that, we cannot handle/react to the error properly.

How to reproduce the the error, is not yet completely clear to us, we speculate that there might be a timing/rendering/api issue with videoWidth and the play() event. However we would like to at least handle the issue more gracefully, rather than throwing an unhandled error.

We see the following unhandled errors with the message:

Uncaught (in promise): Uncaught (in promise): IndexSizeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0.

We get this only in case we use the VideoRecognizer.

https://github.com/BlinkID/blinkid-in-browser/blob/6b2af6dcaba91006de70b7ec7a8b2905e987fa9e/src/MicroblinkSDK/FrameCapture.ts#L76

sveres avatar May 17 '21 11:05 sveres