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

Opening an encrypted Realm after compact fails #7842

Closed
nirinchev opened this issue Jun 26, 2024 · 2 comments · Fixed by #7844
Closed

Opening an encrypted Realm after compact fails #7842

nirinchev opened this issue Jun 26, 2024 · 2 comments · Fixed by #7844

Comments

@nirinchev
Copy link
Member

Reported in slack: https://mongodb.slack.com/archives/CKW2HG3M0/p1719247803861389

tl;dr: compacting an encrypted Realm, then trying to open it results in a decryption failure: Realm file decryption failed (Decryption failed: page 0 in file of size 20480 failed the HMAC check. Either the encryption key is incorrect or data is corrupted.

This is the .NET test that fails: https://github.com/realm/realm-dotnet/blob/a1ac24b56d61b4f49f7d8d098cef29f0c91b0979/Tests/Realm.Tests/Database/InstanceTests.cs#L328-L354

It's a parameterized test and it fails when encrypt is true regardless of whether we add data to the realm file or not.

Copy link

sync-by-unito bot commented Jun 26, 2024

➤ PM Bot commented:

Jira ticket: RCORE-2183

@nielsenko
Copy link
Contributor

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants