JavaScript Realm local realm file sync issues

Hi,

I am using mongodb realm as database. I am trying to sync data from realm object server to local and then trying to use my local realm file after sync for my data provider. But if I am trying to use the local realm file its giving error like incompatible histories. What I have to do use the local realm file after sync. And is there getInstance method in realm for JavaScript. I am doing my developemnt in nodejs.

Any help is appreciated.

Realm : 5.0.0
nodejs : 10.18.0

@Ranjan_K Use the Realm.open method described here:
https://docs.realm.io/sync/using-synced-realms/setting-up-your-realms#asynchronously-opening-a-realm

This will download the realm from the realm object server and then return a realm reference you can use when it is finished downloading

1 Like