Encrypted Realm created on Android won't open on Windows
peachypixels opened this issue · comments
What happened?
Hello!
I was testing an on-device build of an app and encountered an issue that needed debugging in the development environment.
So I copied the encrypted Realm file from the Android device to Windows and upon trying to open it (in code) it throws a "Realm file decryption failed" exception. So I tried opening it in Realm Studio and the same error is reported.
To be 100% sure that the keys matched on the two devices (I can't see how they wouldn't) I copied it from the Android device to the Windows device and it's an exact match, byte for byte (the copied key was even used to open the Realm in Realm Studio)
From my research, I thought that Realms were platform agnostic (even with encryption) but maybe that's not true? If they are, then this looks like it could be an issue.
Repro steps
See above.
Version
12.0.0
What Atlas Services are you using?
Local Database only
What type of application is this?
Unity
Client OS and version
Android 10, Windows 10
Code snippets
No response
Stacktrace of the exception/crash you're getting
No response
Relevant log output
No response
➤ PM Bot commented:
Jira ticket: RNET-1140
Forgot to add...
The app currently has one bundled (encrypted) database (that was created on Windows 10) and that appears to open on Android without issue.
This appears to be caused by realm/realm-core#7535. This was fixed, but hasn't been released yet. We hope to include it in a release in the near future.
Thanks @nirinchev
I'll re-test when it's released and report back if it's still occurring.
Just posting for completeness.
I've upgraded the Dot Net SDK to V12.1.0, copied the Android Realm to Windows and it now opens (in code) without any issues. Haven't tested iOS though.
Many thanks!