title: Realms/MongoDB user.functions or user.callFunction is not a function
body: <p>I'm trying to call a MongoDB Realm function from client side, as explained <a href="https://docs.mongodb.com/realm/sdk/react-native/examples/call-a-function/#std-label-react-native-call-a-function" rel="nofollow noreferrer">here</a>.</p>
  <p>So, with a connected user on my react native application I'm trying to call:</p>
  <pre><code>user.functions.myFunction(arg1, arg2)
  </code></pre>
  <p>or</p>
  <pre><code>user.callfunction(&quot;myFunction&quot;, [arg1, arg2])
  </code></pre>
  <p>But neither of them work, I'm getting: <em><strong>user.functions or user.callFunction is not a function</strong></em></p>
  <p>This is my user object<a href="https://i.stack.imgur.com/1O3Hl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1O3Hl.png" alt="user object" /></a></p>
  <p>The <a href="https://docs.mongodb.com/realm-sdks/js/latest/Realm.User.html#functions" rel="nofollow noreferrer">User Class</a></p>
  <p>And I found this <a href="https://github.com/realm/realm-js/issues/3566" rel="nofollow noreferrer">issue</a>, but I guess it is not related to my case.</p>
  <p>[EDIT]</p>
  <p>So yes the problem is the same as the above Github issue.</p>
  <p>You cannot use some functions while in debugging mode.</p>