question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Realm.open and Realm.asyncOpen do not work in the Chrome debugger

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
blagoevcommented, Jun 15, 2017

@agersoncgps It turns out we have fixed this and it will be part of the next release. Thanks for reporting.

0reactions
fealebenpaecommented, Jun 19, 2017

@agersoncgps that’s version 1.8 of realm-js - simply npm install --save realm to upgrade.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found