Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FaceLivenessDetector crashs on Android15 ( with 16kb page size support) #161

Open
2 tasks done
vegeta2102 opened this issue Jun 17, 2024 · 6 comments
Open
2 tasks done
Labels
feature-request New feature or request liveness This issue relates to the Liveness component

Comments

@vegeta2102
Copy link

vegeta2102 commented Jun 17, 2024

Before creating a new issue, please confirm:

Which UI component?

Liveness

Gradle script dependencies

amplify-ui-liveness = { group = "com.amplifyframework.ui", name = "liveness", version.ref = "amplifyUi" }
amplifyUi = "1.2.1"

Environment information

Welcome to Gradle 8.6!

Here are the highlights of this release:
 - Configurable encryption key for configuration cache
 - Build init improvements
 - Build authoring improvements

For more details see https://docs.gradle.org/8.6/release-notes.html


------------------------------------------------------------
Gradle 8.6
------------------------------------------------------------

Build time:   2024-02-02 16:47:16 UTC
Revision:     d55c486870a0dc6f6278f53d21381396d0741c6e

Kotlin:       1.9.20
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          17.0.11 (Amazon.com Inc. 17.0.11+9-LTS)
OS:           Mac OS X 13.6.7 aarch64

Please include any relevant guides or documentation you're referencing

https://ui.docs.amplify.aws/android/connected-components/liveness

Describe the bug

In order to update Android 15 release next year I'm trying to build app on an emulator with Android 15 with support for 16KB page sizes.
Doc : https://developer.android.com/guide/practices/page-sizes
My app crashs on emultor Android 15( 16kb page size support)

Reproduction steps (if applicable)

  1. Setup Android 15(with 16kb page size)
    Refer : https://developer.android.com/guide/practices/page-sizes#16kb-emulator
  2. Build app on this emulator
  3. App crashs when FaceLivenessDetector is called

Code Snippet

Refer to this sample to implement
https://ui.docs.amplify.aws/android/connected-components/liveness

FaceLivenessDetector(
              sessionId = uiState.sessionId.value,
              region = uiState.region,
              credentialsProvider = uiState.credentials,
              disableStartView = true,
              onComplete = {
                onComplete(uiState.sessionId)
              },
              onError = onError,
            )

Log output

06-16 11:18:53.028  6274  6274 E AndroidRuntime: FATAL EXCEPTION: main
06-16 11:18:53.028  6274  6274 E AndroidRuntime: Process: jp.eure.android.pairs, PID: 6274
06-16 11:18:53.028  6274  6274 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in "/data/app/~~shtzegI7w4XzXSxFGAbw5g==/com.sample-bXldvDr8EVQncikams3wsQ==/base.apk!/lib/arm64-v8a/libliveness_opengl_renderer_jni.so" (new hash type from the future?)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at java.lang.Runtime.loadLibrary0(Runtime.java:1081)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at java.lang.System.loadLibrary(System.java:1765)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at com.amplifyframework.ui.liveness.camera.OpenGLRenderer.<clinit>(OpenGLRenderer.java:57)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at com.amplifyframework.ui.liveness.camera.LivenessCoordinator.<init>(LivenessCoordinator.kt:127)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at com.amplifyframework.ui.liveness.ui.FaceLivenessDetectorKt$ChallengeView$1.invoke(FaceLivenessDetector.kt:166)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at com.amplifyframework.ui.liveness.ui.FaceLivenessDetectorKt$ChallengeView$1.invoke(FaceLivenessDetector.kt:165)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at androidx.compose.runtime.DisposableEffectImpl.onRemembered(Effects.kt:83)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:1295)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:984)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:1005)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:639)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:551)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:41)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1404)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1415)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:1015)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:941)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1389)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:959)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:100)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:232)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:317)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8674)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
06-16 11:18:53.028  6274  6274 E AndroidRuntime: 	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@6db091f, androidx.compose.ui.platform.MotionDurationScaleImpl@504846c, StandaloneCoroutine{Cancelling}@acd7a35, AndroidUiDispatcher@eb75eca]

amplifyconfiguration.json

No response

Additional information and screenshots

Base on Android document about this problem , it seems the lib has to rebuild again to work on 16KB devices.

Beginning with Android 15, Android supports devices that are configured to use a page size of 16 KB (16 KB devices). 
If your app uses any [NDK](https://developer.android.com/ndk) libraries, either directly or indirectly through an SDK, 
then you will need to rebuild your app for it to work on these 16 KB devices.
@github-actions github-actions bot added the pending-triage Issue is pending triage label Jun 17, 2024
@vincetran
Copy link
Member

Thanks @vegeta2102 for the report and early Android 15 testing! Someone will take a look at this issue as soon as possible.

@vincetran vincetran added liveness This issue relates to the Liveness component and removed pending-triage Issue is pending triage labels Jun 17, 2024
@tylerjroach
Copy link
Member

Hi @vegeta2102, I've taken steps to attempt to support Android 15 devices with a 16kb page size. I was able to upgrade our own native lib.

However, we also make use of tensorflow-light, which has not received 16kb page support yet. We are currently blocked until TensorFlow updates their own library to support 16kb page sizes. Tracking here: tensorflow/tensorflow#69459

We will keep a close eye on progress made on their end and update Liveness support when possible.

@tylerjroach tylerjroach added the feature-request New feature or request label Jun 26, 2024
@vegeta2102
Copy link
Author

@tylerjroach
Thank you very much !!!
It seems TensorFlow also has the PR for updating 16KB support .
When will you release amplify-ui-android for supporting 16KB ?

@tylerjroach
Copy link
Member

I can't give a specific date as were still waiting for TensorFlow release, but we will try to release our update shortly after to ensure no customer impact.

@vegeta2102
Copy link
Author

@tylerjroach
I got it. Let's wait for the TensorFlow release.

@vegeta2102
Copy link
Author

@tylerjroach

tensorflow/tensorflow#69459 (comment)
I checked that so pls do the next step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request liveness This issue relates to the Liveness component
Projects
None yet
Development

No branches or pull requests

3 participants