Realm.open and Realm.asyncOpen do not work in the Chrome debugger
See original GitHub issueI am able to open my synced realm just fine with this.realm = new Realm
But when I try to use Realm.openAsync I get the error:
TypeError: realmConstructor._waitForDownload is not a function
at Function.openAsync (extensions.js:60)
at Database.js:134
at user-methods.js:127
at tryCallOne (core.js:37)
at core.js:123
at JSTimers.js:117
at Object.callTimer (JSTimersExecution.js:95)
at Object.callImmediatesPass (JSTimersExecution.js:199)
at Object.callImmediates (JSTimersExecution.js:214)
at MessageQueue.js:228
Here is my specific implimention:
Realm.Sync.User.registerWithProvider(
"http://localhost:9080",
"custom/cgpsauth",
accessToken,
(error, user) => {
if (error) {
console.log(error);
} else {
console.log(user);
this.realmUser = user;
Realm.openAsync(
{
sync: {
user: user,
url: "realm://localhost:9080/cgps-app-test"
},
schema: [
StudentSchema,
ParentPhonesSchema,
ParentsSchema,
ParentAdressSchema,
DirectoryFavoritesSchema
]
},
(error, realm) => {
if (error) {
console.log(error);
return;
}
// Realm is now downloaded and ready for use
this.realm = realm;
this.loading = false;
console.log("Realm sycn done");
}
);
}
// console.log("user: " + user);
}
);
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Realm.asyncOpen Works 9/10 times
Problem Hello I am developing a swift application for IOS and using a MongoDB Realm database. I am having problems with Realm.
Read more >[Answer]-Realm Error Domain=io.realm.unknown Code=89 ...
I don't if this is a URL issue. Everything works fine but when trying to Async open the realm, I get a domain...
Read more >Source - GitHub
Object` and passed through the `schema` when opening a Realm), will now create ... Breaking change * Removed all code related to the...
Read more >realm-common
A place for common code to be shared between Realm JS and Realm Web. This is an internal package of Realm JS, not...
Read more >Realm.asyncOpen doesn't open realm
I figured out the solution. In my case it needs to specify fullSynchronizacion as true in configuration.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@agersoncgps It turns out we have fixed this and it will be part of the next release. Thanks for reporting.
@agersoncgps that’s version 1.8 of realm-js - simply
npm install --save realm
to upgrade.