We recently integrated Synced Realm with our Android application. While its working fine both online and offline. However, after about 30 minutes of inactivity, the application gets stuck on launch even though we’re using Realm.getInstanceAsync
.
We’re using Synced Realm with JWT auth.
Please find attached the code (have removed some internal constructs, so please ignore the IDE warnings) along with the output of debug logs. Kindly let us know if any additional information is required.
Output:
Debug → Initialising Realm
Debug → Current user is available
Debug → Config object is ready
@Sarthak_Garg : Welcome to the community.
Can you please enable realm log and share the result with us, I suspect you are facing an already reported issue.
1 Like
Thanks for the prompt response, @Mohit_Sharma. Please find the logs below.
FYI, we are on Realm Gradle Plugin 10.6.0.
Realm Sync Logs:
D/REALM_SYNC: Realm sync client ([realm-core-11.0.2])
D/REALM_SYNC: Supported protocol versions: 2-3
D/REALM_SYNC: Platform: Android Linux XXXXX
D/REALM_SYNC: Build mode: Release
D/REALM_SYNC: Config param: max_open_files = 256
D/REALM_SYNC: Config param: one_connection_per_session = true
D/REALM_SYNC: Config param: connect_timeout = 120000 ms
D/REALM_SYNC: Config param: connection_linger_time = 30000 ms
D/REALM_SYNC: Config param: ping_keepalive_period = 60000 ms
D/REALM_SYNC: Config param: pong_keepalive_timeout = 120000 ms
D/REALM_SYNC: Config param: fast_reconnect_limit = 60000 ms
D/REALM_SYNC: Config param: disable_upload_compaction = false
D/REALM_SYNC: Config param: tcp_no_delay = false
D/REALM_SYNC: Config param: disable_sync_to_disk = false
D/REALM_SYNC: User agent string: 'RealmSync/XXXXX'
Realm Java Logs:
D/REALM_JAVA: Creating session for: /data/user/0/XXXXX/files/mongodb-realm/XXXXX/XXXXXX/s_global.realm
D/REALM_JAVA: First session created. Adding network listener.
D/REALM_JAVA: HTTP Request =
POST https://ap-south-1.aws.realm.mongodb.com/api/client/v2.0/auth/session
Accept: application/json
Authorization: Bearer XXXXX
Content-Type: application/json;charset=utf-8
D/REALM_JAVA: HTTP Request =
POST https://ap-south-1.aws.realm.mongodb.com/api/client/v2.0/auth/session
Accept: application/json
Authorization: Bearer XXXXX
Content-Type: application/json;charset=utf-8
((^ Repeated multiple times))
@Sarthak_Garg: Thanks for confirming.
You are also having this issue, can you please upvote the issue and subscribe to it for updates.
1 Like
Update: This has been fixed with Realm Java 10.8.0
2 Likes