flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.17k stars 27.48k forks source link

[local_auth] After the face authentication is completed, if you click the Cancel button, a crash occurs. #105879

Closed JosephNK closed 2 years ago

JosephNK commented 2 years ago

If you press the Cancel button after completing Face authentication, the crash below always occurs, and the status is Authentication in progress.

Code sample

try {
  LocalAuthentication? auth = LocalAuthentication();
  final bool didAuthenticate = await auth.authenticate(
                              localizedReason:  'Please authenticate',
                              options: const AuthenticationOptions(),
                            );
} on PlatformException catch (e) {
  Logging.e('error: $e');
}

Logs

W/Binder  ( 2685): Caught a RuntimeException from the binder stub implementation.
W/Binder  ( 2685): java.lang.NullPointerException: Attempt to read from field 'java.util.concurrent.Executor android.hardware.biometrics.BiometricPrompt$ButtonInfo.executor' on a null object reference
W/Binder  ( 2685):  at android.hardware.biometrics.BiometricPrompt$1.onDialogDismissed(BiometricPrompt.java:705)
W/Binder  ( 2685):  at android.hardware.biometrics.IBiometricServiceReceiver$Stub.onTransact(IBiometricServiceReceiver.java:174)
W/Binder  ( 2685):  at android.os.Binder.execTransactInternal(Binder.java:1220)
W/Binder  ( 2685):  at android.os.Binder.execTransact(Binder.java:1179)
error: PlatformException(auth_in_progress, Authentication in progress, null, null)

Flutter Doctor

[✓] Flutter (Channel stable, 2.10.3, on macOS 11.6.1 20G224 darwin-x64, locale ko-KR)
    • Flutter version 2.10.3 at /Users/josephnk/Library/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (3 months ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/josephnk/Library/Android/sdk
    • Platform android-31, build-tools 30.0.3
    • ANDROID_HOME = /Users/josephnk/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] VS Code (version 1.65.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • SM G988N (mobile) • R3CN30FL4LT • android-arm64  • Android 12 (API 31)
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 102.0.5005.61

[✓] HTTP Host Availability
    • All required HTTP hosts are available
maheshj01 commented 2 years ago

Hi @JosephNK, Thanks for filing the issue. Please share a minimal and complete code sample along with the output of flutter doctor -v and flutter run -v(in a text file as the output will be long)

github-actions[bot] commented 2 years ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.