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

Crash while using encryption on iOS #1075

Open
robman70 opened this issue Sep 21, 2022 · 2 comments
Open

Crash while using encryption on iOS #1075

robman70 opened this issue Sep 21, 2022 · 2 comments
Labels
question Further information is requested

Comments

@robman70
Copy link

robman70 commented Sep 21, 2022

Problem
I have been using Hive with satisfaction for some months in apps developed with Flutter for Android without any particular problems but today I started the development of a new app for iOS and I encountered a problem: if I enable the encryption, the app crashes because it fails to open the box.
Is it enough to disable the encryption for everything to work correctly?
Has anyone had similar problems?

Code sample

box = await Hive.openBox(boxName, encryptionCipher: HiveAesCipher(encryptionKey));

Version

  • Platform: iOS
  • Flutter version: 3.3.2
  • Hive version: 2.2.3
@robman70 robman70 added the question Further information is requested label Sep 21, 2022
@robman70
Copy link
Author

This problem is still here. :-(
Can anyone help me?

@MrMineToons
Copy link

Hello! I also had this problem. I fixed it following this issue juliansteenbakker/flutter_secure_storage#210
There is 3 ways that I found to fix the crash on start. I applied all of them, now everything is working as expected.

The problem is with flutter_secure_storage, and not with hive...
Its very difficult to debug because, with me, I couldn't reproduce in debug or with my phone.
It looks like to only happens in release build, and with some specific phones..

The code that crash the app is this line -> final encryptionKeyString = await secureStorage.read(key: 'key');

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

No branches or pull requests

2 participants