-
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
Android InstantApp cannot create Realm instance #500
Comments
I used the 0.5.0 version. |
Is this 100% reproducible? Also on different devices? |
Yes, that's reproducible 100 %. I've tried with two devices: Samsung A80 (A805F)/Android 11 and Nokia 7.2. I'll attach a link to a repo shortly. |
An example code can be found in this repo. See that you need to run it as an InstantApp to see the error. Launching it as a regular app works. Also, note that the original stack trace is from our private KMM project, but the problem can be seen in a Kotlin Android app project as well. |
Hi @pmpuro thanks for the repro, I can reproduce the error, it's unfortunately related to SELinux default policy on Android preventing the creation of the named pipes as you can see in the log
The rest of Realm files are created correctly in the internal storage though (when running in Instant App mode). Could you delay the usage of Realm until the app is installed? you can detect it by |
Thanks for response. Okay, I realized that it's about Android itself. That's a shame still. |
Filed an issue on this for Google. |
The constructor of
Realm
fails with the following exception:The name nor path are not specified in the
RealmConfiguration
that is given to the constructor.It seems that the actual data base file and a lock files are created. However, the run-time exception is thrown saying "Read-only file system". As I understand the first line of the log,
access_control.new_commit.cv
FIFO file is tried to be created but denied by the sandbox of InstantApp.The text was updated successfully, but these errors were encountered: