-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Realm.compactRealm on external storage throws RealmError: Unrecoverable error. Read-only file system #4140
Comments
Hey @tmeunier , I've also run your specific test on a couple of devices and cannot repro the problem. Can you try this on another device and see if it is a problem there, as well? If you can get it to fail on a Nexus device, that would be particularly interesting. |
Attempted to repro on a Samsung Galaxy Note 8.0, 4.4.2. No joy. |
Hey @bmeike I ran the following tests on other devices/emulators I have :
So, it's working on emulators but not on my devices... Could you give a try with Android 5+ ? |
My apologies! I overlooked this line: Although I don't think this is the problem, can you verify that you are using both |
Yes. I can duplicate this on both the Nexus 4 5.1.1 and the Samsung Galaxy Tab 8.0 |
@bmeike No worries. Yes, permissions are fine. Also, I'm able to create/read/write the Realm on the external storage, just compact is not working. And before upgrade to |
Yep. I confirm. |
I believe the error is beneath this call in shared_realm.cpp:
A casual review of the code doesn't show any relevant recent changes. Also, the file does appear to be available, RW, for the process:
I wonder if this is related to #3972 ? |
When compacting the Realm on external storage for Android, SharedGroup always uses the default sys_tmp_dir which is invalid for Android. Thus we need an API for setting the default sys_tmp_dir for bindings. The getters is also required since ObjectStore may use it to create pipe/fifo. To solve java issue realm/realm-java#4140 Part of #2411
The patch that will allow this test pass is being tracked in realm/realm-core#2445 |
Good to know, thanks! |
When compacting the Realm on external storage for Android, SharedGroup always uses the default sys_tmp_dir which is invalid for Android. Thus we need an API for setting the default sys_tmp_dir for bindings. The getters is also required since ObjectStore may use it to create pipe/fifo. To solve java issue realm/realm-java#4140 Part of #2411
need core release |
Introduction
Hi, I have a complex app with more than one Realm (because of sandboxing) and Realms are stored on External Storage. Until recently I was stuck at v1.0.1 because of various problems that were fixed ;)
But now I'm facing a new problem, the
compact
phase (which is started before opening the realm) is crashing the whole app. Even if I'm catching theRealmError
, a native crash occurs afterwards.Goal
Compact Realm before opening it, the Realm exists and is writable.
Expected Results
No explosion
Actual Results
Steps & Code to Reproduce
Simple AndroidTestCase
The whole test is passing, except the last line throwing the above exception :/
Version of Realm and tooling
Realm version(s): 2.3.0
Realm sync feature enabled: no
Android Studio version: 2.2.3
Which Android version and device: Samsung Galaxy Tab S2 (SM-T710) 6.0.1
The text was updated successfully, but these errors were encountered: