Open JorisBodin opened 1 year ago
This always happens with "1.11.1".
And given the breadcrump, I don't think it's migration.
It's getting to be a lot 😬
https://sentry-mobile.infomaniak.com/share/issue/1dd3e2bd23154ad0982af11835ad33d3/ https://sentry-mobile.infomaniak.com/share/issue/293c388ca27f4c82bf24efdc41aebf16/
All events affect only android 12 and 13 devices
I checked, we already had 1.10.2
realm on our application in 1.0.8
.
But what's changed on our side is that we've gone from compileSdk 33 to 34 https://github.com/Infomaniak/android-kMail/compare/1.0.8...1.0.9
Is Android 14 the problem?
Hi @JorisBodin
I don't think Android 14 is the problem. My guess is you are trying to register a change listener to a type deleted by the migration, but I'm not sure how that is possible.
Following your migration logic it looks like you ended up calling newRealm.deleteAll()
which should be fine and at least I could not reproduce the error using the same method.
I'm still investigating it.
Hello @cmelchior,
The problem occurred between 1.0.8 and 1.0.9
The newRealm.deleteAll()
was already present before 1.0.8, so that's not the problem.
Thank you
The stacktrace looks like it could be related to #1598. The callback class reference did not create a global reference so the class could potentially be unloaded behind the scene of the static initalized jclass.
I can't explain how this would be related to migration though, but maybe the issue is otherwise related to two simultaneous instances of the app during an upgrade.
What version will be available?
@JorisBodin The above fix will be in 1.14.0
. It is already available in 1.14.0-SNAPSHOT
(using snapshots) if you want to see if it changes anything already.
Not reproducing the bug, we'll see if the error disappears from sentry after 1.14.0 update 🤞
@JorisBodin This popped up from another user on 1.14.1. Are you still seeing this and have you been able to gather more insights on exactly when it is happening?
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
@tevincent explained here https://github.com/realm/realm-kotlin/issues/1726#issuecomment-2084500711 I thought that was enough
Is it possible to reopen the PR?
Thanks
Need more info?
How frequently does the bug occur?
Sometimes
Description
Our app crashed for some users (including me) at launch, when loading the database. And this only happens once per user. We suspect it's due to a migration ... This migration: https://github.com/Infomaniak/android-kMail/blob/1.0.9/app/src/main/java/com/infomaniak/mail/data/cache/RealmDatabase.kt#L175
Stacktrace & log output
https://sentry-mobile.infomaniak.com/share/issue/1dd3e2bd23154ad0982af11835ad33d3/
Can you reproduce the bug?
No
Reproduction Steps
No response
Version
1.10.2
What Atlas App Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Android 12 and 13
Build environment
https://github.com/Infomaniak/android-kMail/blob/1.0.9/app/build.gradle https://github.com/Infomaniak/android-kMail/blob/1.0.9/gradle/libs.versions.toml#L17