AppServices functions problem when calling from iOS sdk


I have a function which works fine when running via AppServices page.
But when accessing from my iOS app it failed. I got : {“message”:“ObjectId in must be a single string of 12 bytes or a string of 24 hex characters”,“name”:“Error”}

It fails here:

const team = await teamsCollection.findOne({"_id": BSON.ObjectId(teamId)});

I log teamId which is “6126dca2a3973c43f39e0174”.
Do you have an idea?

I found the cause. I have to convert my ObjectID to stringValue (from Swift side) when calling function

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.