-
Notifications
You must be signed in to change notification settings - Fork 576
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 for React Native not work offline #6554
Comments
➤ PM Bot commented: Jira ticket: RJS-2759 |
From the title of the issue, it sounds like you are experiencing a variation of realm/realm-core#7349. We are actively working on a fix. |
@kneth is it possible to do a workaround in the meanwhile you have done the fix? i need to work in offline mode, but unfortunately the app crash when i receive the error. |
For anyone has my same problem, i have downgraded the peerDependency |
const behaviorConfiguration = { OpenImmediately not DownloadBeforeOpen then works |
@riohifi Not for me. I have already try this configuration without success. I have solved only downgrading version. |
The fix is in [v12.7.0-rc.0][https://github.com/realm/realm-js/releases/tag/v12.7.0-rc.0) |
@kneth i have update to 12.7.9-rc.0 but now if i open the app when offline, i receive this error which cause the crash of the app: 04-04 17:43:24.278 32030 32096 E ReactNativeJS: [Realm.App - error] App: request location failed (CustomError -1): request to https://realm.mongodb.com/api/client/v2.0/app/easy-report-gmzgp/location failed, reason: Network request failed |
please reopen the issue |
I am getting the same issues in react native 0.73.1 app, running 12.5.0. SyncError: Failed to connect to sync: Host not found (authoritative) Is it resolved anywhere? |
Is it resolved anywhere?? |
@Christiangsn I mean I am not sure if it is breaking anything or not in our app. But it comes through a bugsnag logs in our react native application using realm. |
Should I just ignore the error log? Because I noticed that when the internet comes back, it reconnects automatically... Another point, how can I synchronize the data? Do you have an example? |
How frequently does the bug occur?
Always
Description
Hi, i’m using realm for a react native application.
I receive SyncError: Failed to connect to sync: Host not found (authoritative) error when turn off wifi. But i have read mongo realm is offline first…
I open realm like this:
Stacktrace & log output
03-14 16:25:28.255 6242 6302 W ReactNativeJS:
03-14 16:25:28.255 6242 6302 W ReactNativeJS: URL: 10.0.2.2:8081
03-14 16:25:28.255 6242 6302 W ReactNativeJS:
03-14 16:25:28.255 6242 6302 W ReactNativeJS: Error: Software caused connection abort
03-14 16:25:28.389 6242 6302 I ReactNativeJS: 'Connection state changed', 'active'
03-14 16:25:29.083 6242 6302 I ReactNativeJS: 'Connection state changed', 'active'
03-14 16:25:29.099 6242 6302 E ReactNativeJS: [error] Failed to resolve 'ws.eu-west-1.aws.realm.mongodb.com:443': Host not found (authoritative)
03-14 16:25:29.100 6242 6302 I ReactNativeJS: 'Connection state changed', 'active'
03-14 16:25:29.101 6242 6302 I ReactNativeJS: 'error', { [SyncError: Failed to connect to sync: Host not found (authoritative)]
03-14 16:25:29.101 6242 6302 I ReactNativeJS: name: 'SyncError',
03-14 16:25:29.101 6242 6302 I ReactNativeJS: isOk: false,
03-14 16:25:29.101 6242 6302 I ReactNativeJS: reason: 'Failed to connect to sync: Host not found (authoritative)',
03-14 16:25:29.101 6242 6302 I ReactNativeJS: code: 1034,
03-14 16:25:29.101 6242 6302 I ReactNativeJS: category: 'UNKNOWN',
03-14 16:25:29.101 6242 6302 I ReactNativeJS: logUrl: '',
03-14 16:25:29.101 6242 6302 I ReactNativeJS: userInfo: {},
03-14 16:25:29.101 6242 6302 I ReactNativeJS: isFatal: false }
03-14 16:25:29.104 6242 6302 I ReactNativeJS: 'user', { listeners:
03-14 16:25:29.104 6242 6302 I ReactNativeJS: { listeners: {},
03-14 16:25:29.104 6242 6302 I ReactNativeJS: options: { add: [Function: add], remove: [Function: remove] } },
03-14 16:25:29.104 6242 6302 I ReactNativeJS: internal: {},
03-14 16:25:29.104 6242 6302 I ReactNativeJS: app:
03-14 16:25:29.104 6242 6302 I ReactNativeJS: { listeners:
03-14 16:25:29.104 6242 6302 I ReactNativeJS: { listeners: {},
03-14 16:25:29.104 6242 6302 I ReactNativeJS: options: { add: [Function: add], remove: [Function: remove] } },
03-14 16:25:29.104 6242 6302 I ReactNativeJS: internal: {} },
03-14 16:25:29.104 6242 6302 I ReactNativeJS: cachedProfile: undefined }
03-14 16:25:29.323 6242 6302 I ReactNativeJS: 'user', { listeners:
03-14 16:25:29.323 6242 6302 I ReactNativeJS: { listeners: {},
03-14 16:25:29.323 6242 6302 I ReactNativeJS: options: { add: [Function: add], remove: [Function: remove] } },
03-14 16:25:29.323 6242 6302 I ReactNativeJS: internal: {},
03-14 16:25:29.323 6242 6302 I ReactNativeJS: app:
03-14 16:25:29.323 6242 6302 I ReactNativeJS: { listeners:
03-14 16:25:29.323 6242 6302 I ReactNativeJS: { listeners: {},
03-14 16:25:29.323 6242 6302 I ReactNativeJS: options: { add: [Function: add], remove: [Function: remove] } },
03-14 16:25:29.323 6242 6302 I ReactNativeJS: internal: {} },
03-14 16:25:29.323 6242 6302 I ReactNativeJS: cachedProfile: undefined }
Can you reproduce the bug?
Always
Reproduction Steps
Version
0.6.2
What services are you using?
Atlas Device Sync
Are you using encryption?
No
Platform OS and version(s)
Windows 10, React Native, Android 14
Build environment
adb logcat
Cocoapods version
No response
The text was updated successfully, but these errors were encountered: