Skip to content

[local_auth] "authenticate" with parameter "useErrorDialogs = true" does not open a dialog #96646

Closed
flutter/packages
#9981

Description

@cyrax111

On Android devices when you try to authenticate with parameter useErrorDialogs = true and the device has hardware biometrics but it is not enrolled - the exception "not enrolled" appear but dialog for going to enroll does not.
On iOS devices it works as expected.

I make a simple project to test it: https://github.com/cyrax111/local_auth_test.

flutter doctor -v

[✓] Flutter (Channel stable, 2.8.1, on macOS 12.0.1 21A559 darwin-x64, locale en-RU)
    • Flutter version 2.8.1 at /Users/administrator/Documents/src/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (4 weeks ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/administrator/Library/Android/sdk
    • Platform android-31, build-tools 30.0.2
    • 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.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.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.63.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.32.0

[✓] Connected device (4 available)
    • SM A730F (mobile)  • 5200c47cb44d3569                     • android-arm64  • Android 9 (API 28)
    • iPhone 12 (mobile) • 084A7514-3F4F-4B7D-9ADB-75E7250DE761 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64     • macOS 12.0.1 21A559 darwin-x64
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 97.0.4692.71

• No issues found!

Activity

  1. changed the title [-][local_auth] "authenticate" with parameter "useErrorDialogs = true" does not open a dialog (useErrorDialogs)[/-] [+][local_auth] "authenticate" with parameter "useErrorDialogs = true" does not open a dialog[/+] on Jan 14, 2022
  2. cyrax111 commented on Jan 14, 2022

    @cyrax111
    Author

    Tested on devices:

    1. SM A730F Android 9 (the problem reproduced)
    2. Opppo A52 Android 11 (the problem reproduced)
    3. Apple 11 Pro Max iOS 14.8.1 (works as expected)
  3. darshankawar commented on Jan 14, 2022

    @darshankawar
    Member

    @cyrax111
    Do you get any error when the dialog doesn't open pertaining to not enrolled ? , I guess you are hitting this issue #45497

  4. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jan 14, 2022
  5. cyrax111 commented on Jan 17, 2022

    @cyrax111
    Author

    @darshankawar I have got not enrolled error

  6. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jan 17, 2022
  7. cyrax111 commented on Jan 17, 2022

    @cyrax111
    Author

    I think the issue is close to #45497 but not the same.

  8. darshankawar commented on Jan 18, 2022

    @darshankawar
    Member

    Thanks for the update. Using the code sample provided and running it on S10 device, I do get the same behavior, ie the dialog to enroll does not open.

    master, stable flutter doctor -v
    
    [√] Flutter (Channel master, 2.9.0-1.0.pre.145, on Microsoft Windows [Version 10.0.19042.1415], locale en-US)
        • Flutter version 2.9.0-1.0.pre.145 at D:\FlutterSDK\flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 209d316b4b (2 days ago), 2021-12-21 02:59:21 -0500
        • Engine revision 202e4a6d16
        • Dart version 2.16.0 (build 2.16.0-123.0.dev)
        • DevTools version 2.9.1
    
    [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at C:\Users\Win\AppData\Local\Android\sdk
        • Platform android-31, build-tools 31.0.0
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
        • All Android licenses accepted.
    
    [√] Chrome - develop for the web
        • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
    
    [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.2)
        • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
        • Visual Studio Community 2019 version 16.11.31624.102
        • Windows 10 SDK version 10.0.19041.0
    
    [√] Android Studio (version 2020.3)
        • Android Studio at C:\Program Files\Android\Android Studio
        • 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-7249189)
    
    [√] VS Code (version 1.62.3)
        • VS Code at C:\Users\Win\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.28.0
    
    [√] Connected device (5 available)
        • SM G975F (mobile)       • RZ8M802WY0X • android-arm64   • Android 11 (API 30)
        • Windows (desktop)       • windows     • windows-x64     • Microsoft Windows [Version 10.0.19042.1415]
        • Windows (UWP) (desktop) • winuwp      • windows-uwp-x64 •
        • Chrome (web)            • chrome      • web-javascript  • Google Chrome 96.0.4664.110
        • Edge (web)              • edge        • web-javascript  • Microsoft Edge 96.0.1054.62
    
    [√] HTTP Host Availability
        • All required HTTP hosts are available
    
    • No issues found!
    
    [√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1348], locale en-US)
        • Flutter version 2.8.1 at D:\FlutterSDK\flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision cf44000065 (8 hours ago), 2021-12-08 14:06:50 -0800
        • Engine revision 40a99c5951
        • Dart version 2.15.1
    
    [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at C:\Users\Win\AppData\Local\Android\sdk
        • Platform android-31, build-tools 31.0.0
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
        • All Android licenses accepted.
    
    [√] Chrome - develop for the web
        • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
    
    [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.2)
        • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
        • Visual Studio Community 2019 version 16.11.31624.102
        • Windows 10 SDK version 10.0.19041.0
    
    [√] Android Studio (version 2020.3)
        • Android Studio at C:\Program Files\Android\Android Studio
        • 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-7249189)
    
    [√] VS Code (version 1.61.0)
        • VS Code at C:\Users\Win\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.27.0
    
    [√] Connected device (5 available)
        • SM G975F (mobile)       • RZ8M802WY0X • android-arm64   • Android 11 (API 30)
        • Windows (desktop)       • windows     • windows-x64     • Microsoft Windows [Version 10.0.19042.1415]
        • Windows (UWP) (desktop) • winuwp      • windows-uwp-x64 •
        • Chrome (web)            • chrome      • web-javascript  • Google Chrome 96.0.4664.110
        • Edge (web)              • edge        • web-javascript  • Microsoft Edge 96.0.1054.62
    
    • No issues found!
    
    
  9. 15 remaining items

  10. LueNC commented on Sep 14, 2023

    @LueNC

    I am experiencing similar issues. If I have a pincode enabled but no biometrics it will show the dialog however if the pincode is not enabled it will not show the dialog.

  11. chaitanya-penjri commented on Dec 4, 2023

    @chaitanya-penjri
  12. LulleBulle commented on Aug 15, 2024

    @LulleBulle
  13. cuberob commented on Aug 27, 2024

    @cuberob
  14. added
    r: fixedIssue is closed as already fixed in a newer version
    on Oct 27, 2025
  15. github-actions commented on Nov 10, 2025

    @github-actions

    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.

  16. locked as resolved and limited conversation to collaborators on Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Important issues not at the top of the work listfound in release: 2.8Found to occur in 2.8found in release: 2.9Found to occur in 2.9has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: local_authPlugin for local authentificationpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions