0

I'm trying to call a MongoDB Realm function from client side, as explained here.

So, with a connected user on my react native application I'm trying to call:

user.functions.myFunction(arg1, arg2)

or

user.callfunction("myFunction", [arg1, arg2])

But neither of them work, I'm getting: user.functions or user.callFunction is not a function

This is my user objectuser object

The User Class

And I found this issue, but I guess it is not related to my case.

[EDIT]

So yes the problem is the same as the above Github issue.

You cannot use some functions while in debugging mode.

XplosiVe06
  • 568
  • 3
  • 23
  • There could be a lot of reasons this isn't working, and I am not sure there's enough code in the question to determine if it's a coding issue. For example this `user.functions.myFunction(arg1, arg2)` wont work. You have to await the response `const result = await user.functions.myFunction(arg1, arg2);`. Also, is your Realm App in the console linked to an Atlas data source? – Jay Apr 30 '21 at 17:55
  • Thanks for your answer. Please see my edit on my post, everything is working when debugging mode is disabled. https://github.com/realm/realm-js/issues/3566 The main problem is that these functions are not available at all when debugging is enabled. But yes I'm calling it in an async function with await. Sorry if my english is not completely understandable. – XplosiVe06 May 01 '21 at 10:34

0 Answers0