-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Crash in encrypted realm #7659
Comments
same |
same issue |
Hi @allanweir Sorry to hear that you are encountering this. To help narrow this down further could you tell us if you using Realm Sync? And does your model use |
Same problem for me, as well. We are not using Realm Sync and our models do not use EmbeddedObject(s). |
Same problem for me. One other issue we are having is a similar and happening even on |
This is happening to me as well.
Project Setup: |
I was wondering if there is any follow-up on this one. This issue has been increasing in the last 8 days and I am afraid we cannot just use Realm Decrypted. |
We're also still suffering crashes with encrypted Realms. We upgraded Realm to 10.21.1 and started experiencing these issues. Is there anyone from the Realm team actively investigating this issue? |
Hi @bmt2018 we do have some changes in core in our next release which may solve this issue. We'll let you know any updates. |
@dianaafanador3 Thanks, Diana. That's great to hear and I look forward to testing the next release! |
@bmt2018 I'll try to investigate a little bit further into this next week when I get to do support, as it seems this affecting a lot of people. |
@dianaafanador3 Thank you! That would be much appreciated! :-) |
Hi @dianaafanador3 is there any update on this issue? |
I saw that they released 10.24.2 over the weekend with the following in the release notes: "Other issues indicating file corruption may also be fixed by this". Not sure if this was fix that @dianaafanador3 was referring to last week or not, though. |
Hi @cupcake-shukla yep this fix will solve some issues that lead to a file corruption which may be related to this or not. I'm trying to get a reproduction for this issue, so we can be sure that this fix the problem. |
Hi, @dianaafanador3 any workaround for this issue? let's say I downgrade the realm SDK version and release a new version for my application, and if someone still faces this issue I can ask them to reinstall my application will this help? My month crashlytics looked like 200-300 crashes after this update it has been 18k for this month only |
I have just tested upgrading from 10.21.0 to 10.25.0 and everything seems to be working as expected, no errors on the first or subsequent runs of the build. Thanks for looking into this and getting it sorted! I'll leave closing the issue for when you're happy it's resolved everyone. EDIT: Actually not resolved.. more info in next comment |
Actually there is still an issue: On one device, about 7 builds/runs in I got an error similar to my original post. There were 2 errors in sequence it looks like: When running another device which is used more frequently, so will have more data and more of a history I get:
The sequence of events on my app starting up are:
The first crash sequence happened during this cleanup. All the cleanup is ran on the main thread in a sequence rather than concurrently. In that sequence the first error happens opening a write block (realm.write { .. } ). The second comes accessing an object property (.imageURLString) |
@allanweir, @cupcake-shukla, @bmt2018, @matthewjordanRiM, @c128128, @kordem, @Sethmr |
Hi Pavel, looks to be working well! Thanks for the update and getting the fix out |
Updated this morning and so far, so good. Thank you for the update on this! |
How frequently does the bug occur?
All the time
Description
Hi, after upgrading Realm I noticed a crash happening once the app had started up which then seems to corrupt the realm object. I've narrowed it down to upgrading from realm swift 10.21.0 to 10.21.1.
The app will launch OK and seem to run until some kind of interaction happens with the realm. When the app is restarted the realm can no longer be opened and needs to be recreated. I've checked the password remains consistent and none of the code to do the setup has changed for a long time.
Stacktrace & log output
Can you reproduce the bug?
Yes, always
Reproduction Steps
The encryption of the Realm is handled as described here https://docs.mongodb.com/realm/sdk/swift/advanced-guides/encrypt-a-realm/
The configuration is
Realm.Configuration(
fileURL: Utils.documentsURLFor(fileName: "cache.realm"),
encryptionKey: {KEY},
schemaVersion: 113,
migrationBlock: {....}
)
And when accessing it the Realm initially with try Realm() there is no error thrown. The database has been integrated for a few years now and this basic flow hasn't changed in that time
Version
10.21.1
What SDK flavour are you using?
Local Database only
Are you using encryption?
Yes, using encryption
Platform OS and version(s)
iOS 15.2
Build environment
Xcode version: 13.2 & 13.2.1
Dependency manager and version: Swift Package Manager
The text was updated successfully, but these errors were encountered: