Unable to open encrypted realm in realm studio
See original GitHub issueGoals
I am trying to use a 64 bit hash string generated at https://passwordsgenerator.net/sha256-hash-generator/ and use the following method to convert it into byte array.
function toByteArray(str) {
var array = new Int8Array(str.length);
for (i = 0; i < str.length; i++) {
array[i] = str.charCodeAt(i);
}
return array;
}
Later we pull the realm db and use the 128 length hex string generated from the hash (http://www.convertstring.com/EncodeDecode/HexEncode) to decrypt. After doing this, the decryption is failing with error ->
Realm file decryption failed.
A weird thing is this whole process is working for me when I use this key which I found randomly online. lyNZHNHP7LDv17An6pOxADNLKYYqXYoQHxtmjjacTDR5RlkEbiJ2ELgJmRJ6/g== The rest of the process was all same. Instead of using a 64 bit hash string, I was using the above key
Version of Realm and Tooling
- Realm JS SDK Version: 2.2.0
- Node or React Native: React Native
- Client OS & Version: Android 7.1.1
- Which debugger for React Native: None
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Unable to open encrypted default.realm in studio - MongoDB
Unable to open encrypted default.realm in studio ... Even after entering 128 character hex encoded key I'm getting an error decryption failed.
Read more >MongoDB Realm Studio 10.0.0 how to decrypt encrypted ...
The new studio doesn't I get: Unable to open a realm at path '/Users/user/Desktop/tdrdb.realm': Realm file initial open failed Path:Exception ...
Read more >Opening Realm file in browser always requires an encryption ...
You can open the file using MongoDB Realm Studio. I installed v10.1.2 without a problem in MacOS 11.3.1. https://docs.mongodb.com/realm/studio/install/.
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 Studio Releases
When opening a Realm file which is already opened by another process (such as the Realm Swift SDK in a simulator), the major...
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 FreeTop 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
Top GitHub Comments
I can’t reproduce the error - instead I did this:
9B96A1FE1D548CBBC960CC6A0286668FD74A763667B06366FB2324269FCABAA4
which matches the passphrasehi there
.39423936413146453144353438434242433936304343364130323836363638464437344137363336363742303633363646423233323432363946434142414134
and successfully opened the Realm using Studio.I know it is old issue, it might help someone.
I had same issue as well, what i found out that you can’t access the encrypted realm file with multiple process. So if you are trying to access your file while your simulator opened the realm file. You should close the realm file from your simulator and try to access with realm studio.