realm-js icon indicating copy to clipboard operation
realm-js copied to clipboard

On Android, app crashes when offline

Open jdorj opened this issue 7 months ago • 4 comments

How frequently does the bug occur?

Always

Description

An android app crashes when offline. The app was developed with react-native and realm.

Stacktrace & log output

[Realm.Sync.Client.Network - error] Failed to resolve 'ap-southeast-1.aws.ws.services.cloud.mongodb.com:443': Host not found (authoritative)

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

12.14.1

What services are you using?

Atlas Device Sync

Are you using encryption?

No

Platform OS and version(s)

Android all versions

Build environment

"react": "18.3.1", "react-native": "0.77.1", "realm": "12.14.1",

Cocoapods version

No response

jdorj avatar Mar 31 '25 01:03 jdorj

I have the same issue after upgrading react native from 0.72.1->0.79.0 and realm from 12.13.1->12.14.1.

We used to get those " ‘ws.services.cloud.mongodb.com:443’: Host not found (authoritative)" errors before but it didn’t crash the app in the past.

We have to upgrade react native to deploy the iOS app because of the update.

realmcrash.log

tnguy avatar May 08 '25 15:05 tnguy

@tnguy Hi! I have the exact same problem. Did you find a solution ?

Cheers!

RenaudAubert avatar May 26 '25 14:05 RenaudAubert

@RenaudAubert Right now we have iOS on latest react native and keeping android on the older version in another branch :(

tnguy avatar May 27 '25 20:05 tnguy

From my testing, the issue seems to have been introduced in RN 77. Running RN 76 on the new arch is fine, upgrading to 77.2 causes the crash when going offline.

Omnicpie avatar Jun 16 '25 08:06 Omnicpie

I've found, fixed a major bug causing crashes on Android in errors originating from Realm Core, please install the latest v20.2.0 or v12.15.0 (if you're using sync).

Feel free to reopen or file another issue in case you're still experiencing crashes like this after upgrading.

kraenhansen avatar Aug 11 '25 18:08 kraenhansen