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.

[Bug]: realmConstructor.Sync._initializeSyncManager is not a function

See original GitHub issue

Goals

Resolve realmConstructor.Sync._initializeSyncManager is not a function error that occurs while trying to use React Native debugger

Expected Results

A user should be able to debug React Native App using React Native debugger tools (Chrome based).

Actual Results

Error:

realmConstructor.Sync._initializeSyncManager is not a function
handleException @ ExceptionsManager.js:76
handleError @ InitializeCore.js:69
reportFatalError @ error-guard.js:42
guardedLoadModule @ require.js:209
metroRequire @ require.js:136
(anonymous) @ bundle.umd.js:1
executeApplicationScript @ RNDebuggerWorker.js:1
t @ RNDebuggerWorker.js:1

Steps to Reproduce

react-native init AwesomeApp yarn add realm react-native link realm react-native run-ios

Code Sample

I used an example from your documentation

import Realm from 'realm';

const CarSchema = {
  name: 'Car',
  properties: {
    make: 'string',
    model: 'string',
    miles: { type: 'int', default: 0 },
  },
};

const realm = new Realm({ schema: [CarSchema] });

export const queryCars = () => {
  return realm.objects('Car');
};

export const addCar = () => {
  realm.write(() => {
    const myCar = realm.create('Car', {
      make: 'Honda',
      model: 'Civic',
      miles: 1000,
    });
    myCar.miles += 20; // Update a property value
  });
};

export default realm;

Version of Realm and Tooling

  • Realm JS SDK Version: 2.20.0
  • Node or React Native: React Native - 0.57.5
  • Client OS & Version: MacOS - Mojave
  • Which debugger for React Native: React Native Debugger (Chrome based)

Temporary Solution:

Commeting out this line worked but this is not the best solution: Path: node_modules/realm/lib/index.js comment out this line: realmConstructor.Sync._initializeSyncManager(createUserAgentDescription());

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:17
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
bmunkholmcommented, Nov 28, 2018

@kaoDev Hopefully today.

2reactions
ItsNoHaxcommented, Nov 28, 2018

I updated to 2.20.1 and it still appears. @bmunkholm

Read more comments on GitHub >

github_iconTop Results From Across the Web

Realm: Create reactive mobile apps in a fraction of the time
Note: Realm does not support Java outside of Android. ... A good place to initialize Realm is in onCreate on an application subclass:...
Read more >
Changelog — Python 3.11.1 documentation
On macOS, the libc syslog() function is not thread-safe, so syslog.syslog() no longer releases the GIL to call it. Patch by Victor Stinner....
Read more >
realm-java/CHANGELOG and realm-java Releases (Page 12 ...
Fixed a bug in Realm.insert and Realm. ... Removed SyncManager.setLogLevel() . ... Error handler was not called when sync session failed (#3597).
Read more >
Realm Java 2.0 - Mobile Platform Support
The SyncManager is a singleton that manages all synchronized Realms. Currently, you will most likely interact with it to specify a global error...
Read more >
realm-swift - Gitea Yiem
Async Realm init would often give a Realm instance which could not actually be ... Fix a deadlock in SyncManager that was probably...
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