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
8 stars 18 forks source link

AVAsset Crash [AVAssetWriter finishWritingWithCompletionHandler:] Cannot call method when status is 2' #99

Closed MRJYL closed 5 months ago

MRJYL commented 5 months ago

erminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetWriter finishWritingWithCompletionHandler:] Cannot call method when status is 2

phantumcode commented 5 months ago

@MRJYL Thanks for submitting your issue. Can you provide detail steps to help us investigate and reproduce the issue? Additionally, what iOS version and device are you seeing this issue in? Is this a native iOS app or a ReactNative or Flutter app? Is it possible for you to provide a sample app?

MRJYL commented 5 months ago

We notice that the "finishWritingWithCompletionHandler" was called twice in a short time,native iOS app

phantumcode commented 5 months ago

@MRJYL Can you provide detailed steps to reproduce? Is this occurring on all iOS versions or devices? Is it possible for you to provide a sample app?

phantumcode commented 5 months ago

@MRJYL We have not been able to reproduce this issue. It would be helpful if you can provide detailed steps on to reproduce and a sample app to help understand how you are integrating and using the component.

phantumcode commented 5 months ago

Issue fixed in v1.2.5

MRJYL commented 4 months ago

I'm not sure this fix will work, the value of state always be . awaitingSingleFrame. image

MRJYL commented 4 months ago

Maybe if assetWriter.status != .completed {...} shoud be used here, I notice the state always be .awaitingSingleFrame here, It doesn't work as expected. @phantumcode