Hi @Paolo_Manna, sorry for the late reply.
The issue seems to be with NodeJS versions 16.12.0 and 17.0.1 I believe, on the current NodeJS LTS version (14.16.0) the issue does not appear.
The only value I found for the Atlas URL was in the connect menu with the following devcluster.wbpip.mongodb.net/todo?retryWrites=true&w=majority.
The code used to connect was the one described in the legacy Realm migration guide.
let app = new Realm.App({
id: configToUse.appId, // This the identifier shown in the dashboard
app: {
name: 'Test',
version: '0.0.1'
}
})
const token = '' // The access token, this value is empty on this snippet
const credentials = Realm.Credentials.jwt(token)
app.logIn(credentials)
.then(user => {
const config = {
schema: SCHEMAS,
path: `realm/mongodb_${app.id}`,
sync: {
existingRealmFileBehavior: {
type: 'openImmediately',
timeout: 10000,
timeOutBehavior: 'openLocalRealm'
},
newRealmFileBehavior: {
type: 'downloadBeforeOpen',
timeout: 10000,
timeOutBehavior: 'throwException'
},
user: user,
partitionValue: '' // This value is set to a specific value that already is configured in Atlas to exist
}
}
return Realm.open(config).progress((transferred, transferable) => {
console.log(`Transferable: ${transferable}, Transferred: ${transferred}`)
})
})
.then(realm => {
realm.schema.forEach(schema => {
const schemaObjects = realm.objects(schema.name)
console.log(`For Realm Schema ${schema.name} there are ${schemaObjects.length} objects`)
})