aws-amplify / amplify-ui-android

Amplify UI for Android is a collection of accessible, themeable, performant Android components that can connect directly to the cloud.
https://ui.docs.amplify.aws
Apache License 2.0
13 stars 7 forks source link

Some Users Unable to Continue #175

Closed raghedmalaeb closed 1 month ago

raghedmalaeb commented 1 month ago

Before opening, please confirm:

Language and Async Model

Kotlin

Amplify Categories

Not applicable

Gradle script dependencies

```groovy // Put output below this line implementation 'com.amplifyframework.ui:liveness:1.2.6' implementation 'com.amplifyframework:aws-auth-cognito:2.19.1' ```

Environment information

``` # Put output below this line Kotlin: 1.8.10 Groovy: 3.0.13 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 1.8.0_391 (Oracle Corporation 25.391-b13) OS: Windows 10 10.0 amd64 ```

Please include any relevant guides or documentation you're referencing

https://docs.aws.amazon.com/rekognition/latest/APIReference/API_rekognitionstreaming_StartFaceLivenessSession.html

Describe the bug

When a user opens the SDK, the video freezes and then the scanning starts even though their face is not in the oval. After checking the logs, we found the following exception that we sent as a JSON string: "{\"throwable_cause\":\"ValidationException(message=End video event received before first valid video event.)\",\"throwable_message\":\"An error occurred during the face liveness flow.\",\"exception_message\":\"An error occurred during the face liveness flow.\",\"recovery_suggestion\":\"See attached exception for more details.\"}"

Reproduction steps (if applicable)

The issue has been reported on the following devices: Huawei 30 Pro, Huawei p 20 pro

Code Snippet

// Put your code below this line.

Log output

``` // Put your logs below this line ```

amplifyconfiguration.json

No response

GraphQL Schema

```graphql // Put your schema below this line ```

Additional information and screenshots

No response

tylerjroach commented 1 month ago

Hi @raghedmalaeb

We've previously spent a considerable amount of time on this issue previously and have determined that some Huawei devices and OS combinations have faulty vp8 encoder implementations. The Liveness library encodes library in VP8 and packages in the WebM format.

It appears that the encoder enters a faulty state and dies. Many times, a simple device restart resolves the issue for customers (an app restart is not enough) Because this is a device specific bug, there is nothing that we can do to work around the encoder failing to write VP8.

We recently enabled VP9 support on the service side, as we determined that these specific devices do come with VP9 encoders that don't appear to face the same problem. I have a custom branch where this work was being tested here: https://github.com/aws-amplify/amplify-ui-android/tree/tjroach/vp9-testing.

VP9 has not been extensively tested on our end, and we want to keep VP8 support as the default as it is well tested, and is the most available/compatible format when compared to VP9. We're a bit hesitant to start writing if/else logic to work around specific manufacturer/device issues.

If this issue continues to be a concern, please reach out to us via your Liveness support contact and we can open up a ticket to present options at this time.

github-actions[bot] commented 1 month ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.