Hi
I am trying out realm-tutorial/rn at main · mongodb-university/realm-tutorial · GitHub to see how realm sdk for react native works. There is no issue to do: npm run android. However if I use vscode to do debug with the app, I got some error:
ReferenceError: createSession is not defined
The whole debug output:
OS: win32 x64
Adapter node: v12.8.1 x64
vscode-chrome-debug-core: 6.8.8
Starting debugger app worker.
Established a connection with the Proxy (Packager) to the React Native application
Debugger worker loaded runtime on port 23489
Require cycle: node_modules\realm\lib\browser\util.js → node_modules\realm\lib\browser\rpc.js → node_modules\realm\lib\browser\util.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
ReferenceError: createSession is not defined
Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
I searched createSession in the whole project, I found:
in index.bundle file (under .vscode/.react directory):
rpc.registerTypeConverter(_constants.objectTypes.SESSION, createSession);
Realm[_constants.keys.id] = rpc.createSession(refreshAccessTokenCallback, debugHosts[i] + ‘:’ + debugPort);
in index.map file (under .vscode/.react directory):
“createRealm”,“USER”,“createUser”,“SESSION”,“createSession”,
So it seems createSession should be defined, but current sdk realm@10.0.0-beta.9 does not have it.
Can someone from realm js team provide some insight how to bypass this issue?
Thanks,
J.H.