Realm is a mobile database: an alternative to SQLite & key-value stores

Last update: Jun 23, 2022

Realm

Realm is a mobile database that runs directly inside phones, tablets or wearables. This project hosts the JavaScript versions of Realm. Currently we support React Native (both iOS & Android), Node.js and Electron (on Windows, MacOS and Linux).

Features

  • Mobile-first: Realm is the first database built from the ground up to run directly inside phones, tablets and wearables.
  • Simple: Data is directly exposed as objects and queryable by code, removing the need for ORM's riddled with performance & maintenance issues.
  • Modern: Realm supports relationships, generics, and vectorization.
  • Fast: Realm is faster than even raw SQLite on common operations, while maintaining an extremely rich feature set.

Getting Started

Please see the detailed instructions in our docs to use Realm JavaScript for node.js and Realm JavaScript for React Native. Please notice that currently only node.js version 10 or later (excluding 11) are supported.

Documentation

Realm React Native and Node.js

The documentation can be found at docs.mongodb.com/realm/react-native/. The API reference is located at docs.mongodb.com/realm-sdks/js/latest/.

Getting Help

  • Need help with your code?: Look for previous questions on the #realm tag — or ask a new question. You can also check out our Community Forum where general questions about how to do something can be discussed.
  • Have a bug to report? Open an issue. If possible, include the version of Realm, a full log, the Realm file, and a project that shows the issue.
  • Have a feature request? Open an issue. Tell us what the feature should do, and why you want the feature.

Building Realm

In case you don't want to use the precompiled version on npm, you can build Realm yourself from source. You’ll need an Internet connection the first time you build in order to download the core library.

Prerequisites:

  • Xcode 12+
  • node.js version 10.19 or later
  • nvm (on Mac and Linux)
  • cocoapods (on Mac)
  • Android SDK 23+
  • Android NDK 21.0
    • Available via the SDK Manager in Android Studio Tools > SDK Manager.
    • From the command-line: $ANDROID_SDK_ROOT/tools/bin/sdkmanager --install "ndk;21.0.6113669".
  • Android CMake
    • Available via the SDK Manager in Android Studio Tools > SDK Manager
    • From the command-line ```$ANDROID_SDK_ROOT/tools/bin/sdkmanager --install "cmake;3.18.1"````

Clone RealmJS repository:

git clone https://github.com/realm/realm-js.git
cd realm-js
git submodule update --init --recursive

Note: On Windows the RealmJS repo should be cloned with symlinks enabled

#run in elevated command prompt
git clone -c core.symlinks=true https://github.com/realm/realm-js

or manually create the symlinks using directory junctions if you already have the repo cloned.

#run in elevated command prompt
cd realm-js\react-native\android\src\main\jni
#remove src and vendor files
del src
del vendor
mklink /j "src" "../../../../../src/"
mklink /j "vendor" "../../../../../vendor"
cd realm-js\tests\ReactTestApp\android\app\src\main
#remove assets file
del assets
mklink /j assets "../../../../../data"

Note: If you have cloned the repo previously make sure you remove your node_modules directory since it may contain stale dependencies which may cause the build to fail.

Building for iOS:

  • Open react-native/ios/RealmReact.xcodeproj in Xcode
  • Select RealmReact under Targets
  • Build: ⌘ + B

Building for Android:

  • cd react-native/android
  • export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/21.0.6113669 #Location for your NDK folder
  • ./gradlew publishAndroid
  • The compiled version of the Android module is here: <project-root>/android

Building for nodejs:

You can build for nodejs by running the command:

npm run build

If you want to build for Apple Silicon on an Intel based Mac, you can use the following command instead:

 npm run build-m1

Additional steps for Windows

On Windows you will need to setup the environment for node-gyp:

  • Option 1: Install windows-build-tools node package

    # run in elevated command prompt (as Administrator)
    npm install -g --production windows-build-tools
    
  • Option 2: Manually install and configure as described in the node-gyp manual.

    Note you may need to configure the build tools path using npm

    npm config set msbuild_path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"
    

You also need to install openssl libraries with vcpkg:

git clone https://github.com/Microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat
vcpkg install openssl:x64-windows-static
mkdir C:\src\vcpkg\installed\x64-windows-static\lib
copy .\packages\openssl-windows_x64-windows-static\lib\libeay32.lib C:\src\vcpkg\installed\x64-windows-static\lib\
copy .\packages\openssl-windows_x64-windows-static\lib\ssleay32.lib C:\src\vcpkg\installed\x64-windows-static\lib

Installing the project's sub-packages

We've decided to slowly migrate this repository to a mono-repository containing multiple packages (stored in the ./packages directory), to install & link these, run

npx lerna bootstrap

Please familiarise yourself with Lerna to learn how to add dependencies to these packages.

Building docs

API documentation is written using JSDoc.

  • npm run jsdoc

The generated docs can be found by opening docs/output/realm/<version>/index.html.

Debugging the node addon

You can use Visual Studio Code to develop and debug. In the .vscode folder, configuration for building and debugging has been added for your convience.

VSCode has good support for debugging JavaScript, but to work with C++ code, you are required to install two additional VSCode extensions:

  • Microsoft C/C++
  • CodeLLDB

To begin, you will need to build the node addon and prepare the test environment:

npm install --build-from-source --debug
(cd tests && npm install)

Prior to begin debugging, you must start Realm Object Server. In VSCode, under menu Tasks/Run Task, find Download and Start Server.

In the debugging pane, you can find Debug LLDB + NodeJS in the dropdown. First select Start Debugging in the Debug menu.

Issues with debugging

Some users have reported the Chrome debugging being too slow to use after integrating Realm into their react-native project. This is due to the blocking nature of the RPC calls made through the Realm library. See https://github.com/realm/realm-js/issues/491 for more information. The best workaround is to use Safari instead, as a user has described here.

Moreover, we have a switch to Flipper in the works as part of our effort to support Hermes. It implies that we envision a near future where the Chrome debugging will be removed, and we currently don't invest much in its maintenance.

Running the tests

The tests will spawn a new shell when running, so you need to make sure that new shell instances use the correct version of npm. On Mac you can use Homebrew and you can add the following to your preferred shell setup:

export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"

Install cocoapods

sudo gem install cocoapods

You can now use scripts/test.sh to run the various tests. You will need yarn installed on the machine.

test.sh options

  • eslint - lints the sources
  • react-tests - runs all React Native tests on iOS Simulator
  • react-tests-android runs all React Native Android tests on Android emulator
  • node - runs all tests for node
  • test-runners - checks supported tests runners are working correctly

If you modify or add a test, please remove tests/ReactTestApp/node_modules/realm-tests before running test.sh (of course, only if you are testing with React Native).

Testing on Windows

On Windows some of these targets are available as npm commands.

npm run eslint
npm run node-tests
npm run test-runners

Debugging the tests

You can attach a debugger to react-native tests by passing "Debug" to the test.sh script. A Chrome browser will open and connect to the react native application. Use the built-in Chrome Debugger to debug the code.

./scripts/tests.sh react-tests Debug

Using Visual Studio Code

You can debug node tests using Visual Studio Code. Just use one of the launch configurations.

Analytics

Asynchronously submits install information to Realm.

Why are we doing this? In short, because it helps us build a better product for you. None of the data personally identifies you, your employer or your app, but it will help us understand what language you use, what Node.js versions you target, etc. Having this info will help prioritizing our time, adding new features and deprecating old features. Collecting an anonymized application path & anonymized machine identifier is the only way for us to count actual usage of the other metrics accurately. If we don’t have a way to deduplicate the info reported, it will be useless, as a single developer npm install-ing the same app 10 times would report 10 times more than another developer that only installs once, making the data all but useless. No one likes sharing data unless it’s necessary, we get it, and we’ve debated adding this for a long long time. If you truly, absolutely feel compelled to not send this data back to Realm, then you can set an env variable named REALM_DISABLE_ANALYTICS.

Currently the following information is reported:

  • What version of Realm is being installed.
  • The OS platform and version which is being used.
  • Node.js, v8, libuv, OpenSSL version numbers.
  • An anonymous machine identifier and hashed application path to aggregate the other information on.

Known issues

  • AWS Lambda is not supported.

Code of Conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

Contributing

See CONTRIBUTING.md for more details!

License

Realm JS and Realm Core are published under the Apache License 2.0.

This product is not being made available to any person located in Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, or to any other person that is not eligible to receive the product under U.S. law.

Feedback

If you use Realm and are happy with it, all we ask is that you please consider sending out a tweet mentioning @realm to share your thoughts

And if you don't like it, please let us know what you would like improved, so we can fix it!

analytics

GitHub

https://github.com/realm/realm-js
Comments
  • 1. Support Hermes engine

    Goals

    Make Hermes engine to work with Realm. Hermes comes from react-native 0.60.2 and significantly improves app performance on Android.

    Steps to Reproduce

    Following https://facebook.github.io/react-native/docs/hermes. if enableHermes: true, you will get the following:

    java.lang.UnsatisfiedLinkError: couldn't find DSO to load: librealmreact.so caused by: dlopen failed: library "libjsc.so" not found
            at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
            at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
            at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
            at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
            at io.realm.react.RealmReactModule.<clinit>(RealmReactModule.java:56)
            at io.realm.react.RealmReactPackage.createNativeModules(RealmReactPackage.java:31)
    

    With enableHermes: false, everything works as expected.

    Version of Realm and Tooling

    • Realm JS SDK Version: 2.28.1
    • React Native: 0.60.3
    Reviewed by ferrannp at 2019-07-12 20:54
  • 2. Infinite loop of "callbacks_poll"

    So, it's YOU! :-)

    I've been seeing this endless loop of "callbacks_poll" that is killing my debugging performance and pleasure.

    screen shot 2017-11-24 at 17 11 55

    Goals

    Get rid of the endless loop of callbacks_poll in my networking request pane and the associated memory leak

    Expected Results

    No callbacks_poll visible and no memory leak

    Actual Results

    See image. Endless loop. Makes it hard to identify individual network requests and there seems to be an associated memory leak, although I can't guarantee that it is related.

    Steps to Reproduce

    Not sure. This happened after I upgraded Realm but I didn't realize it at the time. Here's my Realm setup

    Code Sample

    class User {}
    User.schema = {
    	name: 'User',
    	primaryKey: 'id',
    	properties: {
    		id: { type: 'int' },
    		nickName: { type: 'string' },
    		displayName: { type: 'string' },
    		title: { type: 'string', optional: true },
    		email: { type: 'string' },
    		photo: { type: 'string', optional: true },
    		photoDir: { type: 'string' },
    		gender: { type: 'string' },
    		refId: { type: 'string', optional: true },
    		sessionToken: { type: 'string', optional: true }
    	}
    };
    
    export default User;
    
    
    import Realm from 'realm';
    import { logoutUser } from 'modules/login/actions/loginActions';
    import { delToken, clearTokens } from 'modules/login/actions/oauthActions';
    import * as config from 'config';
    import { dbg } from 'utils';
    import UserRecord from 'data/records/userRecord';
    import {
    	EMIT_USER,
    	GET_USER,
    	STORE_USER,
    	DEL_USER,
    	CLEAR_ALL
    } from '../userActionTypes';
    import User from '../schemas/userDbSchema';
    
    const realmSettings = {
    	schema: [User],
    	schemaVersion: 1,
    	migration: (oldRealm, newRealm) => {
    		// only apply this change if upgrading to schemaVersion 1
    		/* if (oldRealm.schemaVersion < 1) {
              const oldObjects = oldRealm.objects('User');
              const newObjects = newRealm.objects('User');
        
              // loop through all objects and set the name property in the new schema
              for (let i = 0; i < oldObjects.length; i++) {
                newObjects[i].sessionToken = undefined;
              }
            } */
    	}
    };
    
    const realm = new Realm(realmSettings);
    
    export function getUser() {
    	return {
    		type: GET_USER
    	};
    }
    
    export function emitUser(user) {
    	return {
    		type: EMIT_USER,
    		user
    	};
    }
    
    export function loadUser(userId) {
    	return async (dispatch, getState) => {
    		dispatch(getUser());
    
    		const sessionUser = getState().users.sessionUser;
    
    		if (sessionUser && sessionUser.id === userId) return sessionUser;
    
    		let user = null;
    
    		if (userId) user = realm.objectForPrimaryKey('User', userId);
    		else {
    			const users = realm.objects('User');
    
    			if (users.length > 0) user = users.values().next().value;
    		}
    
    		dbg(user ? `User ${user.id} loaded` : 'No user loaded');
    
    		if (user) {
    			dispatch(emitUser(new UserRecord(user)));
    
    			return user;
    		}
    
    		return null;
    	};
    }
    

    Version of Realm and Tooling

    • Realm JS SDK Version: 2.0.11
    • Node or React Native: React Native 0.49.5
    • Client OS & Version: Mac Os
    • Which debugger for React Native: React-Native-Debugger or Chrome
    Reviewed by mschipperheyn at 2017-11-28 14:25
  • 3. Accessing object of type X which has been invalidated or deleted

    Even though the .isValid method is present in both collection and object, neither of them is doing anything to prevent this error.

    I tried using Collection.isValid, Object.isValid, Results.snapshot .. nothing works

    I'm rendering the Results on one view and if I delete one Object in another view and then return it throws this error.

    photo_2017-05-24_11-37-18

    here is my code for the 2 views

    import React, { Component } from 'react';
    import {
      InteractionManager
    } from 'react-native';
    import {
      Body,
      Button,
      Container,
      Content,
      Fab,
      Footer,
      FooterTab,
      Header,
      Icon,
      Input,
      Item,
      Left,
      List,
      ListItem,
      Right,
      Text,
      Title,
      View
    } from 'native-base';
    import realm from '../realm';
    
    class CharactersScreen extends Component {
    
      constructor (props) {
        super(props);
    
        this.characters = realm.objects('Character');
        this.state = {
          searchBar: {
            active: false
          },
          characters: this.characters
        };
      }
    
      navigateToAddCharacter = () => {
        let { navigate } = this.props.navigation;
    
        navigate('AddCharacter');
      }
    
      static navigationOptions = {
        title: 'Characters',
        headerRight: <View style={{ flexDirection: 'row' }}>
          <Button transparent><Icon name="md-search"/></Button>
          <Button transparent><Icon name="md-funnel"/></Button>
        </View>
      }
    
      listenToRealm = (name, changes) => {
        this.setState({
          characters: this.characters
        });
      }
    
      componentWillMount () {
        InteractionManager.runAfterInteractions(() => {
          this.characters.addListener(this.listenToRealm);
        });
      }
    
      componentWillUnmount () {
        this.characters.removeListener(this.listenToRealm);
      }
    
      render () {
        let { navigate } = this.props.navigation;
        let {
          searchBar,
          characters
        } = this.state;
    
        return (
          <Container>
            {
              searchBar.active ?
                <Header searchBar rounded>
                  <Item>
                    <Icon name="md-search" />
                    <Input placeholder="Search" />
                    <Icon name="md-people" />
                  </Item>
                  <Button transparent>
                    <Text>Search</Text>
                  </Button>
                </Header> : null
            }
            <Content>
              <List>
                {
                  characters.map((character, index) => {
                    return (
                      <ListItem
                        key={index} onPress={navigate.bind(null, 'CharacterDetails', {
                          character
                        })}>
                        <Body>
                          <Text>{character.name}</Text>
                          <Text note>{character.note}</Text>
                        </Body>
                        <Right>
                          <Icon name="md-arrow-round-forward" />
                        </Right>
                      </ListItem>
                    );
                  })
                }
              </List>
            </Content>
            <Fab
              active={false}
              direction="top"
              containerStyle={{ marginLeft: 10 }}
              style={{ backgroundColor: '#5067FF' }}
              position="bottomRight"
              onPress={this.navigateToAddCharacter}>
                <Icon name="md-add" />
            </Fab>
          </Container>
        );
      }
    }
    
    export default CharactersScreen;
    
    

    Here is the view where I delete the object

    import React, { Component } from 'react';
    import {
      Alert
    } from 'react-native';
    import {
      Body,
      Button,
      Card,
      CardItem,
      Container,
      Content,
      Icon,
      Left,
      Right,
      Text
    } from 'native-base';
    import realm from '../realm';
    
    class CharacterDetailsScreen extends Component {
    
      static navigationOptions = {
        title: 'Character: Details'
      }
    
      promptDelete = () => {
        Alert.alert(
          'Delete Character',
          'Deleting is irreversible, are you sure?',
          [
            { text: 'Cancel', onPress: () => false },
            { text: 'OK', onPress: () => this.deleteCharacter() }
          ],
          { cancelable: false }
        );
      }
    
      deleteCharacter = () => {
        let {
          state: {
            params: {
              character
            }
          }
        } = this.props.navigation;
        let { goBack } = this.props.navigation;
    
        realm.write(() => {
          realm.delete(character);
        });
    
        goBack();
      }
    
      render () {
        let {
          navigate,
          state: {
            params: {
              character
            }
          }
        } = this.props.navigation;
    
        return (
          <Container>
            <Content>
              <Card>
                <CardItem header>
                  <Left>
                    <Icon name={character.favorite ? 'md-star' : 'md-person'}/>
                    <Body>
                      <Text>{character.name}</Text>
                      <Text note>{character.note}</Text>
                    </Body>
                  </Left>
                </CardItem>
                <CardItem>
                  <Body>
                    <Text>{character.description}</Text>
                  </Body>
                </CardItem>
                <CardItem>
                  <Body>
                    <Text>Status</Text>
                    <Text note>{character.status}</Text>
                  </Body>
                </CardItem>
                <CardItem>
                  <Left>
                    <Button onPress={this.promptDelete} transparent>
                      <Icon name="md-close" style={{ color: '#FF0000' }} />
                      <Text style={{ color: '#FF0000' }}> Delete</Text>
                    </Button>
                  </Left>
                  <Right>
                    <Button transparent>
                      <Icon name="md-create" />
                      <Text> Edit</Text>
                    </Button>
                  </Right>
                </CardItem>
              </Card>
            </Content>
          </Container>
        );
      }
    }
    
    export default CharacterDetailsScreen;
    
    
    Reviewed by L3V147H4N at 2017-05-24 14:40
  • 4. Missing Realm constructor. Did you run "react-native link realm"?

    2019-10-12 18:12:48.003275+0800 mlmlApp[28520:193898] [] nw_socket_handle_socket_event [C5.1:1] Socket SO_ERROR [61: Connection refused] 2019-10-12 18:12:48.008963+0800 mlmlApp[28520:193898] [] nw_socket_handle_socket_event [C5.2:1] Socket SO_ERROR [61: Connection refused] 2019-10-12 18:12:48.017092+0800 mlmlApp[28520:193888] [] nw_connection_get_connected_socket [C5] Client called nw_connection_get_connected_socket on unconnected nw_connection 2019-10-12 18:12:48.017465+0800 mlmlApp[28520:193888] TCP Conn 0x6000020f1680 Failed : error 0:61 [61] 2019-10-12 18:12:48.222 [error][tid:com.facebook.react.JavaScript] Error: Missing Realm constructor. Did you run "react-native link realm"? Please see https://realm.io/docs/react-native/latest/#missing-realm-constructor for troubleshooting 2019-10-12 18:12:48.226 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Error: Missing Realm constructor. Did you run "react-native link realm"? Please see https://realm.io/docs/react-native/latest/#missing-realm-constructor for troubleshooting 2019-10-12 18:12:48.253 [error][tid:com.facebook.react.JavaScript] Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication) 2019-10-12 18:12:48.256 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

    Version of Realm and Tooling

    • Realm JS SDK Version: 3.2.0
    • Node or React Native: 0.61.2
    • Client OS & Version: Mac10.14.6
    • Which debugger for React Native: xCode

    I have followed the documentation ‘https://realm.io/docs/javascript/latest/#missing-realm-constructor’ but it not work

    Reviewed by Yieron at 2019-10-12 10:17
  • 5. /lib/arm64/librealmreact.so Crashes on app launch

    Goals

    Expected Results

    Actual Results

    [18:48] Jaideep Singh (Contractor)

    Build fingerprint: 'samsung/hero2ltexx/hero2lte:8.0.0/R16NW/G935FXXU2ERGE:user/release-keys'

    Revision: '9'

    ABI: 'arm64'

    pid: 21491, tid: 21588, name: mqt_js >>> <<<

    signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0x37bf3a90253f5

    x0 0000000000000000 x1 0000000000000000 x2 0000000000000005 x3 a9037bf3a90253f5

    x4 0000000000000040 x5 0000007329905788 x6 0000000000ffffff x7 ffffffffffffffff

    x8 00000000000000e2 x9 a0e2bc1e8f6365e0 x10 0000000000000001 x11 0000000000000000

    x12 0000007337fbb2c8 x13 0000000000000050 x14 000000000000000d x15 aaaaaaaaaaaaaaab

    x16 000000732a38c710 x17 000000733a046cb0 x18 0000007329905a84 x19 0000007337e6f690

    x20 0000007337e6f690 x21 00000073299057b8 x22 0000007329905828 x23 0000007329907588x24 000000733baecbc8 x25 0000007329907588 x26 0000000000000000 x27 0000000000000000

    x28 0000000000000001 x29 0000007329905660 x30 0000007329c65e84

    sp 0000007329905600 pc 00037bf3a90253f5 pstate 0000000060000000

    backtrace:

    #00 pc 00037bf3a90253f5

    #01 pc 0000000000258e80 /lib/arm64/librealmreact.so

    #02 pc 0000000000022414 /lib/arm64/libjscexecutor.so (_ZN8facebook3jsc10JSCRuntimeC2Ev+28)

    #03 pc 00000000000254d0 /lib/arm64/libjscexecutor.so (_ZN8facebook3jsc14makeJSCRuntimeEv+28)

    #04 pc 0000000000018b58 /lib/arm64/libjscexecutor.so

    #05 pc 00000000000a4468 /lib/arm64/libreactnativejni.so (_ZN8facebook5react16NativeToJsBridgeC2EPNS0_17JSExecutorFactoryENSt6__ndk110shared_ptrINS0_14ModuleRegistryEEENS5_INS0_18MessageQueueThreadEEENS5_INS0_16InstanceCallbackEEE+252)

    #06 pc 000000000009c0e0 /lib/arm64/libreactnativejni.so

    #07 pc 0000000000065d7c ==/lib/arm64/libreactnativejni.so

    #08 pc 0000000000063cac /lib/arm64/libreactnativejni.so

    #09 pc 0000000000059288 /lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail13MethodWrapperIMNS_5react15JNativeRunnableEFvvEXadL_ZNS4_3runEvEES4_vJEE8dispatchENS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIS4_NS3_8RunnableEE8JavaPartESB_vE11_javaobjectEEE+32)

    #10 pc 0000000000059204 /lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassINS_5react15JNativeRunnableENS6_8RunnableEE8JavaPartES8_vE11_javaobjectEEEEXadL_ZNS1_13MethodWrapperIMS7_FvvEXadL_ZNS7_3runEvEES7_vJEE8dispatchESE_EESD_vJEE4callEP7_JNIEnvP8_jobject+56) #11 pc 000000000007a63c /oat/arm64/base.odex (offset 0x75000)

    Steps to Reproduce

    Launching the app

    Code Sample

    defaultConfig { applicationId "package-name" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 137 versionName "8.2" multiDexEnabled true ndk { abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' // Added } vectorDrawables.useSupportLibrary = true resValue "string", "build_config_package", "package-name" if (BUILD_FOR_APPCENTER=='false') { signingConfig signingConfigs.release } }

    Version of Realm and Tooling

    • Realm JS SDK Version: 2.28.0
    • Node or React Native: ^0.59.4
    • Client OS & Version: Android 8
    • Which debugger for React Native: ?/None
    Reviewed by jaideep101 at 2019-05-28 14:30
  • 6. Failed to load 'http://:8083/create_session'

    Goals

    Identify and fix bug. Debug JS Remotely worked fine before adding Realm.

    Expected Results

    Not crash the app and still be able to Debug JS Remotely.

    Actual Results

    Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://localhost:8083/create_session'.

    Steps to Reproduce

    react-native init AwesomeProject yarn add realm Added "import Realm from 'realm';" to App.js react-native link realm

    Install and run app on iOS device. Enable Debug JS Remotely.

    Version of Realm and Tooling

    • Realm JS SDK Version: 2.4.1
    • Node or React Native: 0.54
    • Client OS & Version: iOS 11.3.1
    • Which debugger for React Native: Chrome 66.0.3359.139
    Reviewed by nitelight at 2018-05-10 05:23
  • 7. Build Failed on iOS

    Result

    Resolved requirements: { SYNC_SERVER_FOLDER: 'sync', SYNC_ARCHIVE: 'realm-sync-cocoa-3.0.0.tar.gz', SYNC_ARCHIVE_ROOT: 'core' } No lockfile found at the target, proceeding. Download url: https://static.realm.io/downloads/sync/realm-sync-cocoa-3.0.0.tar.gz Extracting realm-sync-cocoa-3.0.0.tar.gz => /Users/pong/Projects/infopais-mobile/node_modules/realm/vendor/realm-ios { Error: unexpected end of file at Zlib._handle.onerror (zlib.js:371:17) errno: -5, code: 'Z_BUF_ERROR' } Command /bin/sh failed with exit code 1

    Steps to Reproduce

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

    Version of Realm and Tooling

    • Realm JS SDK Version: 2.3.0
    • Node or React Native: React Native - 0.55
    • Client OS & Version: macOS High Sierra
    • Which debugger for React Native: ?/None

    Issue is same with #1647, but after removing and installing after many times. Still getting error

    Reviewed by krrevilla at 2018-05-03 05:39
  • 8. Unhandled session token refresh error

    I get a session refresh error after running an app for a view minutes in react native on iOS:

    Unhandled session token refresh error: could not look up session at path /Users/XXXXXXX/Library/Developer/CoreSimulator/Devices/85A472DA-CBCB-416B-871B-50CA0DC03DFD/data/Containers/Data/Application/865345A1-6C84-4470-8055-0F9A65A86452/Documents/realm-object-server/dfeddc7733c15fb2b3108c217c1ce0db/realm%3A%2F%2Flocalhost%3A9080%2F%7E%2F__management
    

    React native: 0.45 Realm: 1.8.3 Realm Obj. Server: 1.7.6 Simulator Device Version: iOS 10.3

    Reviewed by mklb at 2017-07-04 11:37
  • 9. Support React Native installed with CocoaPods

    Goals: adding RealmReact 1.0.2 project into XCode with pod install of [email protected] will not result in compilation failure.

    Expected results: success app build using RealmReact project with [email protected] inside XCode project.

    Actual results: compilation failure on RealmReact.mm: 'React/RCTBridgeDelegate.h' file not found in RCTBridge.h. This is most likely due to the iOS header breaking change introduced in [email protected] where React Native headers are expected to be enclosed in angle brackets, e.g. <React/RCTBridge.h>. Previously working on [email protected] using same app code.

    Steps to reproduce: directory structure: $root/app, $root/rn (app XCode project is sibling of react native directory rn)

    1. npm install [email protected] [email protected]
    2. npm install [email protected]
    3. include Yoga and React in Podfile: target 'app' do

    use_frameworks!

    pod 'Fabric' pod 'Crashlytics'

    React libraries

    pod 'Yoga', :path => '../rn/node_modules/react-native/ReactCommon/yoga', :inhibit_warnings => true pod 'React', :path => '../rn/node_modules/react-native', :subspecs => [ 'Core', 'RCTActionSheet', 'RCTAnimation', 'RCTImage', 'RCTLinkingIOS', 'RCTText', 'RCTNetwork', 'RCTWebSocket', ], :inhibit_warnings => true

    1. pod install to install Yoga and React Native
    2. add RealmReact project into XCode from ../rn/node_modules/realm/react-native/ios/RealmReact.xcodeproj
    3. compile iOS app

    Version: Realm 1.0.2 / Xcode 8.1 / OS X El Capitan 10.11.6

    Reviewed by afces1 at 2017-02-23 00:43
  • 10. [React Native] Add 64 bit support for Android

    From August 1, 2019 Google Play will not accept apps with 32 bit only .so files. Currently, we only compile our React Native (Android) .so for ARMv7 and x86, but we should in good time provide 64 bit .so files too.

    React Native (Android) added support for ARM64-v8a and x86-64 recently: https://github.com/facebook/react-native/pull/18754.

    Reference: https://android-developers.googleblog.com/2019/01/get-your-apps-ready-for-64-bit.html

    Reviewed by kneth at 2019-01-16 09:50
  • 11. Missing Realm constructor or duplicated symbols

    Goals

    Using Realm normally

    Expected Results

    Actual Results

    after install Realm and pod install, app will launch with error Missing Realm constructor. After research through github, I found that we should link libRealmReact.a to Link binary with libraries. But after linked, app throw error that 155 duplicate symbols for architecture x86_64.

    Steps to Reproduce

    react-native init exampleProject yarn add realm cd ios && pod install

    Code Sample

    import Realm from 'realm

    Version of Realm and Tooling

    • Realm JS SDK Version: 3.5.0
    • Node or React Native: node 10.15.3 RN 0.61.2
    • Client OS & Version: Mac OSX Catalina 10.15.1 Xcode 11.2.1
    • Which debugger for React Native: None
    Reviewed by hauhuynh1208 at 2019-12-04 08:42
  • 12. Enable testNoMigrationOnSync

    What, How & Why?

    Mentioned in https://github.com/realm/realm-js/issues/3312

    ☑️ ToDos

    • [x] 📝 Changelog entry
    • ~[ ] 📝 Compatibility label is updated or copied from previous entry~
    • [x] 🚦 Tests
    • ~[ ] 🔀 Executed flexible sync tests locally if modifying flexible sync~
    • ~[ ] 📱 Check the React Native/other sample apps work if necessary~
    • ~[ ] 📝 Public documentation PR created or is not necessary~
    • ~[ ] 💥 Breaking label has been applied or is not necessary~

    If this PR adds or changes public API's:

    • ~[ ] typescript definitions file is updated~
    • ~[ ] jsdoc files updated~
    • ~[ ] Chrome debug API is updated if API is available on React Native~
    Reviewed by kneth at 2022-06-20 11:42
  • 13. Add build step to check that packages are consuming the latest version of internal dependencies

    We have had issues where one of our packages is updated (e.g. @realm.io/common), but the consuming package has not had its package.json updated to consume this new version, e.g. https://github.com/realm/realm-js/issues/4657.

    This is easy to miss, as locally lerna has forceLocal enabled, so will always use the version on disk when developing; and when doing a clean install of Realm from npm, our version specifiers are e.g. ^0.1.1 so a newer published version will probably be pulled in when you install it (e.g. ^0.1.1 will pull in 0.1.2 instead if it is published). You would usually only hit this as an issue when upgrading from an older version of Realm without cleaning out node_modules – it seems in this case, npm will not upgrade the version of the package.

    Because this relates to what is published on npm, it's tricky for us to catch this in our integration tests (as they use the local version instead – we'd have to publish a new "internal" version to npm for every build or something). Our install test does not upgrade from an older version, so would not catch this specific issue in most cases, and also does not test every scenario that the integration tests do.

    The easiest way to catch this would seem to be a step as part of our GHA workflow which checks that any of our package.jsons which consume an internal package are consuming the latest version of that package. We may want to provide an "escape hatch" for the case where we do not want to upgrade some specific package, but I suspect this will be a very rare occurrence, so maybe we just tackle this if we ever hit the situation where we need it.

    Reviewed by tomduncalf at 2022-06-20 10:36
  • 14. Realm with sync enabled CRASHES the whole app when "path" is specified

    How frequently does the bug occur?

    All the time

    Description

    I created a demo project that crashes after login immediatelly when in realm configuration we add path variable. It seems like unintended behaviour. When removing path no crash appears.

    https://github.com/boltss/realm-sync-demo demo project. That crashes when path is specified.

    In our case having 2 realms side by side is mandatory. And to separate them we need to specify path to one.

    Stacktrace & log output

    ERROR  [Error: Unable to open realm: Incompatible histories. Expected an empty or synced Realm, but found history type 2, top ref 344 Path: /Users/username/Library/Developer/CoreSimulator/Devices/A1DFCA63-1C6D-4666-AA79-024DB7533A92/data/Containers/Data/Application/67EA29FA-8BC7-470C-8B4D-950175BF4B50/Documents/sync.realm
    Exception backtrace:
    0   RealmSyncDemo                       0x00000001032b655c _ZN5realm21IncompatibleHistoriesC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_ + 84
    1   RealmSyncDemo                       0x00000001032b54f4 _ZN5realm2DB4openERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbNS_9DBOptionsE + 6728
    2   RealmSyncDemo                       0x00000001032b704c _ZN5realm2DB4openERNS_11ReplicationERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS_9DBOptionsE + 124
    3   RealmSyncDemo                       0x00000001032bd868 _ZN5realm2DB6createENSt3__110unique_ptrINS_11ReplicationENS1_14default_deleteIS3_EEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_9DBOptionsE + 156
    4   RealmSyncDemo                       0x00000001030bc618 _ZN5realm5_impl16RealmCoordinator7open_dbEv + 1212
    5   RealmSyncDemo                       0x00000001030bbe9c _ZN5realm5_impl16RealmCoordinator19create_sync_sessionEv + 36
    6   RealmSyncDemo                       0x00000001030be614 _ZN5realm5_impl16RealmCoordinator22get_synchronized_realmENS_11RealmConfigE + 80
    7   RealmSyncDemo                       0x000000010311a094 _ZN5realm5Realm22get_synchronized_realmENS_11RealmConfigE + 108
    8   RealmSyncDemo                       0x00000001030266ec _ZN5realm2js10RealmClassINS_3jsc5TypesEE16async_open_realmEPK15OpaqueJSContextP13OpaqueJSValueRNS0_9ArgumentsIS3_EERNS0_11ReturnValueIS3_EE + 772
    9   RealmSyncDemo                       0x000000010301be00 _ZN5realm2js4wrapIXadL_ZNS0_10RealmClassINS_3jsc5TypesEE16async_open_realmEPK15OpaqueJSContextP13OpaqueJSValueRNS0_9ArgumentsIS4_EERNS0_11ReturnValueIS4_EEEEEEPKS9_S8_SA_SA_mPKSI_PSI_ + 56
    10  JavaScriptCore                      0x000000019190e9c4 _ZN3JSCL22callJSCallbackFunctionEPNS_14JSGlobalObjectEPNS_9CallFrameE + 524
    11  ???                                 0x0000000134205664 0x0 + 5169501796
    12  JavaScriptCore                      0x0000000191882320 llint_entry + 151568
    13  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    14  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    15  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    16  JavaScriptCore                      0x0000000191883038 llint_entry + 154920
    17  JavaScriptCore                      0x0000000191882320 llint_entry + 151568
    18  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    19  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    20  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    21  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    22  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    23  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    24  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    25  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    26  JavaScriptCore                      0x0000000191882fa0 llint_entry + 154768
    27  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    28  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    29  JavaScriptCore                      0x0000000191882320 llint_entry + 151568
    30  JavaScriptCore                      0x0000000191882320 llint_entry + 151568
    31  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    32  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    33  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    34  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    35  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    36  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    37  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    38  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    39  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    40  JavaScriptCore                      0x0000000191882320 llint_entry + 151568
    41  JavaScriptCore                      0x0000000191882320 llint_entry + 151568
    42  JavaScriptCore                      0x00000001918835ec llint_entry + 156380
    43  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    44  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    45  JavaScriptCore                      0x00000001918835ec llint_entry + 156380
    46  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    47  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    48  JavaScriptCore                      0x0000000191882288 llint_entry + 151416
    49  JavaScriptCore                      0x000000019185d064 vmEntryToJavaScript + 264
    50  JavaScriptCore                      0x0000000192000e98 _ZN3JSC11Interpreter11executeCallEPNS_14JSGlobalObjectEPNS_8JSObjectERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 640
    51  JavaScriptCore                      0x0000000192329110 _ZN3JSC27boundThisNoArgsFunctionCallEPNS_14JSGlobalObjectEPNS_9CallFrameE + 744
    52  JavaScriptCore                      0x000000019185d210 vmEntryToNative + 280
    53  JavaScriptCore                      0x0000000192000ec0 _ZN3JSC11Interpreter11executeCallEPNS_14JSGlobalObjectEPNS_8JSObjectERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 680
    54  JavaScriptCore                      0x0000000191927b0c JSObjectCallAsFunction + 760
    55  RealmSyncDemo                       0x0000000102eb14b4 _ZN8facebook3jsc10JSCRuntime4callERKNS_3jsi8FunctionERKNS2_5ValueEPS7_m + 268
    56  RealmSyncDemo                       0x0000000102ec0820 _ZNK8facebook3jsi8Function4callERNS0_7RuntimeEPKNS0_5ValueEm + 100
    57  RealmSyncDemo                       0x0000000102ec075c _ZNK8facebook3jsi8Function4callERNS0_7RuntimeESt16initializer_listINS0_5ValueEE + 112
    58  RealmSyncDemo                       0x0000000102ee2800 _ZNK8facebook3jsi8Function4callIJRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_NS0_5ValueEEEESC_RNS0_7RuntimeEDpOT_ + 284
    59  RealmSyncDemo                       0x0000000102ee2674 _ZZN8facebook5react11JSIExecutor12callFunctionERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_RKN5folly7dynamicEENK3$_5clEv + 140
    60  RealmSyncDemo                       0x0000000102ee25c8 _ZNSt3__1L8__invokeIRZN8facebook5react11JSIExecutor12callFunctionERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESB_RKN5folly7dynamicEE3$_5JEEEDTclscT_fp_spscT0_fp0_EEOSI_DpOSJ_ + 24
    61  RealmSyncDemo                       0x0000000102ee2580 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZN8facebook5react11JSIExecutor12callFunctionERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESD_RKN5folly7dynamicEE3$_5EEEvDpOT_ + 28
    62  RealmSyncDemo                       0x0000000102ee2558 _ZNSt3__110__function12__alloc_funcIZN8facebook5react11JSIExecutor12callFunctionERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESC_RKN5folly7dynamicEE3$_5NS8_ISH_EEFvvEEclEv + 28
    63  RealmSyncDemo                       0x0000000102ee12f8 _ZNSt3__110__function6__funcIZN8facebook5react11JSIExecutor12callFunctionERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESC_RKN5folly7dynamicEE3$_5NS8_ISH_EEFvvEEclEv + 28
    64  RealmSyncDemo                       0x0000000102f217e8 _ZNKSt3__110__function12__value_funcIFvvEEclEv + 60
    65  RealmSyncDemo                       0x0000000102f216f8 _ZNKSt3__18functionIFvvEEclEv + 24
    66  RealmSyncDemo                       0x0000000102c53620 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 24
    67  RealmSyncDemo                       0x0000000102c56584 _ZNSt3__1L8__invokeIRPFvRKNS_8functionIFvvEEENS1_IFNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEvEEEEJS5_SD_EEEDTclscT_fp_spscT0_fp0_EEOSH_DpOSI_ + 92
    68  RealmSyncDemo                       0x0000000102c564f8 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRPFvRKNS_8functionIFvvEEENS3_IFNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEvEEEES7_SF_EEEvDpOT_ + 72
    69  RealmSyncDemo                       0x0000000102c5647c _ZNSt3__110__function12__alloc_funcIPFvRKNS_8functionIFvvEEENS2_IFNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEvEEEENSA_ISG_EESF_EclES6_OSE_ + 72
    70  RealmSyncDemo                       0x0000000102c54ea0 _ZNSt3__110__function6__funcIPFvRKNS_8functionIFvvEEENS2_IFNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEvEEEENSA_ISG_EESF_EclES6_OSE_ + 72
    71  RealmSyncDemo                       0x0000000102ee0854 _ZNKSt3__110__function12__value_funcIFvRKNS_8functionIFvvEEENS2_IFNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEvEEEEEclES6_OSE_ + 104
    72  RealmSyncDemo                       0x0000000102ed0800 _ZNKSt3__18functionIFvRKNS0_IFvvEEENS0_IFNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEvEEEEEclES4_SC_ + 72
    73  RealmSyncDemo                       0x0000000102ed04b0 _ZN8facebook5react11JSIExecutor12callFunctionERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_RKN5folly7dynamicE + 324
    74  RealmSyncDemo                       0x0000000102e97d88 _ZZN8facebook5react16NativeToJsBridge12callFunctionEONSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES9_ON5folly7dynamicEENK3$_2clEPNS0_10JSExecutorE + 636
    75  RealmSyncDemo                       0x0000000102e97aec _ZNSt3__1L8__invokeIRZN8facebook5react16NativeToJsBridge12callFunctionEONS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESA_ON5folly7dynamicEE3$_2JPNS2_10JSExecutorEEEEDTclscT_fp_spscT0_fp0_EEOSI_DpOSJ_ + 36
    76  RealmSyncDemo                       0x0000000102e97a98 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZN8facebook5react16NativeToJsBridge12callFunctionEONS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESC_ON5folly7dynamicEE3$_2PNS4_10JSExecutorEEEEvDpOT_ + 52
    77  RealmSyncDemo                       0x0000000102e97a58 _ZNSt3__110__function12__alloc_funcIZN8facebook5react16NativeToJsBridge12callFunctionEONS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESB_ON5folly7dynamicEE3$_2NS8_ISF_EEFvPNS3_10JSExecutorEEEclEOSI_ + 52
    78  RealmSyncDemo                       0x0000000102e964fc _ZNSt3__110__function6__funcIZN8facebook5react16NativeToJsBridge12callFunctionEONS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESB_ON5folly7dynamicEE3$_2NS8_ISF_EEFvPNS3_10JSExecutorEEEclEOSI_ + 52
    79  RealmSyncDemo                       0x0000000102ea3fb8 _ZNKSt3__110__function12__value_funcIFvPN8facebook5react10JSExecutorEEEclEOS5_ + 84
    80  RealmSyncDemo                       0x0000000102ea3f30 _ZNKSt3__18functionIFvPN8facebook5react10JSExecutorEEEclES4_ + 48
    81  RealmSyncDemo                       0x0000000102ea3ef0 _ZZN8facebook5react16NativeToJsBridge18runOnExecutorQueueENSt3__18functionIFvPNS0_10JSExecutorEEEEENK3$_8clEv + 92
    82  RealmSyncDemo                       0x0000000102ea3e74 _ZNSt3__1L8__invokeIRZN8facebook5react16NativeToJsBridge18runOnExecutorQueueENS_8functionIFvPNS2_10JSExecutorEEEEE3$_8JEEEDTclscT_fp_spscT0_fp0_EEOSB_DpOSC_ + 24
    83  RealmSyncDemo                       0x0000000102ea3e2c _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZN8facebook5react16NativeToJsBridge18runOnExecutorQueueENS_8functionIFvPNS4_10JSExecutorEEEEE3$_8EEEvDpOT_ + 28
    84  RealmSyncDemo                       0x0000000102ea3e04 _ZNSt3__110__function12__alloc_funcIZN8facebook5react16NativeToJsBridge18runOnExecutorQueueENS_8functionIFvPNS3_10JSExecutorEEEEE3$_8NS_9allocatorISA_EEFvvEEclEv + 28
    85  RealmSyncDemo                       0x0000000102ea2764 _ZNSt3__110__function6__funcIZN8facebook5react16NativeToJsBridge18runOnExecutorQueueENS_8functionIFvPNS3_10JSExecutorEEEEE3$_8NS_9allocatorISA_EEFvvEEclEv + 28
    86  RealmSyncDemo                       0x0000000102f217e8 _ZNKSt3__110__function12__value_funcIFvvEEclEv + 60
    87  RealmSyncDemo                       0x0000000102f216f8 _ZNKSt3__18functionIFvvEEclEv + 24
    88  RealmSyncDemo                       0x0000000102ca8f70 _ZN8facebook5react17tryAndReturnErrorERKNSt3__18functionIFvvEEE + 24
    89  RealmSyncDemo                       0x0000000102cd64a8 _ZN8facebook5react16RCTMessageThread7tryFuncERKNSt3__18functionIFvvEEE + 36
    90  RealmSyncDemo                       0x0000000102cdc200 _ZZN8facebook5react16RCTMessageThread10runOnQueueEONSt3__18functionIFvvEEEENK3$_1clEv + 80
    91  RealmSyncDemo                       0x0000000102cdc190 _ZNSt3__1L8__invokeIRZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_1JEEEDTclscT_fp_spscT0_fp0_EEOSA_DpOSB_ + 24
    92  RealmSyncDemo                       0x0000000102cdc148 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_1EEEvDpOT_ + 28
    93  RealmSyncDemo                       0x0000000102cdc120 _ZNSt3__110__function12__alloc_funcIZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_1NS_9allocatorIS9_EES6_EclEv + 28
    94  RealmSyncDemo                       0x0000000102cdab84 _ZNSt3__110__function6__funcIZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_1NS_9allocatorIS9_EES6_EclEv + 28
    95  RealmSyncDemo                       0x0000000102f217e8 _ZNKSt3__110__function12__value_funcIFvvEEclEv + 60
    96  RealmSyncDemo                       0x0000000102f216f8 _ZNKSt3__18functionIFvvEEclEv + 24
    97  RealmSyncDemo                       0x0000000102cd6204 ___ZN8facebook5react16RCTMessageThread8runAsyncENSt3__18functionIFvvEEE_block_invoke + 48
    98  CoreFoundation                      0x0000000180361f94 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
    99  CoreFoundation                      0x0000000180361268 __CFRunLoopDoBlocks + 408
    100 CoreFoundation                      0x000000018035ba04 __CFRunLoopRun + 724
    101 CoreFoundation                      0x000000018035b218 CFRunLoopRunSpecific + 572
    102 RealmSyncDemo                       0x0000000102c7a8c8 +[RCTCxxBridge runRunLoop] + 764
    103 Foundation                          0x0000000180851578 __NSThread__start__ + 792
    104 libsystem_pthread.dylib             0x00000001cc0b16c8 _pthread_start + 116
    105 libsystem_pthread.dylib             0x00000001cc0ac910 thread_start + 8.]
    

    Can you reproduce the bug?

    Yes, always

    Reproduction Steps

    open App.tsx and either removing or adding path makes it run or crash.

    const RealmContext = createRealmContext({
    	schema: [],
    	// This line crashes the app with sync.
    	path: 'sync.realm',
    });
    

    Crash happens after realm.logIn()

    Version

    10.19.1

    What SDK flavour are you using?

    Atlas App Services (auth, functions, etc.)

    Are you using encryption?

    No, not using encryption

    Platform OS and version(s)

    iOS 15.5

    Build environment

    System: OS: macOS 12.4 CPU: (10) arm64 Apple M1 Pro Memory: 105.23 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 17.9.0 - ~/.volta/tools/image/node/17.9.0/bin/node Yarn: 1.22.18 - ~/.volta/tools/image/yarn/1.22.18/bin/yarn npm: 8.5.5 - ~/.volta/tools/image/node/17.9.0/bin/npm Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Android NDK: 23.0.7344513-beta4 IDEs: Android Studio: Chipmunk 2021.2.1 Patch 1 Chipmunk 2021.2.1 Patch 1 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 18.0.1 - /Users/username/.jenv/shims/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

    Cocoapods version

    1.11.3

    Reviewed by rogerkerse at 2022-06-20 06:57
  • 15. Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

    How frequently does the bug occur?

    All the time

    Description

    @kneth

    Hello guys!

    As the title above, I'm facing the error after installing realm-js:
    Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

    This error was caused because has more than one react native version in my project. After check yarn.lock, I see that @realm/[email protected]^0.3.1 has installed [email protected]>=0.59 => This is causes error

    Why @realm/[email protected]^0.3.1 does install it?

    And now, I can run my project until I remove the @realm/react package. (This means [email protected]>=0.59 has been removed)

    Pls, help me, How to resolve this case?

    Screen Shot 2022-06-19 at 11 47 21 PM Screen Shot 2022-06-19 at 11 49 13 PM

    Stacktrace & log output

    ERROR  TypeError: null is not an object (evaluating 'endpoint.startsWith')
     ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
          This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
     LOG  redux-persist/stateReconciler: rehydrated keys 'app, user, _persist'
     ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
          This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
    

    Can you reproduce the bug?

    Yes, always

    Reproduction Steps

    No response

    Version

    "realm": "^10.19.1"
    "@realm/react": "^0.3.1",
    

    What SDK flavour are you using?

    Local Database only

    Are you using encryption?

    No, not using encryption

    Platform OS and version(s)

    MacOS: 12.4 (21F79) 
    iPhone OS: 15.4.1
    

    Build environment

    System:
        OS: macOS 12.4
        CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
        Memory: 273.85 MB / 16.00 GB
        Shell: 5.8.1 - /bin/zsh
      Binaries:
        Node: 16.14.1 - ~/.nvm/versions/node/v16.14.1/bin/node
        Yarn: 1.18.0 - /usr/local/bin/yarn
        npm: 8.5.0 - ~/.nvm/versions/node/v16.14.1/bin/npm
        Watchman: 2022.03.21.00 - /usr/local/bin/watchman
      Managers:
        CocoaPods: 1.11.3 - /Users/mac/.rvm/gems/ruby-2.7.4/bin/pod
      SDKs:
        iOS SDK:
          Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
        Android SDK:
          API Levels: 23, 28, 29, 30, 31, 32
          Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 32.0.0
          System Images: android-27 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom_64, android-30 | Google Play Intel x86 Atom
          Android NDK: Not Found
      IDEs:
        Android Studio: 2020.3 AI-203.7717.56.2031.7935034
        Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
      Languages:
        Java: 11.0.11 - /usr/bin/javac
      npmPackages:
        @react-native-community/cli: Not Found
        react: 17.0.2 => 17.0.2 
        react-native: 0.67.2 => 0.67.2 
        react-native-macos: Not Found
      npmGlobalPackages:
        *react-native*: Not Found
    

    Cocoapods version

    CocoaPods: 1.11.3

    Reviewed by 000xuandu at 2022-06-19 17:30
  • 16. Implement polyfill for globalThis (v11)

    What, How & Why?

    See https://github.com/realm/realm-js/pull/4653, this fixes one additional usage in v11

    ☑️ ToDos

    • [x] 📝 Changelog entry
    • [ ] 📝 Compatibility label is updated or copied from previous entry
    • [ ] 🚦 Tests
    • [ ] 🔀 Executed flexible sync tests locally if modifying flexible sync
    • [ ] 📱 Check the React Native/other sample apps work if necessary
    • [ ] 📝 Public documentation PR created or is not necessary
    • [ ] 💥 Breaking label has been applied or is not necessary

    If this PR adds or changes public API's:

    • [ ] typescript definitions file is updated
    • [ ] jsdoc files updated
    • [ ] Chrome debug API is updated if API is available on React Native
    Reviewed by tomduncalf at 2022-06-16 14:46
🔄 A realtime Database for JavaScript Applications
🔄 A realtime Database for JavaScript Applications

Announcement              Version 10.0.0 is now released, read the ANNOUNCEMENT                RxDB A realtime Database for JavaScript Applications Rx

Jun 25, 2022
🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️
🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️

A reactive database framework Build powerful React and React Native apps that scale from hundreds to tens of thousands of records and remain fast ⚡️ W

Jun 25, 2022
A simple database base on react-native AsyncStorage.

react-native-store A simple database base on react-native AsyncStorage. Installation $ npm install react-native-store --save Upgrading from previous v

Dec 23, 2021
Android's Native key value storage system in React Native

React Native Shared Preferences Android's Native key value storage system in React Native Installation < RN 0.47 npm install react-native-shared-prefe

May 5, 2022
redis like key-value state management solution for React

jedisdb redis like key-value state management solution for React Reactive. Redux alternative. Simple and powerful global state management system, acce

Apr 28, 2022
MMKV - ⚡️ The fastest key/value storage for React Native. ~30x faster than AsyncStorage!
MMKV - ⚡️ The fastest key/value storage for React Native. ~30x faster than AsyncStorage!

MMKV is an efficient, small mobile key-value storage framework developed by WeChat. react-native-mmkv is a library that allows you to easily use MMKV inside your React Native applications. It provides fast and direct bindings to the native C++ library which are accessible through a simple JS API.

Jun 17, 2022
A simple, performance oriented key value storage for React Native. Drop in replacement for AsyncStorage

react-native-fast-storage react-native-fast-storage is a drop in replacement for AsyncStorage. This library is the React Native implementation of http

Jun 1, 2022
A demonstration of sqlite working on both React Native (expo-sqlite) and Web (absurd-sql).

expo-sqlite-plus-web Rough source code to get sqlite working on both React Native and Web with a single interface. Expo / React Native Uses expo-sqlit

May 16, 2022
Decentralized-Public-Key-Infrastructure - A decentralized Public Key Infrastructure using Truffle and React Bootstrap
Decentralized-Public-Key-Infrastructure - A decentralized Public Key Infrastructure using Truffle and React Bootstrap

Decentralized-Public-Key-Infrastructure A decentralized Public Key Infrastructur

Apr 2, 2022
A simple weather app built with React Native and Realm
A simple weather app built with React Native and Realm

React Weather A simple weather app built with React Native Inspiration I wanted to learn how to make apps using React Native. Instead of inventing an

Jun 20, 2022
Expo Template Realm React Native Starter Application

Simple Expo React Native application to quickly get started with Realm, based on the starter template that is provided by Realm

Jun 2, 2022
Trong ORM is a JavaScript library for building reactive SQLite queries for web, mobile and desktop

Trong ORM is a JavaScript library for building reactive SQLite queries for web, mobile and desktop

Jun 21, 2022
Create multiple stores with providers and get the store and dispatch hook for free with type safety!

React Store maker Create multiple stores with providers and get the store and dispatch hook for free with type safety! How to use it Install npm insta

Apr 20, 2022
This is a simple react project that Stores the books, When the user enter any book with the category will be updated in the API and you can get someof books from API based on the category. 📚

Book Store React ?? This is a simple react project that Stores the books, When the user enter any book with the category will be updated in the API an

May 31, 2022
A react hook which lets you automatically synchronize a value to a server with react-query

useReactQueryAutoSync A helpful react hook for building interfaces which require autosave. Read more about the motivation and design in the original b

Jun 2, 2022
A tiny library to enhance value with reactive wrapper.

value-enhancer A tiny library to enhance value with reactive wrapper. Install npm add value-enhancer Why The goal of this lib is to bring reactivity t

Apr 8, 2022
The CryptoVerse is a Cryptocurrency web application developed using Reactjs for providing the latest updates, value statistics, market cap, supply and news regarding the Cryptocurrency market.
The CryptoVerse is a Cryptocurrency web application developed using Reactjs for providing the latest updates, value statistics, market cap, supply and news regarding the Cryptocurrency market.

CryptoVerse - A Crptocurrency Web Application Getting Started with Create React App This project was bootstrapped with Create React App. Available Scr

Feb 17, 2022
Extension for vscode, which generates the value of a variable from a type definition
Extension for vscode, which generates the value of a variable from a type definition

Extension for vscode, which generates the value of a variable from a type definition

Feb 25, 2022
NewYork Times Top Stories app made with React Native with sqlite for Android - http://i.imgur.com/SU9B3TM.gifv
NewYork Times Top Stories app made with React Native with sqlite for Android - http://i.imgur.com/SU9B3TM.gifv

NewYork Times Top Stories - React Native NewYork Times news reader Android, made with React-Native. ##Features/components Uses React Native 0.25.1 wit

Feb 14, 2022
A react native android wrapper for SQLite

React Native Android Sqlite A react native android wrapper for SQLite Rationale React Native doesn't have a built-in module to access Sqlite databases

Dec 25, 2019