get Realm file decryption failed
See original GitHub issuewhen i’m trying to use encrypt feature on my project, i get this error:
this is my Application class content:
/* SetUp Application database as encrypted contents */
byte[] key = new byte[64];
new SecureRandom().nextBytes(key);
Realm.init(this);
RealmConfiguration realmConfiguration = new RealmConfiguration.Builder()
.encryptionKey(key)
.name("Application.db")
.deleteRealmIfMigrationNeeded()
.build();
full stack error:
Caused by: io.realm.exceptions.RealmFileException: Unable to open a realm at path '/data/data/com.pishguy.androidapplication.cafemaku/files/Application.db': Realm file decryption failed. in /Users/emanuelez/repos/realm/realm-java-private/realm/realm-library/src/main/cpp/io_realm_internal_SharedRealm.cpp line 81 Kind: ACCESS_ERROR.
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Seeing "Realm file decryption failed" errors #5615 - GitHub
For 99% of users, this works fine. For less than 1%, we're seeing the "Realm file decryption failed" error. From investigating, it seems...
Read more >Realm file decryption failed` exception - Stack Overflow
It turns out the problem was caused by a bug in Realm, where deleteRealmIfMigrationNeeded = true when using encryption ...
Read more >Realm decryption failed on ios device but not on emulator (ios ...
Hi, We have been trying to get a realm encryption solution created across our whole application. This has worked successfully across the ...
Read more >Realm Custom Configuration and Encryption (RealmSwift Part ...
The first time you open your encrypted file, Realm creates it on disk and encrypts it with the given key. Any time in...
Read more >realm encription, Realm file decryption failed,what's wrong?
Related Query · Find path for Realm file with Realm React Native to use with Realm Browser · Opening Realm file in browser...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
… I’ve heard something about a “KeyStore” that you’re supposed to store things in on Android, but I don’t know much about it nor its reliability
You cannot delete a Realm while it is open and
Realm.getDefaultInstance
will open a Realm.Do this instead: