Open ax88 opened 5 months ago
@ax88 Thank you for reporting. Do you also see the crash on a freshly installed app?
Hello, yes it can happened on a freshly installed app. But It can takes some time before it happened, like few days.
Le mar. 13 févr. 2024 à 16:02, Kenneth Geisshirt @.***> a écrit :
@ax88 https://github.com/ax88 Thank you for reporting. Do you also see the crash on a freshly installed app?
— Reply to this email directly, view it on GitHub https://github.com/realm/realm-js/issues/6477#issuecomment-1941710587, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVMNYO6JJFZLCHNRNEGBLLYTN6BRAVCNFSM6AAAAABDDQDDX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBRG4YTANJYG4 . You are receiving this because you were mentioned.Message ID: @.***>
it can happened on a freshly installed app
It is unlikely the upgrade of Realm JS, which is the root cause.
You mention that it happens when the app has been running for a while. Can it be that you are writing objects to your Realm file when the device is locked? This might require some additional settings.
I am not writing to Realm when the device is locked. I am sure that this is not the upgrade of Realm JS because I have users that only upgraded iOS to v17 and they have been using the app for 3 to 5 years. Before the bug, I was only using Realm JS 3.6.5 (from 2019 to 2024). After the bug occurred, I tried to upgrade to 5.0.0, 10.0.0 and 12.0.0 but the crash persisted.
Le mer. 14 févr. 2024 à 11:38, Kenneth Geisshirt @.***> a écrit :
it can happened on a freshly installed app
It is unlikely the upgrade of Realm JS, which is the root cause.
You mention that it happens when the app has been running for a while. Can it be that you are writing objects to your Realm file when the device is locked? This might require some additional settings https://www.mongodb.com/docs/realm/sdk/swift/realm-files/configure-and-open-a-realm/#std-label-use-realm-when-the-device-is-locked .
— Reply to this email directly, view it on GitHub https://github.com/realm/realm-js/issues/6477#issuecomment-1943492092, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVMNYP7AQN3FECNM7AFIKTYTSH3NAVCNFSM6AAAAABDDQDDX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBTGQ4TEMBZGI . You are receiving this because you were mentioned.Message ID: @.***>
It is unclear how the file ended being corrupted but we will not be able to recover the file. An upgrade will not recover it, and looking at your stack trace, the crash happens when you open the (corrupted) file.
How frequently does the bug occur?
Sometimes
Description
Our app what working fine with realm 3.6.5 since 5 years ago. Recent update of iOS 17 on certain type of iPad (iPad 6, 7 and iPad Pro 12.9 2nd gen and iPad pro 10.5inch), which runs on Apple A10 and A10X chips, makes the app crash after few days or weeks of use. When the crash occurs, I have able to reproduce It. There is basically two case:
1 / We cannot start the app: Decryption failed: 'unable to decrypt after 0 seconds (retry_count=0, from=i != bytes_read, size=4096)' or sometime: Assertion failed: is_not(e, Writable)
2/ We can start the app: Decryption failed: 'unable to decrypt after 0 seconds (retry_count=0, from=i != bytes_read, size=16384)' or Assertion failed: is_not(e, Writable) or The Realm is already in a write transaction
I even try to to open the DB with Realm Studio and I've got this error: Decryption failed: 'unable to decrypt after 0 seconds (retry_count=0, from=i != bytes_read, size=4096)'
Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
Yes I the app start we can reproduce if the bug already happened the first time. If not occured yet, I cannot reprocude it.
Version
3.6.5 to 12.6.0
What services are you using?
Local Database only
Are you using encryption?
Yes
Platform OS and version(s)
iOS 17.x.x
Build environment
React native : 0.64.0 to 0.72.0 Realm JS 3.6.5 to 12.6.0
Cocoapods version
1.12.0