Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1050

User functions are not present if in debugging mode in React Native.

      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

      1. Create new React Native App.
      2. Create new Realm App as seen in the code sample below.
      3. 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

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: