-
Notifications
You must be signed in to change notification settings - Fork 68
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
Invalid streaming format cookie #1440
Comments
Yes, that error does point to the Realm file being corrupted somehow. Can you provide some more information about how you are using Realm?
|
I am also seeing this. The original realm is fine, but I am writing copies of the realm files and these gets corrupted. I have only been getting a few bug reports so it doesn't seem to be frequent. I do use encryption and compactOnLaunch. No initial realm file. It is an Android app. I do allow backups but is using backup_rules.txt to exclude .realm files. Are there more files I should exclude? |
@sipersso How are you writing these copies? Using the A Realm actually contains more than the database file itself, there is also a If these files are restored and combined with a new Realm file, this could definitely lead to errors like this one. |
Yes, I use write copy to. The strange thing is that these are in "cache" directories and only used for uploading data once to a server. I am never actually reading from these files from within the app. So I doubt the backup rules will matter since the realm files are just temporary. The user realm file is untouched and doesn't have the issue. Now that I think of it, the configuration for these files is not using using encryption or compaction, and the folders are deleted once the file is uploaded to my server. |
Are you using encryption? No |
Do you have access to any of these corrupted Realm files? |
Sadly no, they were on release builds on customer phones and they were instructed to delete the app and reinstall |
I have sample files... where should I send them? |
@sipersso send them to [email protected] |
@clementetb Files sent. Not sure if this helps, but an interesting observation is that the files all seem to have even sizes (512kb, 1024kb, 2048kb, etc). |
Thanks, we have received them. |
The core team is investigating the issue. As a workaround to prevent this issue you could disable |
@clementetb Just to clarify a bit on the files I uploaded. 1: I have a default realm that the user typically writes to. This realm does have compactOnLaunch enabled. It is the copy that gets corrupted. The default realm, which is using compaction is fine as far as I can see in my case. |
Thanks for the clarification, I will forward these details to the core team. |
How frequently does the bug occur?
Sometimes
Description
We have two users who are currently experiencing a crash [RLM_ERR_INVALID_DATABASE]: Failed to open Realm file at path '/data/user/0/*******/files/********.realm': file is in streaming format but has an invalid footer cookie (0). The file is probably truncated.
It appears to happen when the app is started (potentially woken up via a worker) and we attempt to open a realm, however we do not understand what could be causing this issue because neither user had any other errors around the time this occurred (that we can see). It seems like it may have started overnight when the device was sleeping because both instances started in the early am hours and then the user reported it repeatedly crashing after attempting to use it.
Currently we have no way of resolving this issue, so our only course of action for now is to have the user re-install the application. For now we are planning on simply catching this error and then deleting the realm and re-opening a new one, but this is not an ideal solution either.
Stacktrace & log output
Can you reproduce the bug?
No
Reproduction Steps
No response
Version
1.8.0
What Atlas App Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Android 13
Build environment
Android Studio version: Android Studio Flamingo | 2022.2.1 Patch 2
Android Build Tools version: 30.0.3
Gradle version: 7.5
The text was updated successfully, but these errors were encountered: