2

I'm using mongodb stitch for backend with

Users can read all data, but only write their own data

template. Logging in with email/password is working. However when I tried to insert data, I'm getting this error:

StitchServiceError {message: "insert not permitted", name: "StitchServiceError", errorCode: 12, errorCodeName: "ArgumentsNotAllowed", stack: "StitchServiceError: insert not permitted↵    at St…tp://localhost:3000/static/js/0.chunk.js:18077:14"}
message: "insert not permitted"
name: "StitchServiceError"
errorCode: 12
errorCodeName: "ArgumentsNotAllowed"}

What is causing this error?

ibragimov
  • 121
  • 1
  • 9
  • How do you perform the insert operation ? Also, could you make sure that the insert operation is after you're authenticated ? – Wan B. Mar 23 '20 at 23:33

1 Answers1

0

In my case, I was receiving the error while trying to do an insert from within a Realm function. The function was being executed from the realm sdk.

I was able to fix this issue by adding/specifying the field name in the read/write rules within the specific realm app (auth is required)

oblivion02
  • 557
  • 5
  • 14