regulaforensics / flutter_face_api

MIT License
31 stars 14 forks source link

FATAL EXCEPTION: main java.lang.IncompatibleClassChangeError #32

Closed miguelangelflores1993 closed 6 months ago

miguelangelflores1993 commented 6 months ago

Before Submitting, be sure to

Bug Description

E/AndroidRuntime( 6483): FATAL EXCEPTION: main
E/AndroidRuntime( 6483): Process: com.validmeapp.release, PID: 6483
E/AndroidRuntime( 6483): java.lang.IncompatibleClassChangeError: The method 'void com.regula.common.utils.RegulaLog.d(java.lang.String)' was expected to be of type static but instead was found to be of type virtual (declaration of 'com.regula.facesdk.FaceSDK' appears in /data/app/~~G4vIflkRjqSqsqlkuSwroQ==/com.validmeapp.release-rt-iP6T1nbc9dG0fTma2gA==/base.apk!classes6.dex)
E/AndroidRuntime( 6483):    at com.regula.facesdk.FaceSDK.startLiveness(SourceFile:4)
E/AndroidRuntime( 6483):    at com.regula.facesdk.FaceSDK.startLiveness(SourceFile:2)
E/AndroidRuntime( 6483):    at io.flutter.plugins.regula.faceapi.flutter_face_api.FlutterFaceApiPlugin.startLiveness(FlutterFaceApiPlugin.java:274)
E/AndroidRuntime( 6483):    at io.flutter.plugins.regula.faceapi.flutter_face_api.FlutterFaceApiPlugin.onMethodCall(FlutterFaceApiPlugin.java:134)
E/AndroidRuntime( 6483):    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/AndroidRuntime( 6483):    at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/AndroidRuntime( 6483):    at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/AndroidRuntime( 6483):    at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/AndroidRuntime( 6483):    at android.os.Handler.handleCallback(Handler.java:958)
E/AndroidRuntime( 6483):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 6483):    at android.os.Looper.loopOnce(Looper.java:222)
E/AndroidRuntime( 6483):    at android.os.Looper.loop(Looper.java:314)
E/AndroidRuntime( 6483):    at android.app.ActivityThread.main(ActivityThread.java:8670)
E/AndroidRuntime( 6483):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 6483):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:565)
E/AndroidRuntime( 6483):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)

I/Process ( 7167): Process is going to kill itself!
I/Process ( 7167): java.lang.Exception
I/Process ( 7167):  at android.os.Process.killProcess(Process.java:1346)
I/Process ( 7167):  at com.android.internal.os.RuntimeInit$KillApplicationHandler.uncaughtException(RuntimeInit.java:178)
I/Process ( 7167):  at io.sentry.UncaughtExceptionHandlerIntegration.uncaughtException(UncaughtExceptionHandlerIntegration.java:134)
I/Process ( 7167):  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1071)
I/Process ( 7167):  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1066)
I/Process ( 7167):  at io.flutter.embedding.engine.dart.DartMessenger.handleError(DartMessenger.java:419)
I/Process ( 7167):  at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:300)
I/Process ( 7167):  at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
I/Process ( 7167):  at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
I/Process ( 7167):  at android.os.Handler.handleCallback(Handler.java:958)
I/Process ( 7167):  at android.os.Handler.dispatchMessage(Handler.java:99)
I/Process ( 7167):  at android.os.Looper.loopOnce(Looper.java:222)
I/Process ( 7167):  at android.os.Looper.loop(Looper.java:314)
I/Process ( 7167):  at android.app.ActivityThread.main(ActivityThread.java:8670)
I/Process ( 7167):  at java.lang.reflect.Method.invoke(Native Method)
I/Process ( 7167):  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:565)
I/Process ( 7167):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)

Steps To Reproduce

  1. start document reader

  2. open SCAN

  3. .scan( ScannerConfig.withScenario( Scenario.FULL_PROCESS, ), handleCompletion

  4. startLiveness()

  5. error appears and the application closes. Expected behavior

Screenshots

Environment:

Additional context USE VERSIONS

flutter_face_api: 5.2.3 flutter_face_core: 5.2.0 flutter_document_reader_api: 7.1.1 flutter_document_reader_core_full: 7.1.0

FLUTTER VERSION 3.16.9 GRADLE VERSION 8.1.1 ext.kotlin_version = '1.9.0' minSdkVersion 21 targetSdkVersion 34 distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip

miguelangelflores1993 commented 6 months ago

@syakimchik @AndreiPaulau @DmitrySmolyakov @PavelMasuk help plis!!

I have migrated document Reader from 6.9 to 7.1 and I got this problem.

PavelMasuk commented 6 months ago

Thats most likely because of incompatibility of versions of DocumentReader and FaceApi. We will release the new version of FaceApi plugin around next week, if you want to use FaceApi with DocumentReader 7.1, you’ll have to wait for FaceApi 6.1+

carlos-olivera commented 6 months ago

@syakimchik @AndreiPaulau @DmitrySmolyakov @PavelMasuk help plis!!

I have migrated document Reader from 6.9 to 7.1 and I got this problem.

I have the same issue

syakimchik commented 6 months ago

@carlos-olivera see

miguelangelflores1993 commented 6 months ago

@syakimchik @PavelMasuk

flutter_face_api: 6.1.0 flutter_face_core_basic: 6.1.0

I/flutter (29849): Init failed: I/flutter (29849): {"error":{"errorCode":"RESOURCE_DAT_ABSENT"},"success":false}

PavelMasuk commented 6 months ago

You need to add

    aaptOptions {
        noCompress "Regula/faceSdkResource.dat"
    }

into android section of your app/build.gradle, just like it's done in our example