-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
How frequently does the bug occur?
Always
Description
I'm using RealmJS in a NodeJS App that will sometimes start offline. When the app starts with an internet connection (and then loses/regains connectectivity intermittently) realm works great. However, when booting with no internet connection, the open() method is throwing an error.
TimeoutError: Timed out: Realm could not be downloaded in the allocated time: 30000 ms.
I've tried a combination of config changes (including adding timeout values) to prevent this timeout from being thrown, but all don't seem to affect this error being thrown.
...,
cancelWaitsOnNonFatalError: false,
existingRealmFileBehavior: {
type: OpenRealmBehaviorType.OpenImmediately,
timeOut: 1000,
timeOutBehavior: OpenRealmTimeOutBehavior.OpenLocalRealm
},
newRealmFileBehavior: {
type: OpenRealmBehaviorType.OpenImmediately,
timeOut: 1000,
timeOutBehavior: OpenRealmTimeOutBehavior.OpenLocalRealm
},
And
subs.add(realm.objects(schema).filtered('tennant == $0', tennant), { behavior: WaitForSync.Never });
Am I misinterpreting the timeOutBehavior property? Or is the Realm client ignoring the given value and using OpenRealmTimeOutBehavior.ThrowException ?
Stacktrace & log output
Output from internal logger ===================== [error] Failed to resolve 'ws.eu-west-1.aws.realm.mongodb.com:443': Host not found (authoritative) Error thrown after 30s ====================== /Users/alex/Workspace/app/node_modules/realm/src/TimeoutPromise.ts:39 this.handle.reject(new TimeoutError(message));
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
12.3.1
What services are you using?
Atlas Device Sync
Are you using encryption?
No
Platform OS and version(s)
OSX Arm64 & Linux Arm64
Build environment
Which debugger for React Native: ..
Cocoapods version
No response