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
Exception : Invalid format of Realm file. #3064
Comments
What version of Realm java are you using? In version 0.91, we fixed a bug that does not remove some files when deleting a realm database file (that includes deletion by |
Hi @zaki50 |
@dinhthaidaica I'll close the issue for now. Don't hesitate to reopen or create a new if your experience the problem after upgrading to a newer version of Realm. |
I have similar problem with this, I using a Some of my users do experienced crash which identical to @dinhthaidaica 's issue. |
@kuno Does your service run in a separate process? Realm does not yet support that. |
Hi @kneth , As your suggestion I have upgrade realm version to 1.1.0 and seem that my users still experienced this crash many times :(. |
I'm experiencing the same issue in Realm 1.0.0
Devices:
|
Is it possible that you catch some exceptions thrown by Realm and not handle them properly? If you want, things would be faster if you can share your source code with us privately to help@realm.io . We can try to take look to see would could cause the problem. |
@dinhthaidaica @imidhuntv Do you have the possibility to share your code with us? |
In last 30 days this crash hit 146 times for 8 different users! Happened in all android versions 4,5 and 6! In onCreate() of App.java I init realm like this
In my activity's onCreate() method I create realm instance as follows,
Crash starts from this line 'mRealm = Realm.getDefaultInstance()' from onCreate() of activity. I couldn't reproduce this bug on my own. But my few of my users are experiencing it. But those who experiences this. experience this multiple times. Any help would be appreciated. |
@imidhuntv Is |
@beeender The above one was a different log. See this one too. Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.talkoot.android/com.talkoot.android.activities.SplashActivity}: java.lang.IllegalArgumentException: Illegal Argument: Invalid format of Realm file. Caused by java.lang.IllegalArgumentException: Illegal Argument: Invalid format of Realm file. |
PubNubObserverDelegateImpl is not in a different process and it can not start before Realm.compactRealm(). |
I'm experiencing the same issue in Realm 1.1.0 The context was a user updated the app (only app, no realm version or schema). When he open the app a IntentService was call throw a "java.lang.IllegalArgumentException: Illegal Argument: Invalid format of Realm file." Obs.: When the same user delete the app when reinstall all features run with success. No more exception been throw.
|
@lucasgcampos Thanks for sharing the observation. |
@lucasgcampos Do you know if the app has an open Realm instance in another thread when the IntentService is opening a Realm? I am trying to get a picture of the timing to see it we have a race condition. |
We have a GCM Receiver which extends From FirebaseMessagingService like below. `public class GcmReceiver extends FirebaseMessagingService {
}` In mDelegate.showChatNotification(channel, json) method we get realm instance and write the message to realm. |
Is your Realm encrypted? Also, why have I just asked this a second ago elsewhere? |
I folded a number of other issues into this one, so we just have this error tracked in one place. Just to iterate the current state of "Invalid format of the Realm file" errors:
|
Closing as outdated and these kinds of errors also seem to have disappeared from later versions of Realm (for whatever reason). |
Details
The crash log points out that crash occur in line return Realm.getInstance(config);
I have a look at Realm.java file but still can not get any more information which related to message Invalid format of Realm file. So any one can help to give me a solution or workaround which can resolve the problem or some theory about why crash occurs.
The text was updated successfully, but these errors were encountered: