realm / realm-studio

Realm Studio
https://realm.io/products/realm-studio/
Apache License 2.0
300 stars 39 forks source link

GetFileInformationByHandleEx() failed: unknown error #1643

Open marprus opened 5 months ago

marprus commented 5 months ago

Describe the bug I pulled out encrypted Realm database from my Android phone (version 7.1.2). After opening it in Realm Studio version 14.1.2 on Windows and inserting the encryption key, it gives me: GetFileInformationByHandleEx() failed: unknown error. No data shown. I tried it also on Mac with Realm Studio 15.0.0, decryption is not performed right after inserting encryption key (no error shown like on Windows, only blank screen of database is shown, no data at all) .

I tried it open also in old Realm Browser 3.0.1, it crashed right after inserting key.

Encryption key is correct.

Expected behavior Open realm database with data visible.

Additional context The database file was pulled out from running Android device using dd partition copy, the app might be running at that time. Could it be the reason? I tried to reproduce that on different device, using adb pull ..., opening decrypted database works there.

Thank you

sync-by-unito[bot] commented 5 months ago

➤ PM Bot commented:

Jira ticket: RSTUDIO-533

kraenhansen commented 5 months ago

You're most likely hitting a variant of https://github.com/realm/realm-studio/issues/1003#issuecomment-439019473

Realm encryption is not platform-agnostic - it depends on the platform's page size. So generally, you should not expect to be able to share encrypted realms between different operating systems.

Which I agree is very unfortunate as it's a limitation from how Realm is performing encryption (uses the OS primitives instead of bringing its own), but also part of what makes it fast.

marprus commented 5 months ago

Thanks for reply. But I'm not sure this is my issue. Because from different Android device with same application I was able to open encrypted database on Mac in Realm Studio 15.0.0.