Open thewebdepotteam opened 1 month ago
Hi, You need to update the build.gradle to fetch the artifacts from our URL as depicted in build.gradle file. It seems you are trying to fetch the artifacts from https"//jitpack.io" which is expected to fail since the artifacts are hosted on https://pkgs.dev.azure.com/msface/SDK/_packaging/AzureAIVision/maven/v1
Please follow this build.gradle to setup correct maven repo and password https://github.com/Azure-Samples/azure-ai-vision-sdk/blob/b47ca6f4a95455724ca10d0940debccd92912bb0/samples/kotlin/face/FaceAnalyzerSample/build.gradle#L22C18-L22C89
Thanks for the update the code is compiling as per suggestion, but after integrating in our flutter project when we try to start liveness check our app crashes Please find the log below of the crash and guide us how to resolve the same.
W/survey.training(19486): Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed) D/CompatibilityChangeReporter(19486): Compat change id reported: 210923482; UID 10595; state: ENABLED I/flutter (19486): liveness result: Error I/survey.training(19486): Compiler allocated 4271KB to compile void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int) I/CameraManagerGlobal(19486): Connecting to camera service D/CameraExtStub(19486): init android.hardware.camera2.impl.CameraExtImplXiaoMi D/CameraInjector(19486): waitForResult: D/CameraInjector(19486): updateCloudCameraControllerInfoAsync: E D/CameraInjector(19486): updateCloudCameraControllerInfoAsync: X W/CameraExtImplXiaoMi(19486): ignore the status update of camera: 2 D/CameraInjector(19486): updateCloudCameraControllerInfoAsync: has aleardy start update task. D/CameraInjector(19486): waitForResult: W/CameraExtImplXiaoMi(19486): ignore the status update of camera: 3 D/CameraInjector(19486): updateCloudCameraControllerInfoAsync: has aleardy start update task. D/CameraInjector(19486): waitForResult: W/CameraExtImplXiaoMi(19486): ignore the status update of camera: 4 D/CameraInjector(19486): updateCloudCameraControllerInfoAsync: has aleardy start update task. D/CameraInjector(19486): waitForResult: W/survey.training(19486): Long monitor contention with owner main (19486) at java.lang.String[] android.hardware.camera2.CameraManager$CameraManagerGlobal.getCameraIdList()(CameraManager.java:2206) waiters=0 in java.lang.String[] android.hardware.camera2.CameraManager$CameraManagerGlobal.getCameraIdList() for 122ms D/CameraInjector(19486): updateCloudCameraControllerInfoAsync: has aleardy start update task. D/CameraInjector(19486): waitForResult: D/CameraInjector(19486): updateCloudCameraControllerInfoAsync: has aleardy start update task. D/CameraInjector(19486): waitForResult: W/CameraManagerGlobal(19486): ignore the torch status update of camera: 2 D/CameraInjector(19486): updateCloudCameraControllerInfoAsync: has aleardy start update task. D/CameraInjector(19486): waitForResult: W/CameraManagerGlobal(19486): ignore the torch status update of camera: 3 D/CameraInjector(19486): updateCloudCameraControllerInfoAsync: has aleardy start update task. D/CameraInjector(19486): waitForResult: W/CameraManagerGlobal(19486): ignore the torch status update of camera: 4 I/FACE_TELEMETRY(19486): INFO_SUPPORTED_HARDWARE_LEVEL:3 D/CameraRepository(19486): Added camera: 0 I/Camera2CameraInfo(19486): Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_3 D/CameraRepository(19486): Added camera: 1 I/Camera2CameraInfo(19486): Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_3 D/CameraValidator(19486): Verifying camera lens facing on xagain, lensFacingInteger: null W/System.err(19486): java.lang.NoSuchMethodError: no non-static method "Lcom/azure/ai/vision/common/internal/implementation/IntRef;.setValue(J)V" W/System.err(19486): at com.azure.ai.vision.common.internal.implementation.PropertiesJNI.corePropertiesCreateHandle(Native Method) W/System.err(19486): at com.azure.ai.vision.common.internal.implementation.PropertiesJNI.createPropertiesHandle(PropertiesJNI.java:28) W/System.err(19486): at com.azure.android.ai.vision.common.FrameFormat.createFourCCFormat(FrameFormat.java:55) W/System.err(19486): at com.azure.android.ai.vision.common.FrameFormat.createRGBFormat(FrameFormat.java:80) W/System.err(19486): at com.azure.android.ai.vision.common.CameraXSourceInternal.<init>(CameraXSourceInternal.kt:151) W/System.err(19486): at com.azure.android.ai.vision.common.AndroidCamera$Companion.create(AndroidCamera.kt:128) W/System.err(19486): at com.azure.android.ai.vision.common.VisionSource.fromDefaultCamera(VisionSource.java:287) W/System.err(19486): at biz.godrejcp.survey.AnalyzeActivity.onResume(AnalyzeActivity.kt:105) W/System.err(19486): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1617) W/System.err(19486): at android.app.Activity.performResume(Activity.java:9045) W/System.err(19486): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5250) W/System.err(19486): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5294) W/System.err(19486): at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:57) W/System.err(19486): at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) W/System.err(19486): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:190) W/System.err(19486): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:101) W/System.err(19486): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2616) W/System.err(19486): at android.os.Handler.dispatchMessage(Handler.java:106) W/System.err(19486): at android.os.Looper.loopOnce(Looper.java:222) W/System.err(19486): at android.os.Looper.loop(Looper.java:314) W/System.err(19486): at android.app.ActivityThread.main(ActivityThread.java:8716) W/System.err(19486): at java.lang.reflect.Method.invoke(Native Method) W/System.err(19486): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:565) W/System.err(19486): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) W/System.err(19486): java.lang.NoSuchMethodError: no non-static method "Lcom/azure/ai/vision/common/internal/implementation/IntRef;.setValue(J)V" W/System.err(19486): at com.azure.ai.vision.common.internal.implementation.PropertiesJNI.corePropertiesCreateHandle(Native Method) W/System.err(19486): at com.azure.ai.vision.common.internal.implementation.PropertiesJNI.createPropertiesHandle(PropertiesJNI.java:28) W/System.err(19486): at com.azure.android.ai.vision.faceanalyzer.FaceAnalyzerCreateOptions.<init>(FaceAnalyzerCreateOptions.java:22) W/System.err(19486): at biz.godrejcp.survey.AnalyzeActivity.createFaceAnalyzer(AnalyzeActivity.kt:145) W/System.err(19486): at biz.godrejcp.survey.AnalyzeActivity.onResume(AnalyzeActivity.kt:109) W/System.err(19486): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1617) W/System.err(19486): at android.app.Activity.performResume(Activity.java:9045) W/System.err(19486): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5250) W/System.err(19486): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5294) W/System.err(19486): at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:57) W/System.err(19486): at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) W/System.err(19486): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:190) W/System.err(19486): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:101) W/System.err(19486): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2616) W/System.err(19486): at android.os.Handler.dispatchMessage(Handler.java:106) W/System.err(19486): at android.os.Looper.loopOnce(Looper.java:222) W/System.err(19486): at android.os.Looper.loop(Looper.java:314) W/System.err(19486): at android.app.ActivityThread.main(ActivityThread.java:8716) W/System.err(19486): at java.lang.reflect.Method.invoke(Native Method) W/System.err(19486): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:565) W/System.err(19486): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) D/AndroidRuntime(19486): Shutting down VM E/AndroidRuntime(19486): FATAL EXCEPTION: main
Can you please confirm if you are able to run the sample successfully ? If so, can you confirm that you are using the same dependencies as specified in the sample and you see camera turn on before the crash ?
We tried the sample and it ran successfully, we added our endpoint and key and clicked on Liveness button and then the start button we get the following error
Results Error : Missing or incorrect settings
and then when we click on retry we get a white screen with a black circle (screenshot attached)
The Phone we are using is on Android 11
Please help in resolving the issue
Can you make sure the endpoint and key are from the same subscription that has access to FaceLiveness ? Also please make sure there are no trailing slashes at the end of URL for the sample.
This error is for cases where Token generation is failing. It would be good if you can look at Network calls and see why call the
![Uploading azureapp.png…]()
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Any log messages given by the failure
`FAILURE: Build failed with an exception.
Expected/desired behavior
OS and Version?
Versions
Mention any other details that might be useful