Skip to content

fix(macos): Keychain secrets fail without keychain-access-groups; use the login keychain #1586

Open

Description

@ZhuchkaTriplesix

Problem

flutter_secure_storage_darwin defaults to usesDataProtectionKeychain: true (FlutterSecureStorageDarwinPlugin.swift:180), which needs the keychain-access-groups entitlement. None of DebugProfile.entitlements, Release.entitlements, ReleaseSigned.entitlements declare it, and lib/core/storage/connection_secrets_store.dart uses const FlutterSecureStorage() with no macOS options.

Expected on macOS: errSecMissingEntitlement (-34018) on write/read, surfaced as SecretsStoreUnavailableException ("Could not read the saved credentials from the system keyring").

Fix

Do not add keychain-access-groups to ReleaseSigned.entitlements: it is a restricted entitlement that needs a provisioning profile for Developer ID, and the app would fail to launch. Instead pass MacOsOptions(usesDataProtectionKeychain: false) (mOptions) so the file-based login keychain is used.

Tasks

  • Reproduce on a real Mac (debug, unsigned release, signed release).
  • Set mOptions: MacOsOptions(usesDataProtectionKeychain: false).
  • Check existing installs: items written with the data protection keychain (if any) must still be readable, or migrated.
  • Test on signed + notarized and on ad-hoc builds.

Found in the macOS review; confirm on device first.

Activity

  1. added
    bugSomething isn't working
    stabilityTheme parser epic label: stability
    connectionsDatabase connections, URI parsing, pools
    P1High priority / Core capability
    on Oct 14, 2026
  2. added a commit that references this issue on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priority / Core capabilitybugSomething isn't workingconnectionsDatabase connections, URI parsing, poolsstabilityTheme parser epic label: stability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions