-
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 not opening when offline #7883
Comments
➤ PM Bot commented: Jira ticket: RJAVA-1256 |
A bug in Realm Core v13.26.0 preventing open a Realm when offline has been fixed in v14.4.0. The fix hasn't yet been release for Realm Java. Said that, I don't believe that you are affected by this bug but it might have been introduced earlier than Realm Core v13.26.0. About the slow downloads: if you have many backlinks, poor performance can be observed. There is an enhancement for it in Realm Java v10.18.0 |
So what's the solution of Offline issue? |
Can you share trace-level logs from a run where you're seeing slow open speeds? |
Let's forget the slow download for now. How to solve the not opening in offline? |
update? |
Hi @hkchakladar. I didn't find anything that should block opening the realm in your snippets. One alternative could be to try to created a named subscription instead of the
It would probably require some additional insights to know exactly where it is stalling, so if you could supply the trace level logs we might be able to get an idea about the root cause. |
How frequently does the bug occur?
Always
Description
Expectation :
Realm.getInstance()
to load faster whether online/offline like any other offline library and continue read/write ops. And Realm check network connection, sync in background.What actually happened :
Realm not behaving like offline-first. Works like online-only. Realm is not opening in Offline mode and taking very long in online.
When online,
Realm.getInstanceAsync
takes long time to load, based on network speed. On fast network it takes ~1000ms and on slow network it takes almost 10-20 seconds.This freeze the UI and makes it unsable.
Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
Here is my code:
Is the configuration correct or am I doing something wrong?
Version
10.15.1
What Atlas App Services are you using?
Both Atlas Device Sync and Atlas App Services
Are you using encryption?
No
Platform OS and version(s)
Android 12
Build environment
Android Studio version: Android Studio Giraffe | 2022.3.1 Patch 2
Android Build Tools version: ...
Gradle version: 8.1.2
The text was updated successfully, but these errors were encountered: