-
Notifications
You must be signed in to change notification settings - Fork 127
Closed
Labels
Description
Before creating a new issue, please confirm:
- I have searched for duplicate or closed issues.
- I have read the guide for submitting bug reports.
Which UI component?
Liveness
Gradle script dependencies
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
// FaceLivenessDetector dependency
implementation 'com.amplifyframework.ui:liveness:1.6.0'
// Amplify Auth dependency (unnecessary if using your own credentials provider)
implementation 'com.amplifyframework:aws-auth-cognito:2.29.0'
// Material3 dependency for theming FaceLivenessDetector
implementation 'androidx.compose.material3:material3:1.1.2'
// Support for Java 8 features
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
implementation "androidx.activity:activity-ktx:1.8.1"
implementation 'androidx.activity:activity-compose:1.4.0'
implementation "com.android.billingclient:billing:6.1.0"
Environment information
------------------------------------------------------------
Gradle 8.10.2
------------------------------------------------------------
Build time: 2024-09-23 21:28:39 UTC
Revision: 415adb9e06a516c44b391edff552fd42139443f7
Kotlin: 1.9.24
Groovy: 3.0.22
Ant: Apache Ant(TM) version 1.10.14 compiled on August 16 2023
Launcher JVM: 23.0.2 (Homebrew 23.0.2)
Daemon JVM: /opt/homebrew/Cellar/openjdk/23.0.2/libexec/openjdk.jdk/Contents/Home (no JDK specified, using current Java home)
OS: Mac OS X 15.1 aarch64
Please include any relevant guides or documentation you're referencing
Fatal Exception: java.lang.RuntimeException
Describe the bug
We are getting runtime expection crash in firebase console and we are unable to reproduce this issue from our end and adding text file as well.
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.elevn.prod/com.amplifyframework.devmenu.DeveloperMenuActivity}: android.view.InflateException: Binary XML file line aws-amplify/amplify-ui-android#48 in com.elevn.prod:layout/activity_dev_menu: Binary XML file line aws-amplify/amplify-ui-android#48 in com.elevn.prod:layout/activity_dev_menu: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3433)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3607)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2068)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7680)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:423)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Reproduction steps (if applicable)
No response
Code Snippet
`package com.elevn.dating
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.widget.Toast
import androidx.activity.compose.setContent
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Snackbar
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
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 LiveVerificationActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val sessionId = intent.getStringExtra("sessionId") ?: ""
val intent = Intent();
Log.d("here", "starting faceliveness detection")
Log.d("sessionId", sessionId)
getSupportActionBar()?.hide()
setContent {
MaterialTheme(colorScheme = LivenessColorScheme.default()) {
FaceLivenessDetector(
sessionId = sessionId,
region = "ap-south-1",
disableStartView = true,
onComplete = {
Log.i("sucess", "you are in sucess")
// callback?.onCompleteCallback()
intent.putExtra("result", "success");
setResult(Activity.RESULT_OK, intent);
finish();
},
onError = { error ->
intent.putExtra("errorResult", error.message);
setResult(Activity.RESULT_CANCELED, intent);
finish();
})
}
}
}
}`
Log output
[com.elevn.prod_issue_74a0c7c3e94e153238eb7ba8ed2b9fd7_crash_session_68C0086A028E00013ADA72FA2F07B884_DNE_0_v2_stacktrace.txt](https://github.com/user-attachments/files/22250389/com.elevn.prod_issue_74a0c7c3e94e153238eb7ba8ed2b9fd7_crash_session_68C0086A028E00013ADA72FA2F07B884_DNE_0_v2_stacktrace.txt)
Configuration File
No response
Additional information and screenshots
No response