authpass / biometric_storage

Flutter plugin to store data behind biometric authentication (ie. fingerprint)
https://pub.dev/packages/biometric_storage
MIT License
177 stars 104 forks source link

When restarting got a Storage xxxxx was not initialized #67

Open thomnico opened 2 years ago

thomnico commented 2 years ago

Hello there,

I can create a storage on android emulator. Write/read on it.

I then restart the application and want to read from the storage but get a storage not initialized error.

Did someone else experience this ?


flutter doctor -v [✓] Flutter (Channel stable, 3.0.3, on macOS 12.4 21F79 darwin-arm, locale en-FR) • Flutter version 3.0.3 at /opt/homebrew/Caskroom/flutter/3.0.3/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 676cefaaff (9 days ago), 2022-06-22 11:34:49 -0700 • Engine revision ffe7b86a1e • Dart version 2.17.5 • DevTools version 2.12.2

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

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

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

[✓] Android Studio (version 2021.2) • 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.12+0-b1504.28-7817840)

[✓] VS Code (version 1.68.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.42.0

[✓] Connected device (3 available) • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 12 (API 32) (emulator) • macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.53

[✓] HTTP Host Availability • All required HTTP hosts are available

hpoul commented 2 years ago

Can you provide a simple, runnable example app to reproduce your problem

thomnico commented 2 years ago

I saw it working when doing tests manually. I use flavors and integration_test which seems to reset the storage, any idea how to avoid this behavior ? Nicolas

hpoul commented 2 years ago

I don't know how you are testing.. is it possible you are restarting the android plugin or app, but not the flutter code?