Android BAD_CHANGESET(realm::sync::ProtocolError:212): Bad changeset (UPLOAD) Error

Hi, i am using MongoDB realm client SDK in android in java language. I followed github https://github.com/mongodb-university/realm-tutorial link for demo first. It was working fine. After that i created new project with some complex schema, then it shows following error:

E/REALM_JAVA: Session Error[wss://realm.mongodb.com/]: BAD_CHANGESET(realm::sync::ProtocolError:212): Bad changeset (UPLOAD)

Following is detail of json which i want to store in mongoDB collection and its schema:

Json:

{
  "assessmentId": "njjskdsk",
  "_partition": "snja",
  "answers": [
    {
      "question_id": "52fdff13-2dfc-4d6d-85b5-f9116ad30f6f2",
      "visible": true,
      "fieldValue": [
        {
          "option_id": "qwer",
          "textArea": "qwer",
          "subOptions": [
            "dgd",
            "fdgfd",
            "ffdg"
          ],
          "trial": 1
        }
      ]
    }
  ]
}

Schema:

      {
      "title": "AssessmentAnswer",
      "properties": {
        "_id": {
          "bsonType": "objectId"
        },
        "_partition": {
          "bsonType": "string"
        },
        "answers": {
          "bsonType": "array",
          "items": {
            "bsonType": "object",
            "properties": {
              "fieldValue": {
                "bsonType": "array",
                "items": {
                  "bsonType": "object",
                  "properties": {
                    "option_id": {
                      "bsonType": "string"
                    },
                    "subOptions": {
                      "bsonType": "array",
                      "items": {
                        "bsonType": "string"
                      }
                    },
                    "textArea": {
                      "bsonType": "string"
                    },
                    "trial": {
                      "bsonType": "int"
                    }
                  }
                }
              },
              "question_id": {
                "bsonType": "string"
              },
              "visible": {
                "bsonType": "bool"
              }
            }
          }
        },
        "assessmentId": {
          "bsonType": "string"
        }
      }
    }

And i am also using Data Models from Sync tab of Realm UI.
please help me with it, where i am wrong.

@Gouravdeep_Singh If you are changing around your schema on the client side and then attempting to reconnect later you will want to wipe your emulator state because there is local state that may cause this issue.

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