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

Access denied finding property "ro.mediatek.platform" #44

Closed resultanyildizi closed 11 months ago

resultanyildizi commented 1 year ago

Before creating a new issue, please confirm:

Which UI component?

Liveness

Gradle script dependencies

// Put output below this line
implementation 'com.amplifyframework.ui:liveness:1.0.0'

Environment information

# Put output below this line
Welcome to Gradle 7.4!

Here are the highlights of this release:
 - Aggregated test and JaCoCo reports
 - Marking additional test source directories as tests in IntelliJ
 - Support for Adoptium JDKs in Java toolchains

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

------------------------------------------------------------
Gradle 7.4
------------------------------------------------------------

Build time:   2022-02-08 09:58:38 UTC
Revision:     f0d9291c04b90b59445041eaa75b2ee744162586

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          1.8.0_361 (Oracle Corporation 25.361-b09)
OS:           Mac OS X 13.3.1 x86_64

Please include any relevant guides or documentation you're referencing

https://github.com/flutter-ml/google_ml_kit_flutter/issues/287

Describe the bug

Issue Description: The camera functionality in the app is encountering a problem where it opens for a brief half-second and then automatically closes. This issue has been observed on a Samsung Galaxy S10 Lite device, but it may not be specific to that device alone. The app itself does not crash during this process. Camera permissions have been properly granted.

Expected Behavior: The camera should remain open and functional, allowing the users to verify themselves for an extended duration without any abrupt closing.

Additional Information: Device: [Samsung Galaxy S10 Lite] Operating System: [Android] Permissions Granted: Camera

Reproduction steps (if applicable)

  1. Launch the app on any compatible device.
  2. Start the liveness session.
  3. Observe that the camera opens briefly for approximately half a second.
  4. Notice that the camera automatically closes without any user interaction.

Code Snippet

// Put your code below this line.
package com.example.facelivenessapp

import android.Manifest
import android.content.pm.PackageManager
import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.core.view.KeyEventDispatcher.Component
import com.amplifyframework.auth.cognito.AWSCognitoAuthPlugin
import com.amplifyframework.core.Amplify
import com.amplifyframework.ui.liveness.ui.FaceLivenessDetector
import com.amplifyframework.ui.liveness.ui.LivenessColorScheme

class MainActivity : ComponentActivity() {
    private val MY_PERMISSIONS_REQUEST_CAMERA = 1
    private val SESSION_ID = "session-id"
    private val REGION = "eu-west-1"

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        // Add these lines to include the Auth plugin.
        Amplify.addPlugin(AWSCognitoAuthPlugin())
        Amplify.configure(applicationContext)
        checkCameraPermission()
    }

    private fun checkCameraPermission() {
        if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)
            != PackageManager.PERMISSION_GRANTED) {
            requestCameraPermission()
        } else {
            setContent {
                LivenessDetector(REGION, SESSION_ID)
            }

        }
    }

    private fun requestCameraPermission() {
        ActivityCompat.requestPermissions(this,
            arrayOf(Manifest.permission.CAMERA),
            MY_PERMISSIONS_REQUEST_CAMERA)
    }

    override fun onRequestPermissionsResult(requestCode: Int,
                                            permissions: Array<String>, grantResults: IntArray) {
        when (requestCode) {
            MY_PERMISSIONS_REQUEST_CAMERA -> {
                if ((grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED)) {
                    // Permission granted. You can use the camera now
                    setContent {
                        LivenessDetector(REGION, SESSION_ID)
                    }

                } else {
                    // Permission denied. You can't use the camera
                }
            }
        }
        super.onRequestPermissionsResult(requestCode, permissions, grantResults)
    }
}

@Composable
fun LivenessDetector(region: String, sessionId: String) {
    MaterialTheme(
        colorScheme = LivenessColorScheme.default()
    ) {
        FaceLivenessDetector(
            sessionId = sessionId,
            region = region,
            onComplete = {
                Log.i("MyApp", "Face Liveness flow is complete")
                // The Face Liveness flow is complete and the session
                // results are ready. Use your backend to retrieve the
                // results for the Face Liveness session.
            },
            onError = { error ->
                Log.e("MyApp", "Error during Face Liveness flow")
                Log.e("MyApp", error.message)
                Log.e("MyApp", error.toString())
                // An error occurred during the Face Liveness flow, such as
                // time out or missing the required permissions.
            }
        )
    }
}

Log output

// Put your logs below this line
---------------------------- PROCESS ENDED (6731) for package com.example.facelivenessapp ----------------------------
2023-06-06 12:18:41.191 30685-30685 studio.deploy           install_server-b3369435              E  Could not remove dir '/data/data/com.example.facelivenessapp/code_cache/.ll/': No such file or directory
2023-06-06 12:18:41.475  7505-7505  USNET                   pid-7505                             E  USNET: appName: com.example.facelivenessapp
2023-06-06 12:18:41.488   904-904   audit                   auditd                               E  type=1400 audit(1686043121.470:1553): avc:  granted  { execute } for  pid=7505 comm="re-initialized>" path="/data/data/com.example.facelivenessapp/code_cache/startup_agents/b3369435-agent.so" dev="sda32" ino=446217 scontext=u:r:untrusted_app:s0:c44,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c44,c256,c512,c768 tclass=file SEPF_SM-G770F_12_0001 audit_filtered
---------------------------- PROCESS STARTED (7505) for package com.example.facelivenessapp ----------------------------
2023-06-06 12:18:41.500  7505-7505  facelivenessap          com.example.facelivenessapp          W  Redefining intrinsic method java.lang.Thread java.lang.Thread.currentThread(). This may cause the unexpected use of the original definition of java.lang.Thread java.lang.Thread.currentThread()in methods that have already been compiled.
2023-06-06 12:18:41.500  7505-7505  facelivenessap          com.example.facelivenessapp          W  Redefining intrinsic method boolean java.lang.Thread.interrupted(). This may cause the unexpected use of the original definition of boolean java.lang.Thread.interrupted()in methods that have already been compiled.
2023-06-06 12:18:41.502  7505-7505  ActivityThread          com.example.facelivenessapp          D  handleBindApplication()++ app=com.example.facelivenessapp
2023-06-06 12:18:41.502  7505-7505  Compatibil...geReporter com.example.facelivenessapp          D  Compat change id reported: 171979766; UID 10044; state: ENABLED
2023-06-06 12:18:41.519  7505-7505  ziparchive              com.example.facelivenessapp          W  Unable to open '/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes3.dm': No such file or directory
2023-06-06 12:18:41.519  7505-7505  ziparchive              com.example.facelivenessapp          W  Unable to open '/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes.dm': No such file or directory
2023-06-06 12:18:41.571  7505-7505  ziparchive              com.example.facelivenessapp          W  Unable to open '/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes2.dm': No such file or directory
2023-06-06 12:18:41.576  7505-7505  ziparchive              com.example.facelivenessapp          W  Unable to open '/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes4.dm': No such file or directory
2023-06-06 12:18:41.622  7505-7505  ziparchive              com.example.facelivenessapp          W  Unable to open '/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes5.dm': No such file or directory
2023-06-06 12:18:41.663  7505-7505  ziparchive              com.example.facelivenessapp          W  Unable to open '/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes6.dm': No such file or directory
2023-06-06 12:18:41.668  7505-7505  ziparchive              com.example.facelivenessapp          W  Unable to open '/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes7.dm': No such file or directory
2023-06-06 12:18:41.670  7505-7505  facelivenessap          com.example.facelivenessapp          W  ClassLoaderContext classpath size mismatch. expected=0, found=7 (PCL[] | PCL[/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes3.dex*1430643708:/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes.dex*4230358522:/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes2.dex*1353289358:/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes4.dex*956279939:/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes5.dex*4275905170:/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes6.dex*3966124418:/data/data/com.example.facelivenessapp/code_cache/.overlay/base.apk/classes7.dex*2424927688])
2023-06-06 12:18:41.672  7505-7505  nativeloader            com.example.facelivenessapp          D  Configuring classloader-namespace for other apk /data/app/~~5LYU09lA9tZN140Dzy70NA==/com.example.facelivenessapp-2_s9BkXyU8Jbn3DVuSKvhA==/base.apk. target_sdk_version=31, uses_libraries=, library_path=/data/app/~~5LYU09lA9tZN140Dzy70NA==/com.example.facelivenessapp-2_s9BkXyU8Jbn3DVuSKvhA==/lib/arm64:/data/app/~~5LYU09lA9tZN140Dzy70NA==/com.example.facelivenessapp-2_s9BkXyU8Jbn3DVuSKvhA==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.example.facelivenessapp
2023-06-06 12:18:41.685  7505-7505  GraphicsEnvironment     com.example.facelivenessapp          V  ANGLE Developer option for 'com.example.facelivenessapp' set to: 'default'
2023-06-06 12:18:41.686  7505-7505  GraphicsEnvironment     com.example.facelivenessapp          V  App is not on the allowlist for updatable production driver.
2023-06-06 12:18:41.688  7505-7505  LoadedApk               com.example.facelivenessapp          D  LoadedApk::makeApplication() appContext.mOpPackageName=com.example.facelivenessapp appContext.mBasePackageName=com.example.facelivenessapp
2023-06-06 12:18:41.688  7505-7505  NetworkSecurityConfig   com.example.facelivenessapp          D  No Network Security Config specified, using platform default
2023-06-06 12:18:41.695  7505-7505  NetworkSecurityConfig   com.example.facelivenessapp          D  No Network Security Config specified, using platform default
2023-06-06 12:18:41.708  7505-7505  ActivityThread          com.example.facelivenessapp          D  handleBindApplication() --
2023-06-06 12:18:41.717  7505-7528  OpenGLRenderer          com.example.facelivenessapp          D  RenderThread::requireGlContext()
2023-06-06 12:18:41.717  7505-7528  AdrenoGLES-0            com.example.facelivenessapp          I  QUALCOMM build                   : 3dad7f8ed7, I593c16c433
                                                                                                    Build Date                       : 10/01/21
                                                                                                    OpenGL ES Shader Compiler Version: EV031.32.02.02
                                                                                                    Local Branch                     : 
                                                                                                    Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.9.1.R1.11.00.00.604.073
                                                                                                    Remote Branch                    : NONE
                                                                                                    Reconstruct Branch               : NOTHING
2023-06-06 12:18:41.718  7505-7528  AdrenoGLES-0            com.example.facelivenessapp          I  Build Config                     : S P 10.0.7 AArch64
2023-06-06 12:18:41.718  7505-7528  AdrenoGLES-0            com.example.facelivenessapp          I  Driver Path                      : /vendor/lib64/egl/libGLESv2_adreno.so
2023-06-06 12:18:41.721  7505-7528  AdrenoGLES-0            com.example.facelivenessapp          I  PFP: 0x016ee190, ME: 0x00000000
2023-06-06 12:18:41.726  7505-7528  OpenGLRenderer          com.example.facelivenessapp          D  RenderThread::setGrContext()
2023-06-06 12:18:41.786  7505-7505  DecorView               com.example.facelivenessapp          I  [INFO] isPopOver=false, config=true
2023-06-06 12:18:41.786  7505-7505  DecorView               com.example.facelivenessapp          I  updateCaptionType >> DecorView@b792f22[], isFloating=false, isApplication=true, hasWindowControllerCallback=true, hasWindowDecorCaption=false
2023-06-06 12:18:41.786  7505-7505  DecorView               com.example.facelivenessapp          D  setCaptionType = 0, this = DecorView@b792f22[]
2023-06-06 12:18:41.788  7505-7505  DecorView               com.example.facelivenessapp          I  getCurrentDensityDpi: from real metrics. densityDpi=420 msg=resources_loaded
2023-06-06 12:18:41.816  7505-7505  ViewRootIm...nActivity] com.example.facelivenessapp          I  setView = com.android.internal.policy.DecorView@b792f22 TM=true
2023-06-06 12:18:41.918  7505-7534  EngineFactory           com.example.facelivenessapp          I  Provider GmsCore_OpenSSL not available
2023-06-06 12:18:41.929  7505-7505  Compatibil...geReporter com.example.facelivenessapp          D  Compat change id reported: 171228096; UID 10044; state: ENABLED
2023-06-06 12:18:41.973  7505-7505  facelivenessap          com.example.facelivenessapp          W  Method boolean androidx.compose.runtime.snapshots.SnapshotStateList.conditionalUpdate(kotlin.jvm.functions.Function1) failed lock verification and will run slower.
                                                                                                    Common causes for lock verification issues are non-optimized dex code
                                                                                                    and incorrect proguard optimizations.
2023-06-06 12:18:41.973  7505-7505  facelivenessap          com.example.facelivenessapp          W  Method java.lang.Object androidx.compose.runtime.snapshots.SnapshotStateList.mutate(kotlin.jvm.functions.Function1) failed lock verification and will run slower.
2023-06-06 12:18:41.974  7505-7505  facelivenessap          com.example.facelivenessapp          W  Method void androidx.compose.runtime.snapshots.SnapshotStateList.update(kotlin.jvm.functions.Function1) failed lock verification and will run slower.
2023-06-06 12:18:42.051  7505-7505  ViewRootIm...nActivity] com.example.facelivenessapp          I  Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=5 res=0x7 s={true -5476376665515323392} ch=true fn=-1
2023-06-06 12:18:42.053  7505-7528  hw-ProcessState         com.example.facelivenessapp          D  Binder ioctl to enable oneway spam detection failed: Invalid argument
2023-06-06 12:18:42.053  7505-7528  OpenGLRenderer          com.example.facelivenessapp          D  eglCreateWindowSurface
2023-06-06 12:18:42.062  7505-7505  ViewRootIm...nActivity] com.example.facelivenessapp          I  [DP] dp(1) 1 android.view.ViewRootImpl.reportNextDraw:11374 android.view.ViewRootImpl.performTraversals:4167 android.view.ViewRootImpl.doTraversal:2893 
2023-06-06 12:18:42.087  7505-7528  BufferQueueProducer     com.example.facelivenessapp          I  [ViewRootImpl@e37efc[MainActivity]#0(BLAST Consumer)0](id:1d5100000000,api:1,p:7505,c:7505) queueBuffer: queued for the first time.
2023-06-06 12:18:42.090  7505-7505  ViewRootIm...nActivity] com.example.facelivenessapp          I  [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:4969 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938 
2023-06-06 12:18:42.090  7505-7505  ViewRootIm...nActivity] com.example.facelivenessapp          I  [DP] rdf()
2023-06-06 12:18:42.090  7505-7505  ViewRootIm...nActivity] com.example.facelivenessapp          D  reportDrawFinished (fn: -1) 
2023-06-06 12:18:42.140  7505-7505  ViewRootIm...nActivity] com.example.facelivenessapp          I  MSG_WINDOW_FOCUS_CHANGED 1 1
2023-06-06 12:18:42.141  7505-7505  InputMethodManager      com.example.facelivenessapp          D  startInputInner - Id : 0
2023-06-06 12:18:42.141  7505-7505  InputMethodManager      com.example.facelivenessapp          I  startInputInner - mService.startInputOrWindowGainedFocus
2023-06-06 12:18:42.146  7505-7505  InputMethodManager      com.example.facelivenessapp          D  startInputInner - Id : 0
2023-06-06 12:18:42.221  1491-1825  WindowManager           system_server                        E  win=Window{e1f76ad u0 Splash Screen com.example.facelivenessapp EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=8 caller=com.android.server.wm.ActivityRecord.destroySurfaces:5841 com.android.server.wm.ActivityRecord.destroySurfaces:5822 com.android.server.wm.WindowState.onExitAnimationDone:5965 com.android.server.wm.WindowStateAnimator.onAnimationFinished:242 com.android.server.wm.WindowState.onAnimationFinished:6218 com.android.server.wm.WindowContainer$$ExternalSyntheticLambda0.onAnimationFinished:2 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0$SurfaceAnimator:113 
2023-06-06 12:18:43.221  7505-7505  ViewRootIm...nActivity] com.example.facelivenessapp          I  ViewPostIme pointer 0
2023-06-06 12:18:43.294  7505-7505  ViewRootIm...nActivity] com.example.facelivenessapp          I  ViewPostIme pointer 1
2023-06-06 12:18:43.313  7505-7505  DecorView               com.example.facelivenessapp          I  notifyKeepScreenOnChanged: keepScreenOn=true
2023-06-06 12:18:43.313  7505-7505  DecorView               com.example.facelivenessapp          I  notifyKeepScreenOnChanged: keepScreenOn=true
2023-06-06 12:18:43.326  7505-7505  tflite                  com.example.facelivenessapp          I  Initialized TensorFlow Lite runtime.
2023-06-06 12:18:43.335  7505-7505  MediaCodecList          com.example.facelivenessapp          D  codecHandlesFormat: no format, so no extra checks
2023-06-06 12:18:43.335  7505-7505  MediaCodecList          com.example.facelivenessapp          D  codecHandlesFormat: no format, so no extra checks
2023-06-06 12:18:43.335  7505-7505  MediaCodecList          com.example.facelivenessapp          D  codecHandlesFormat: no format, so no extra checks
2023-06-06 12:18:43.336  7505-7505  ACodec                  com.example.facelivenessapp          I   [] Now uninitialized
2023-06-06 12:18:43.336  7505-7659  ACodec                  com.example.facelivenessapp          I  [] onAllocateComponent
2023-06-06 12:18:43.337  7505-7659  OMXClient               com.example.facelivenessapp          I  IOmx service obtained
2023-06-06 12:18:43.347  7505-7659  ACodec                  com.example.facelivenessapp          I  [OMX.qcom.video.encoder.vp8] Now Loaded
2023-06-06 12:18:43.350  7505-7505  CodecSeeding            com.example.facelivenessapp          D  Seed: codec OMX.qcom.video.encoder.vp8, mediatype video/x-vnd.on2.vp8, overrideable 1
2023-06-06 12:18:43.350  7505-7505  CodecProperties         com.example.facelivenessapp          D  setTuningValue(vq-target-bpp,0)
2023-06-06 12:18:43.350  7505-7505  CodecProperties         com.example.facelivenessapp          D  setFeatureValue(can-swap-width-height,1)
2023-06-06 12:18:43.350  7505-7505  CodecProperties         com.example.facelivenessapp          D  setFeatureValue(_vq_eligible.device,1)
2023-06-06 12:18:43.350  7505-7505  CodecProperties         com.example.facelivenessapp          D  setFeatureValue(_quality.target,1)
2023-06-06 12:18:43.350  7505-7505  CodecSeeding            com.example.facelivenessapp          D  Seed: codec OMX.qcom.video.encoder.vp8, mediatype video/x-vnd.on2.vp8, overrideable 0
2023-06-06 12:18:43.350  7505-7505  MediaCodec              com.example.facelivenessapp          D  shapeMediaFormat: deltas(1): AMessage(what = 0x00000000) = {
                                                                                                        int32_t android._encoding-quality-level = 0
                                                                                                      }
2023-06-06 12:18:43.351  7505-7659  ACodec                  com.example.facelivenessapp          I  app-pid(7505)
2023-06-06 12:18:43.351  7505-7659  OMXUtils                com.example.facelivenessapp          W  do not know color format 0x7fa30c06 = 2141391878
2023-06-06 12:18:43.351  7505-7659  OMXUtils                com.example.facelivenessapp          W  do not know color format 0x7fa30c04 = 2141391876
2023-06-06 12:18:43.352  7505-7659  OMXUtils                com.example.facelivenessapp          W  do not know color format 0x7fa30c00 = 2141391872
2023-06-06 12:18:43.352  7505-7659  OMXUtils                com.example.facelivenessapp          W  do not know color format 0x7fa30c09 = 2141391881
2023-06-06 12:18:43.352  7505-7659  OMXUtils                com.example.facelivenessapp          W  do not know color format 0x7fa30c0a = 2141391882
2023-06-06 12:18:43.352  7505-7659  OMXUtils                com.example.facelivenessapp          W  do not know color format 0x7fa30c08 = 2141391880
2023-06-06 12:18:43.352  7505-7659  OMXUtils                com.example.facelivenessapp          W  do not know color format 0x7fa30c07 = 2141391879
2023-06-06 12:18:43.353  7505-7659  OMXUtils                com.example.facelivenessapp          W  do not know color format 0x7f000789 = 2130708361
2023-06-06 12:18:43.353  7505-7659  ACodec                  com.example.facelivenessapp          I  VideoController::setValues() isSet [0]
2023-06-06 12:18:43.353  7505-7659  ACodec                  com.example.facelivenessapp          I  set values for [SM8150]
2023-06-06 12:18:43.354  7505-7659  ACodec                  com.example.facelivenessapp          I  Disable auto-blur mode for resolution (480x640)
2023-06-06 12:18:43.357  7505-7659  ACodec                  com.example.facelivenessapp          I  app-name : com.example.facelivenessapp
2023-06-06 12:18:43.358  7505-7659  ACodec                  com.example.facelivenessapp          I  [OMX.qcom.video.encoder.vp8] cannot encode HDR static metadata. Ignoring.
2023-06-06 12:18:43.358  7505-7659  ACodec                  com.example.facelivenessapp          I  setupVideoEncoder succeeded
2023-06-06 12:18:43.358  7505-7659  ACodec                  com.example.facelivenessapp          I  [OMX.qcom.video.encoder.vp8] configure, AMessage : AMessage(what = 'conf', target = 1) = {
                                                                                                      int32_t color-format = 2130708361
                                                                                                      int32_t i-frame-interval = 1
                                                                                                      string mime = "video/x-vnd.on2.vp8"
                                                                                                      int32_t width = 480
                                                                                                      int32_t bitrate = 629145
                                                                                                      int32_t frame-rate = 24
                                                                                                      int32_t height = 640
                                                                                                      int32_t android._encoding-quality-level = 0
                                                                                                      int32_t flags = 1
                                                                                                      int32_t encoder = 1
                                                                                                    }
2023-06-06 12:18:43.358  7505-7659  OMXUtils                com.example.facelivenessapp          W  do not know color format 0x7f000789 = 2130708361
2023-06-06 12:18:43.367  7505-7658  MediaCodec              com.example.facelivenessapp          I  MediaCodec will operate in async mode
2023-06-06 12:18:43.369  7505-7505  MediaCodec              com.example.facelivenessapp          D  keep callback message for reclaim
2023-06-06 12:18:43.369  7505-7659  ACodec                  com.example.facelivenessapp          I  [OMX.qcom.video.encoder.vp8] Now Loaded->Idle
2023-06-06 12:18:43.380  7505-7659  ACodec                  com.example.facelivenessapp          I  [OMX.qcom.video.encoder.vp8] Now Idle->Executing
2023-06-06 12:18:43.382  7505-7658  MediaCodec              com.example.facelivenessapp          I  setCodecState state(0), called in 6
2023-06-06 12:18:43.383  7505-7659  ACodec                  com.example.facelivenessapp          I  [OMX.qcom.video.encoder.vp8] Now Executing
2023-06-06 12:18:43.386  7505-7667  OpenGLRendererJni       com.example.facelivenessapp          D  EGL Initialized [Vendor: Android, Version: 1.5 Android META-EGL]
2023-06-06 12:18:43.390  7505-7667  OpenGLRendererJni       com.example.facelivenessapp          D  OpenGL Initialized [Vendor: Qualcomm, Version: OpenGL ES 3.2 V@0502.0 (GIT@3dad7f8ed7, I593c16c433, 1633080534) (Date:10/01/21), GLSL Version: OpenGL ES GLSL ES 3.20, Renderer: Adreno (TM) 640]
2023-06-06 12:18:43.393  7505-7505  ViewRootIm...nActivity] com.example.facelivenessapp          I  Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=5 res=0x1 s={true -5476376665515323392} ch=false fn=13
2023-06-06 12:18:43.411  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  Connecting to camera service
2023-06-06 12:18:43.413  7505-7672  VendorTagDescriptor     com.example.facelivenessapp          D  addVendorDescriptor: vendor tag id 14172875900359437128 added
2023-06-06 12:18:43.414  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 0 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
2023-06-06 12:18:43.414  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client com.example.facelivenessapp API Level 2
2023-06-06 12:18:43.414  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 2 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
2023-06-06 12:18:43.415  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 20 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
2023-06-06 12:18:43.415  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 23 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
2023-06-06 12:18:43.415  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 3 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
2023-06-06 12:18:43.415  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 4 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client vendor.client.pid<1360> API Level 2
2023-06-06 12:18:43.415  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 40 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
2023-06-06 12:18:43.415  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 41 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
2023-06-06 12:18:43.415  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 50 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
2023-06-06 12:18:43.415  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 54 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
2023-06-06 12:18:43.416  7505-7520  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 80 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
2023-06-06 12:18:43.420  7505-7672  CameraRepository        com.example.facelivenessapp          D  Added camera: 0
2023-06-06 12:18:43.436  7505-7672  Camera2CameraInfo       com.example.facelivenessapp          I  Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_3
2023-06-06 12:18:43.437  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 0 status STATUS_PRESENT
2023-06-06 12:18:43.438  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_PRESENT
2023-06-06 12:18:43.438  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 2 status STATUS_PRESENT
2023-06-06 12:18:43.438  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 3 status STATUS_PRESENT
2023-06-06 12:18:43.438  7505-7672  CameraRepository        com.example.facelivenessapp          D  Added camera: 1
2023-06-06 12:18:43.440  7505-7672  Camera2CameraInfo       com.example.facelivenessapp          I  Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
2023-06-06 12:18:43.440  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 0 status STATUS_PRESENT
2023-06-06 12:18:43.440  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_PRESENT
2023-06-06 12:18:43.441  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 2 status STATUS_PRESENT
2023-06-06 12:18:43.441  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 3 status STATUS_PRESENT
2023-06-06 12:18:43.441  7505-7672  CameraRepository        com.example.facelivenessapp          D  Added camera: 2
2023-06-06 12:18:43.442  7505-7672  Camera2CameraInfo       com.example.facelivenessapp          I  Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
2023-06-06 12:18:43.443  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 0 status STATUS_PRESENT
2023-06-06 12:18:43.443  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_PRESENT
2023-06-06 12:18:43.443  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 2 status STATUS_PRESENT
2023-06-06 12:18:43.443  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 3 status STATUS_PRESENT
2023-06-06 12:18:43.443  7505-7672  CameraRepository        com.example.facelivenessapp          D  Added camera: 3
2023-06-06 12:18:43.444  7505-7672  Camera2CameraInfo       com.example.facelivenessapp          I  Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
2023-06-06 12:18:43.444  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 0 status STATUS_PRESENT
2023-06-06 12:18:43.444  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_PRESENT
2023-06-06 12:18:43.444  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 2 status STATUS_PRESENT
2023-06-06 12:18:43.444  7505-7672  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 3 status STATUS_PRESENT
2023-06-06 12:18:43.445  7505-7672  CameraValidator         com.example.facelivenessapp          D  Verifying camera lens facing on r5q, lensFacingInteger: null
2023-06-06 12:18:43.457  7505-7505  CameraOrientationUtil   com.example.facelivenessapp          D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
2023-06-06 12:18:43.457  7505-7505  CameraOrientationUtil   com.example.facelivenessapp          D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
2023-06-06 12:18:43.458  7505-7505  CameraOrientationUtil   com.example.facelivenessapp          D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
2023-06-06 12:18:43.458  7505-7505  CameraOrientationUtil   com.example.facelivenessapp          D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
2023-06-06 12:18:43.460  7505-7505  DeferrableSurface       com.example.facelivenessapp          D  Surface created[total_surfaces=1, used_surfaces=0](androidx.camera.core.SurfaceRequest$2@767d96f}
2023-06-06 12:18:43.461  7505-7505  CameraOrientationUtil   com.example.facelivenessapp          D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
2023-06-06 12:18:43.463  7505-7505  CameraOrientationUtil   com.example.facelivenessapp          D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
2023-06-06 12:18:43.463  7505-7505  CameraOrientationUtil   com.example.facelivenessapp          D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
2023-06-06 12:18:43.463  7505-7505  DeferrableSurface       com.example.facelivenessapp          D  Surface created[total_surfaces=2, used_surfaces=0](androidx.camera.core.impl.ImmediateSurface@96a5281}
2023-06-06 12:18:43.465  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Use case androidx.camera.core.Preview-4e6a82f2-85fb-4227-8208-82b57999b64d192846338 ACTIVE
2023-06-06 12:18:43.466  7505-7677  UseCaseAttachState      com.example.facelivenessapp          D  Active and attached use case: [] for camera: 1
2023-06-06 12:18:43.467  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Use case androidx.camera.core.ImageAnalysis-74a64b0d-4d90-4077-bde9-e28f1a89d545123756307 ACTIVE
2023-06-06 12:18:43.467  7505-7677  UseCaseAttachState      com.example.facelivenessapp          D  Active and attached use case: [] for camera: 1
2023-06-06 12:18:43.468  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Use cases [androidx.camera.core.Preview-4e6a82f2-85fb-4227-8208-82b57999b64d192846338, androidx.camera.core.ImageAnalysis-74a64b0d-4d90-4077-bde9-e28f1a89d545123756307] now ATTACHED
2023-06-06 12:18:43.469  7505-7677  UseCaseAttachState      com.example.facelivenessapp          D  All use case: [androidx.camera.core.Preview-4e6a82f2-85fb-4227-8208-82b57999b64d192846338, androidx.camera.core.ImageAnalysis-74a64b0d-4d90-4077-bde9-e28f1a89d545123756307] for camera: 1
2023-06-06 12:18:43.470  7505-7677  UseCaseAttachState      com.example.facelivenessapp          D  Active and attached use case: [androidx.camera.core.Preview-4e6a82f2-85fb-4227-8208-82b57999b64d192846338, androidx.camera.core.ImageAnalysis-74a64b0d-4d90-4077-bde9-e28f1a89d545123756307] for camera: 1
2023-06-06 12:18:43.472  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Resetting Capture Session
2023-06-06 12:18:43.472  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Releasing session in state INITIALIZED
2023-06-06 12:18:43.472  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Attempting to force open the camera.
2023-06-06 12:18:43.473  7505-7677  CameraStateRegistry     com.example.facelivenessapp          D  tryOpenCamera(Camera@8c09fbb[id=1]) [Available Cameras: 1, Already Open: false (Previous state: null)] --> SUCCESS
2023-06-06 12:18:43.473  7505-7677  CameraStateRegistry     com.example.facelivenessapp          D  Recalculating open cameras:
                                                                                                    Camera                                       State                 
                                                                                                    -------------------------------------------------------------------
                                                                                                    Camera@8c09fbb[id=1]                         OPENING               
                                                                                                    Camera@c1cbef0[id=2]                         UNKNOWN               
                                                                                                    Camera@c7023fd[id=0]                         UNKNOWN               
                                                                                                    Camera@4d4edab[id=3]                         UNKNOWN               
                                                                                                    -------------------------------------------------------------------
                                                                                                    Open count: 1 (Max allowed: 1)
2023-06-06 12:18:43.473  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Opening camera.
2023-06-06 12:18:43.474  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Transitioning camera internal state: INITIALIZED --> OPENING
2023-06-06 12:18:43.474  7505-7677  CameraStateMachine      com.example.facelivenessapp          D  New public camera state CameraState{type=OPENING, error=null} from OPENING and null
2023-06-06 12:18:43.474  7505-7677  CameraStateMachine      com.example.facelivenessapp          D  Publishing new public camera state CameraState{type=OPENING, error=null}
2023-06-06 12:18:43.475  7505-7677  UseCaseAttachState      com.example.facelivenessapp          D  All use case: [androidx.camera.core.Preview-4e6a82f2-85fb-4227-8208-82b57999b64d192846338, androidx.camera.core.ImageAnalysis-74a64b0d-4d90-4077-bde9-e28f1a89d545123756307] for camera: 1
2023-06-06 12:18:43.482  7505-7674  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_NOT_AVAILABLE
2023-06-06 12:18:43.482  7505-7674  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_NOT_AVAILABLE
2023-06-06 12:18:43.482  7505-7674  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_NOT_AVAILABLE
2023-06-06 12:18:43.482  7505-7674  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_NOT_AVAILABLE
2023-06-06 12:18:43.488  7505-7674  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_OPEN for client com.example.facelivenessapp API Level 2
2023-06-06 12:18:43.492  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Use case androidx.camera.core.Preview-4e6a82f2-85fb-4227-8208-82b57999b64d192846338 ACTIVE
2023-06-06 12:18:43.494  7505-7677  UseCaseAttachState      com.example.facelivenessapp          D  Active and attached use case: [androidx.camera.core.Preview-4e6a82f2-85fb-4227-8208-82b57999b64d192846338, androidx.camera.core.ImageAnalysis-74a64b0d-4d90-4077-bde9-e28f1a89d545123756307] for camera: 1
2023-06-06 12:18:43.497  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Use case androidx.camera.core.ImageAnalysis-74a64b0d-4d90-4077-bde9-e28f1a89d545123756307 ACTIVE
2023-06-06 12:18:43.501  7505-7677  UseCaseAttachState      com.example.facelivenessapp          D  Active and attached use case: [androidx.camera.core.Preview-4e6a82f2-85fb-4227-8208-82b57999b64d192846338, androidx.camera.core.ImageAnalysis-74a64b0d-4d90-4077-bde9-e28f1a89d545123756307] for camera: 1
2023-06-06 12:18:43.506  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} CameraDevice.onOpened()
2023-06-06 12:18:43.507  7505-7677  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Transitioning camera internal state: OPENING --> OPENED
2023-06-06 12:18:43.507  7505-7677  CameraStateRegistry     com.example.facelivenessapp          D  Recalculating open cameras:
                                                                                                    Camera                                       State                 
                                                                                                    -------------------------------------------------------------------
                                                                                                    Camera@8c09fbb[id=1]                         OPEN                  
                                                                                                    Camera@c1cbef0[id=2]                         UNKNOWN               
                                                                                                    Camera@c7023fd[id=0]                         UNKNOWN               
                                                                                                    Camera@4d4edab[id=3]                         UNKNOWN               
                                                                                                    -------------------------------------------------------------------
                                                                                                    Open count: 1 (Max allowed: 1)
2023-06-06 12:18:43.507  7505-7677  CameraStateMachine      com.example.facelivenessapp          D  New public camera state CameraState{type=OPEN, error=null} from OPEN and null
2023-06-06 12:18:43.507  7505-7677  CameraStateMachine      com.example.facelivenessapp          D  Publishing new public camera state CameraState{type=OPEN, error=null}
2023-06-06 12:18:43.509  7505-7677  UseCaseAttachState      com.example.facelivenessapp          D  All use case: [androidx.camera.core.Preview-4e6a82f2-85fb-4227-8208-82b57999b64d192846338, androidx.camera.core.ImageAnalysis-74a64b0d-4d90-4077-bde9-e28f1a89d545123756307] for camera: 1
2023-06-06 12:18:43.513  7505-7677  UseCaseAttachState      com.example.facelivenessapp          D  Active and attached use case: [androidx.camera.core.Preview-4e6a82f2-85fb-4227-8208-82b57999b64d192846338, androidx.camera.core.ImageAnalysis-74a64b0d-4d90-4077-bde9-e28f1a89d545123756307] for camera: 1
2023-06-06 12:18:43.514  7505-7677  SyncCaptureSessionBase  com.example.facelivenessapp          D  [androidx.camera.camera2.internal.SynchronizedCaptureSessionBaseImpl@cf31dd6] getSurface...done
2023-06-06 12:18:43.514  7505-7677  CaptureSession          com.example.facelivenessapp          D  Opening capture session.
2023-06-06 12:18:43.517  7505-7677  DeferrableSurface       com.example.facelivenessapp          D  New surface in use[total_surfaces=2, used_surfaces=1](androidx.camera.core.SurfaceRequest$2@767d96f}
2023-06-06 12:18:43.517  7505-7677  DeferrableSurface       com.example.facelivenessapp          D  use count+1, useCount=1 androidx.camera.core.SurfaceRequest$2@767d96f
2023-06-06 12:18:43.517  7505-7677  DeferrableSurface       com.example.facelivenessapp          D  New surface in use[total_surfaces=2, used_surfaces=2](androidx.camera.core.impl.ImmediateSurface@96a5281}
2023-06-06 12:18:43.517  7505-7677  DeferrableSurface       com.example.facelivenessapp          D  use count+1, useCount=1 androidx.camera.core.impl.ImmediateSurface@96a5281
2023-06-06 12:18:43.535  7505-7677  CaptureSession          com.example.facelivenessapp          D  Attempting to send capture request onConfigured
2023-06-06 12:18:43.535  7505-7677  CaptureSession          com.example.facelivenessapp          D  Issuing request for session.
2023-06-06 12:18:43.536  7505-7677  Camera2Cap...estBuilder com.example.facelivenessapp          D  createCaptureRequest
2023-06-06 12:18:43.539  7505-7677  CaptureSession          com.example.facelivenessapp          D  CameraCaptureSession.onConfigured() mState=OPENED
2023-06-06 12:18:43.539  7505-7674  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_ACTIVE for client com.example.facelivenessapp API Level 2
2023-06-06 12:18:43.539  7505-7677  CaptureSession          com.example.facelivenessapp          D  CameraCaptureSession.onReady() OPENED
2023-06-06 12:18:43.767  7505-7522  BufferQueueProducer     com.example.facelivenessapp          I  [SurfaceTexture-1-7505-1](id:1d5100000002,api:4,p:1277,c:7505) queueBuffer: queued for the first time.
2023-06-06 12:18:43.768  7505-7522  BufferQueueProducer     com.example.facelivenessapp          I  [ImageReader-640x480f23m4-7505-0](id:1d5100000003,api:4,p:1277,c:7505) queueBuffer: queued for the first time.
2023-06-06 12:18:43.771  7505-7659  ACodec                  com.example.facelivenessapp          D  dataspace changed to 0x10c40000 (R:2(Limited), P:3(BT601_6_625), M:3(BT601_6), T:3(SMPTE170M)) (R:2(Limited), S:2(BT601_625), T:3(SMPTE_170M))
2023-06-06 12:18:43.773  7505-7667  BufferQueueProducer     com.example.facelivenessapp          I  [SurfaceTexture-0-7505-0](id:1d5100000001,api:1,p:7505,c:7505) queueBuffer: queued for the first time.
2023-06-06 12:18:43.775  7505-7719  BufferQueueProducer     com.example.facelivenessapp          I  [ImageReader-640x480f1m4-7505-1](id:1d5100000004,api:2,p:7505,c:7505) queueBuffer: queued for the first time.
2023-06-06 12:18:43.782  7505-7658  MediaCodec              com.example.facelivenessapp          I  setCodecState state(1), called in 6
2023-06-06 12:18:43.793  7505-7721  libc                    com.example.facelivenessapp          E  Access denied finding property "ro.mediatek.platform"
2023-06-06 12:18:43.793   904-904   audit                   auditd                               E  type=1327 audit(1686043123.780:1561): proctitle="com.example.facelivenessapp"
2023-06-06 12:18:43.849  7505-7505  MyApp                   com.example.facelivenessapp          E  Error during Face Liveness flow
2023-06-06 12:18:43.849  7505-7505  MyApp                   com.example.facelivenessapp          E  Failed to start the face liveness session.
2023-06-06 12:18:43.849  7505-7505  MyApp                   com.example.facelivenessapp          E  com.amplifyframework.ui.liveness.model.FaceLivenessDetectionException@dba6ee3
2023-06-06 12:18:43.850  7505-7505  DeferrableSurface       com.example.facelivenessapp          D  surface closed,  useCount=1 closed=true androidx.camera.core.SurfaceRequest$2@767d96f
2023-06-06 12:18:43.850  7505-7505  DeferrableSurface       com.example.facelivenessapp          D  surface closed,  useCount=1 closed=true androidx.camera.core.impl.ImmediateSurface@96a5281
2023-06-06 12:18:43.850  7505-7672  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Use cases [androidx.camera.core.Preview-4e6a82f2-85fb-4227-8208-82b57999b64d192846338, androidx.camera.core.ImageAnalysis-74a64b0d-4d90-4077-bde9-e28f1a89d545123756307] now DETACHED for camera
2023-06-06 12:18:43.851  7505-7672  UseCaseAttachState      com.example.facelivenessapp          D  All use case: [] for camera: 1
2023-06-06 12:18:43.851  7505-7672  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Resetting Capture Session
2023-06-06 12:18:43.852  7505-7672  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Releasing session in state OPENED
2023-06-06 12:18:43.852  7505-7672  UseCaseAttachState      com.example.facelivenessapp          D  Active and attached use case: [] for camera: 1
2023-06-06 12:18:43.852  7505-7672  UseCaseAttachState      com.example.facelivenessapp          D  Active and attached use case: [] for camera: 1
2023-06-06 12:18:43.853  7505-7672  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Closing camera.
2023-06-06 12:18:43.853  7505-7672  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Transitioning camera internal state: OPENED --> CLOSING
2023-06-06 12:18:43.853  7505-7672  CameraStateRegistry     com.example.facelivenessapp          D  Recalculating open cameras:
                                                                                                    Camera                                       State                 
                                                                                                    -------------------------------------------------------------------
                                                                                                    Camera@8c09fbb[id=1]                         CLOSING               
                                                                                                    Camera@c1cbef0[id=2]                         UNKNOWN               
                                                                                                    Camera@c7023fd[id=0]                         UNKNOWN               
                                                                                                    Camera@4d4edab[id=3]                         UNKNOWN               
                                                                                                    -------------------------------------------------------------------
                                                                                                    Open count: 1 (Max allowed: 1)
2023-06-06 12:18:43.854  7505-7672  CameraStateMachine      com.example.facelivenessapp          D  New public camera state CameraState{type=CLOSING, error=null} from CLOSING and null
2023-06-06 12:18:43.854  7505-7672  CameraStateMachine      com.example.facelivenessapp          D  Publishing new public camera state CameraState{type=CLOSING, error=null}
2023-06-06 12:18:43.855  7505-7672  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Resetting Capture Session
2023-06-06 12:18:43.855  7505-7672  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Releasing session in state CLOSING
2023-06-06 12:18:43.855  7505-7672  CaptureSession          com.example.facelivenessapp          D  onSessionFinished()
2023-06-06 12:18:43.860  7505-7505  DecorView               com.example.facelivenessapp          I  notifyKeepScreenOnChanged: keepScreenOn=false
2023-06-06 12:18:43.860  7505-7505  DecorView               com.example.facelivenessapp          I  notifyKeepScreenOnChanged: keepScreenOn=false
2023-06-06 12:18:43.860  7505-7659  ACodec                  com.example.facelivenessapp          I  [OMX.qcom.video.encoder.vp8] Now Executing->Idle
2023-06-06 12:18:43.864  7505-7659  ACodec                  com.example.facelivenessapp          I  [OMX.qcom.video.encoder.vp8] Now Idle->Loaded
2023-06-06 12:18:43.864  7505-7659  ACodec                  com.example.facelivenessapp          I  [OMX.qcom.video.encoder.vp8] Now Loaded
2023-06-06 12:18:43.864  7505-7659  ACodec                  com.example.facelivenessapp          I   [OMX.qcom.video.encoder.vp8] Now kWhatShutdownCompleted event : 7985
2023-06-06 12:18:43.869  7505-7659  ACodec                  com.example.facelivenessapp          I   [OMX.qcom.video.encoder.vp8] Now uninitialized
2023-06-06 12:18:43.869  7505-7659  ACodec                  com.example.facelivenessapp          I   [] Now kWhatShutdownCompleted event : 7985
2023-06-06 12:18:43.869  7505-7658  MediaCodec              com.example.facelivenessapp          I  Codec shutdown complete
2023-06-06 12:18:43.877  7505-7505  ViewRootIm...nActivity] com.example.facelivenessapp          I  Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=4 res=0x1 s={true -5476376665515323392} ch=false fn=20
2023-06-06 12:18:43.933  7505-7519  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_IDLE for client com.example.facelivenessapp API Level 2
2023-06-06 12:18:44.035  7505-7519  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_PRESENT
2023-06-06 12:18:44.035  7505-7519  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_PRESENT
2023-06-06 12:18:44.035  7505-7519  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_PRESENT
2023-06-06 12:18:44.035  7505-7519  CameraManagerGlobal     com.example.facelivenessapp          I  postSingleUpdate device: camera id 1 status STATUS_PRESENT
2023-06-06 12:18:44.036  7505-7522  CameraManagerGlobal     com.example.facelivenessapp          I  Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client com.example.facelivenessapp API Level 2
2023-06-06 12:18:44.036  7505-7674  facelivenessap          com.example.facelivenessapp          W  Long monitor contention with owner CameraX-core_camera_0 (7672) at void android.hardware.camera2.impl.CameraDeviceImpl.close()(CameraDeviceImpl.java:1400) waiters=0 in void android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.onCaptureStarted(android.hardware.camera2.impl.CaptureResultExtras, long) for 165ms
2023-06-06 12:18:44.036  7505-7672  UseCaseAttachState      com.example.facelivenessapp          D  Active and attached use case: [] for camera: 1
2023-06-06 12:18:44.036  7505-7672  DeferrableSurface       com.example.facelivenessapp          D  use count-1,  useCount=0 closed=true androidx.camera.core.SurfaceRequest$2@767d96f
2023-06-06 12:18:44.036  7505-7672  DeferrableSurface       com.example.facelivenessapp          D  Surface no longer in use[total_surfaces=2, used_surfaces=1](androidx.camera.core.SurfaceRequest$2@767d96f}
2023-06-06 12:18:44.037  7505-7672  DeferrableSurface       com.example.facelivenessapp          D  Surface terminated[total_surfaces=1, used_surfaces=1](androidx.camera.core.SurfaceRequest$2@767d96f}
2023-06-06 12:18:44.037  7505-7672  DeferrableSurface       com.example.facelivenessapp          D  use count-1,  useCount=0 closed=true androidx.camera.core.impl.ImmediateSurface@96a5281
2023-06-06 12:18:44.037  7505-7672  DeferrableSurface       com.example.facelivenessapp          D  Surface no longer in use[total_surfaces=1, used_surfaces=0](androidx.camera.core.impl.ImmediateSurface@96a5281}
2023-06-06 12:18:44.037  7505-7672  DeferrableSurface       com.example.facelivenessapp          D  Surface terminated[total_surfaces=0, used_surfaces=0](androidx.camera.core.impl.ImmediateSurface@96a5281}
2023-06-06 12:18:44.037  7505-7672  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} CameraDevice.onClosed()
2023-06-06 12:18:44.037  7505-7672  Camera2CameraImpl       com.example.facelivenessapp          D  {Camera@8c09fbb[id=1]} Transitioning camera internal state: CLOSING --> INITIALIZED
2023-06-06 12:18:44.038  7505-7672  CameraStateRegistry     com.example.facelivenessapp          D  Recalculating open cameras:
                                                                                                    Camera                                       State                 
                                                                                                    -------------------------------------------------------------------
                                                                                                    Camera@8c09fbb[id=1]                         CLOSED                
                                                                                                    Camera@c1cbef0[id=2]                         UNKNOWN               
                                                                                                    Camera@c7023fd[id=0]                         UNKNOWN               
                                                                                                    Camera@4d4edab[id=3]                         UNKNOWN               
                                                                                                    -------------------------------------------------------------------
                                                                                                    Open count: 0 (Max allowed: 1)
2023-06-06 12:18:44.038  7505-7672  CameraStateMachine      com.example.facelivenessapp          D  New public camera state CameraState{type=CLOSED, error=null} from CLOSED and null
2023-06-06 12:18:44.038  7505-7672  CameraStateMachine      com.example.facelivenessapp          D  Publishing new public camera state CameraState{type=CLOSED, error=null}
2023-06-06 12:18:47.546  7505-7732  ProfileInstaller        com.example.facelivenessapp          D  Installing profile for com.example.facelivenessapp
2023-06-06 12:19:02.149  7505-7517  System                  com.example.facelivenessapp          W  A resource failed to call close. 
2023-06-06 12:19:02.150  7505-7517  System                  com.example.facelivenessapp          W  A resource failed to call close. 
2023-06-06 12:19:02.150  7505-7517  System                  com.example.facelivenessapp          W  A resource failed to call release. 

amplifyconfiguration.json

No response

Additional information and screenshots

Please refer to the attached video to see the issue in action. The video demonstrates the camera opening briefly and closing unexpectedly.

https://github.com/aws-amplify/amplify-ui-android/assets/47090675/660af5c2-25e1-4480-9c7f-82616ba93753

Velja85 commented 1 year ago

I Have been experiencing the same error (just different processor kirin) with a Native android app on a Huawei P30 phone. The behavior on screen is the same as on the issue provided video. The logs of the crash: logs.txt

Short update after more testing. Also this is happening with the example app (amplify-ui-android/samples/liveness).

mRamzii commented 1 year ago

I have the same problem, using the demo app doesn't work either.

Please fix this as it blocks us from using Amplify & Rekognition Liveliness for our Android App.

WIKO W-P311 @ Android 9

Under-Warz commented 12 months ago

In addition with the previous comment of @mRamzii , our error seems located on the Predictions plugin and the websocket. Here is some additional log. It seems that the plugin Predictions crash when sending/emitting video stream.

log.txt

BashIsFun commented 12 months ago

This is a serious blocker for us aswell ! we are facing exactly the same issue as @Under-Warz

We tried looking into the source code to figure out what's going on but didn't manage to.

It's very unfortunate since AWS has been pushing the use of liveliness in our apps for some time now, now that we have decided to use it, it doesn't work :(

Can we have some insider insights on what could be causing this issue ? Maybe in order to be able to collaborate and fix the bug ourselves.

Thank you

tylerjroach commented 12 months ago

@Under-Warz and @BashIsFun Can you specifically list the problematic device(s)?

For each of you, is it working on most devices, but not all? Or not working at all?

I think this issue is getting multiple issues grouped together with it. [Access denied finding property "ro.mediatek.platform"](https://github.com/aws-amplify/amplify-ui-android/issues/44#top) is just a log that prints on most devices and from what I've seen, not indicitive of a problem. In the original issue, the error is occurring almost immediately when the camera opens. However, @Under-Warz in the log you posted, it appears that you get an error about 20 seconds after the camera is opened. To me, this looks like a timeout where the server did not receive any video events. This could be due to a network issue, or the encoder/muxer failing to generate camera frames. This would deserve a different issue than the ticket posted here.

If the issue appears to be different (not failing after immediately launching the camera), please post a new ticket with details of:

Thank you

Under-Warz commented 12 months ago

hello @tylerjroach exactly, it's crashing when liveness session is about to start before the countdown. I'm opening another issue with the details you asked.

Thank's

tylerjroach commented 11 months ago

These issues have typically been due to bath auth tokens. The latest version of Liveness has improved in logging auth errors. @resultanyildizi Please comment if you are still seeing issues. I'll go ahead and mark this as closing soon until we hear a response.