Skip to content

FlutterSecureStorage on macos build macOS (darwin) fails #689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ysimonx opened this issue Mar 12, 2024 · 3 comments
Closed

FlutterSecureStorage on macos build macOS (darwin) fails #689

ysimonx opened this issue Mar 12, 2024 · 3 comments

Comments

@ysimonx
Copy link

ysimonx commented Mar 12, 2024

Tested on 2 différent macbook m1

final _storage = const FlutterSecureStorage();

await _storage.write(key: "lastStatus", value: "chrono");
String? x = await _storage.read(key: "lastStatus");
print(x);

the value of "x" is not "chrono" ... don't know why it just occured since last week


flutter_secure_storage:
    version: "9.0.0"
  flutter_secure_storage_linux:
    version: "1.2.0"
  flutter_secure_storage_macos:
    version: "3.0.1"
  flutter_secure_storage_platform_interface:
    version: "1.0.2"
  flutter_secure_storage_web:
    version: "1.1.2"
  flutter_secure_storage_windows:
    version: "3.0.0"
         

[✓] Flutter (Channel stable, 3.16.0, on macOS 14.2.1 23C71 darwin-arm64, locale fr-FR)
    • Flutter version 3.16.0 on channel stable at /Users/ysimonx/Developpement/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db7ef5bf9f (4 months ago), 2023-11-15 11:25:44 -0800
    • Engine revision 74d16627b9
    • Dart version 3.2.0
    • DevTools version 2.28.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/ysimonx/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.11.3

@gnunicorn
Copy link
Contributor

Hey @ysimonx , there is a patch for Apple systems in main that hasn't been released yet to pub.dev: #629 . Could try testing against main and report if that fixes it for you?

Peetz0r added a commit to Peetz0r/bami that referenced this issue Apr 12, 2024
…nts, or not?

Without them, `flutter_secure_storage` will silently fail on macOS

But with them, it crashes

TODO: figure out if my issue is the same as:
 - flutter/flutter#134107
 - juliansteenbakker/flutter_secure_storage#689
@QCIPaulCardno
Copy link

@ysimonx I had a similar issue with updating the key value not working. If you delete the key before you write to it it will work. Not a nice work around but it does get it going for me.
try:
await _storage.delete(key: "lastStatus");
await _storage.write(key: "lastStatus", value: "chrono");
String? x = await _storage.read(key: "lastStatus");
print(x);

@juliansteenbakker
Copy link
Owner

I have released v9.1.0 which should fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants