Debug app with realm.js

#1

Goals

I want to debug Expo app with Realm

Expected Results

Debugger should work

Actual Results

debugger-ui:1 Failed to load http://192.168.1.253:8083/create_session: The 'Access-Control-Allow-Origin' header has a value 'http://localhost:8081' that is not equal to the supplied origin. Origin 'http://localhost:19001' is therefore not allowed access.
AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:12199 DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://192.168.1.253:8083/create_session'.
    at makeRequest (http://packager.h5-87c.tonkonozhenko.examplewithexpo.exp.direct/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:97187:18)
    at sendRequest (http://packager.h5-87c.tonkonozhenko.examplewithexpo.exp.direct/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:97225:20)
    at Object.createSession (http://packager.h5-87c.tonkonozhenko.examplewithexpo.exp.direct/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:97024:17)
    at http://packager.h5-87c.tonkonozhenko.examplewithexpo.exp.direct/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:96699:41
    at loadModuleImplementation (http://packager.h5-87c.tonkonozhenko.examplewithexpo.exp.direct/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:121:5)
    at guardedLoadModule (http://packager.h5-87c.tonkonozhenko.examplewithexpo.exp.direct/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:85:12)
    at _require (http://packager.h5-87c.tonkonozhenko.examplewithexpo.exp.direct/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:63:60)
    at http://packager.h5-87c.tonkonozhenko.examplewithexpo.exp.direct/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:96463:28
    at loadModuleImplementation (http://packager.h5-87c.tonkonozhenko.examplewithexpo.exp.direct/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:121:5)
    at guardedLoadModule (http://packager.h5-87c.tonkonozhenko.examplewithexpo.exp.direct/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:85:12)
reactConsoleErrorHandler @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:12199
(anonymous) @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:96706
loadModuleImplementation @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:121
guardedLoadModule @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:85
_require @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:63
(anonymous) @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:96463
loadModuleImplementation @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:121
guardedLoadModule @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:85
_require @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:63
(anonymous) @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:96311
loadModuleImplementation @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:121
guardedLoadModule @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:85
_require @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:63
(anonymous) @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:1289
loadModuleImplementation @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:121
guardedLoadModule @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:78
_require @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:63
(anonymous) @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:98788
executeApplicationScript @ debuggerWorker.js:40
(anonymous) @ debuggerWorker.js:65
AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:12191 Realm failed to connect to the embedded debug server inside the app. If attempting to use Chrome debugging from a device, ensure the device is reachable on the same network as this machine.
handleException @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:12191
handleError @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:15494
reportFatalError @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:697
guardedLoadModule @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:80
_require @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:63
(anonymous) @ AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:98788
executeApplicationScript @ debuggerWorker.js:40
(anonymous) @ debuggerWorker.js:65
AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:20102 Running application main ({
    initialProps =     {
        exp =         {
            appOwnership = standalone;
            initialUri = "xxx://xxx.tonkonozhenko.examplewithexpo.exp.direct:80";
            manifest =             {
                android =                 {
                    package = "com.tonkonozhenko.ex";
                };
                bundleUrl = "http://packager.xxx.tonkonozhenko.examplewithexpo.exp.direct:80/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles";
                debuggerHost = "packager.yyy.tonkonozhenko.examplewithexpo.exp.direct:80";
                description = "An empty new project";
                detach =                 {
                    androidExpoViewUrl = "https://s3.amazonaws.com/exp-exponent-view-code/android-v2.0.0-exp.0-sdk22.0.0-xxx.tar.gz";
                    iosExpoViewUrl = "https://s3.amazonaws.com/exp-exponent-view-code/ios-v2.0.4-sdk22.0.0-xxx.tar.gz";
                    scheme = xxx;
                };
                developer =                 {
                    projectRoot = "/Users/alex/projects/react-native-stuff/ExampleWithExpo";
                    tool = xde;
                };
                env =                 {
                };
                icon = "./assets/icon.png";
                iconUrl = "http://packager.xxx.tonkonozhenko.examplewithexpo.exp.direct:80/assets/./assets/icon.png";
                id = "@tonkonozhenko/ExampleWithExpo";
                ios =                 {
                    bundleIdentifier = "com.tonkonozhenko.ex";
                    publishBundlePath = "ios/examplewithexpo/Supporting/shell-app.bundle";
                    publishManifestPath = "ios/examplewithexpo/Supporting/shell-app-manifest.json";
                    supportsTablet = 1;
                };
                isDetached = 1;
                isVerified = 1;
                logUrl = "http://xxx.tonkonozhenko.examplewithexpo.exp.direct:80/logs";
                mainModuleName = "node_modules/expo/AppEntry";
                name = ExampleWithExpo;
                orientation = portrait;
                packagerOpts =                 {
                    dev = 1;
                    hostType = tunnel;
                    lanType = ip;
                    minify = 0;
                    strict = 0;
                    urlRandomness = "xxx";
                    urlType = exp;
                };
                primaryColor = "#cccccc";
                privacy = public;
                sdkVersion = "22.0.0";
                slug = ExampleWithExpo;
                splash =                 {
                    backgroundColor = "#ffffff";
                    image = "./assets/splash.png";
                    imageUrl = "http://packager.xxx.tonkonozhenko.examplewithexpo.exp.direct:80/assets/./assets/splash.png";
                    resizeMode = contain;
                };
                version = "1.0.0";
                xde = 1;
            };
            shell = 1;
        };
    };
    rootTag = 1;
})
AppEntry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=/Users/alex/projects/react-native-stuff/ExampleWithExpo/node_modules/expo/tools/hashAssetFiles:sourcemap:12191 Module AppRegistry is not a registered callable module (calling runApplication)

Steps to Reproduce

  • Create empty project
exp init
exp detach
yarn add realm
cd ios
pod install
  • Import realm in App.json
import Realm from 'realm'
  • Run app in xcode

Version of Realm and Tooling

0 Likes