Skip to content
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

FATAL EXCEPTION: com.it_nomads.fluttersecurestorage.worker #802

Open
SimonErich opened this issue Oct 7, 2024 · 3 comments
Open

FATAL EXCEPTION: com.it_nomads.fluttersecurestorage.worker #802

SimonErich opened this issue Oct 7, 2024 · 3 comments

Comments

@SimonErich
Copy link

SimonErich commented Oct 7, 2024

Hello,

I just updated our app to flutter 3.24.1 and flutter_secure_storage 9.2.2, but when I run the app in release mode I get:

➜  app git:(main) ✗ flutter run --release --flavor=production
Launching lib/main.dart on SM S918B in release mode...
I/flutter (17402): STARTING WIDGET UPDATE
Running Gradle task 'assembleProductionRelease'...                150.0s
✓ Built build/app/outputs/flutter-apk/app-production-release.apk (40.9MB)
Installing build/app/outputs/flutter-apk/app-production-release.apk...      2,544ms

Flutter run key commands.
h List all available interactive commands.
c Clear the screen
q Quit (terminate the application on the device).
E/AndroidRuntime(17849): FATAL EXCEPTION: com.it_nomads.fluttersecurestorage.worker
E/AndroidRuntime(17849): Process: com.my.example, PID: 17849
E/AndroidRuntime(17849): java.lang.ExceptionInInitializerError
E/AndroidRuntime(17849):        at L7.f.a(DeterministicAeadConfig.java:20)
E/AndroidRuntime(17849):        at L7.f.<clinit>(DeterministicAeadConfig.java:8)
E/AndroidRuntime(17849):        at androidx.security.crypto.a.a(EncryptedSharedPreferences.java:5)
E/AndroidRuntime(17849):        at d9.a.j(FlutterSecureStorage.java:53)
E/AndroidRuntime(17849):        at d9.a.f(FlutterSecureStorage.java:35)
E/AndroidRuntime(17849):        at d9.a.b(FlutterSecureStorage.java:1)
E/AndroidRuntime(17849):        at d9.d$b.run(FlutterSecureStoragePlugin.java:226)
E/AndroidRuntime(17849):        at android.os.Handler.handleCallback(Handler.java:958)
E/AndroidRuntime(17849):        at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(17849):        at android.os.Looper.loopOnce(Looper.java:230)
E/AndroidRuntime(17849):        at android.os.Looper.loop(Looper.java:319)
E/AndroidRuntime(17849):        at android.os.HandlerThread.run(HandlerThread.java:67)
E/AndroidRuntime(17849): Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: S7.I.values []
E/AndroidRuntime(17849):        at java.lang.Enum.enumValues(Enum.java:313)
E/AndroidRuntime(17849):        at java.lang.Enum.-$$Nest$smenumValues(Unknown Source:0)
E/AndroidRuntime(17849):        at java.lang.Enum$1.create(Enum.java:320)
E/AndroidRuntime(17849):        at java.lang.Enum$1.create(Enum.java:318)
E/AndroidRuntime(17849):        at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
E/AndroidRuntime(17849):        at java.lang.Enum.getSharedConstants(Enum.java:332)
E/AndroidRuntime(17849):        at java.lang.Class.getEnumConstantsShared(Class.java:4118)
E/AndroidRuntime(17849):        at java.util.EnumMap.getKeyUniverse(EnumMap.java:749)
E/AndroidRuntime(17849):        at java.util.EnumMap.<init>(EnumMap.java:136)
E/AndroidRuntime(17849):        at L7.e.<clinit>(AesSivProtoSerialization.java:76)
E/AndroidRuntime(17849):        ... 12 more
E/AndroidRuntime(17849): Caused by: java.lang.NoSuchMethodException: S7.I.values []
E/AndroidRuntime(17849):        at java.lang.Class.getMethod(Class.java:2950)
E/AndroidRuntime(17849):        at java.lang.Class.getDeclaredMethod(Class.java:2929)
E/AndroidRuntime(17849):        at java.lang.Enum.enumValues(Enum.java:310)
E/AndroidRuntime(17849):        ... 21 more

Did anybody encounter this or is there a fix for it?
Are there any specific proguard rules I should add?

The error appears whenever I call a flutter secture storage method.

Thanks

@SimonErich
Copy link
Author

Just tried to build with minifyEnabled false and then it works perfectly fine.

Tried to add

-keep class androidx.security.crypto.** { *; }
-keep class com.it_nomads.fluttersecurestorage.** { *; }

to the proguard rules, but that does not seem to be enough in minify mode.

@zachchou
Copy link

i got the same issue , have solved?

@edwinmacalopu
Copy link

I also have the same error with the device SM-S918B

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

3 participants