-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: None
Goals
Use functions like user.callFunction() and user.mongoClient() while debugging using Chrome.
Expected Results
User functions should work properly whether I am in debugging mode or not.
Actual Results
user.mongoClient is not a function.
Steps to Reproduce
- Create new React Native App.
- Create new Realm App as seen in the code sample below.
- Login using an existing user.
Code Sample
Creating Realm App:
import Realm from "realm"; // Realm App config. const APP_CONFIG = { id: '<my-app-id>' }; const realmApp = new Realm.App(APP_CONFIG); export default realmApp;
Login:
const user = await realmApp.logIn(Realm.Credentials.emailPassword('my-email', 'my-password')); console.log('mongoClient', typeof user.mongoClient);
Not in debugging mode, the console log prints "mongoClient function"
In debugging mode, the console log prints "mongoClient undefined"
Version of Realm and Tooling
- Realm JS SDK Version: 10.1.4
- Node or React Native: React Native 0.63.4
- Client OS & Version: macOS 11.2
- Which debugger for React Native: None/Chrome