aws-amplify / amplify-ui-swift-liveness

This repository offers a UI component for Amazon Rekognition Face Liveness, enabling developers to ensure that only authentic users, and not bad actors using spoofs, can access their services.
https://ui.docs.amplify.aws/swift/connected-components/liveness
Apache License 2.0
9 stars 20 forks source link

Race condition with captureSession #74

Closed ntnmrndn closed 10 months ago

ntnmrndn commented 10 months ago
*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** -[AVCaptureSession startRunning] startRunning may not be called between calls to beginConfiguration and commitConfiguration'
*** First throw call stack:
(0x1919c25e0 0x189ccbc00 0x1adbf0254 0x1162f4ff0 0x105ec5974 0x105ec59bc 0x116950f50 0x116952b34 0x11695564c 0x116966cd8 0x1169676cc 0x1faabe928 0x1faabea04)
libc++abi: terminating due to uncaught exception of type NSException
        DispatchQueue.global().async {
            captureSession.startRunning()
        }

Dismissing and presenting the capture session fast enough will result in race conditions around the capture session.

phantumcode commented 10 months ago

@ntnmrndn Thank you for submitting the issue. We'll investigate further and provide a fix soon.

phantumcode commented 10 months ago

Closing this as a duplicate of #68