Scheme isn't visible after turning off dev mode


Following the migration guide I’ve set my app to development mode and ran the client.
The sync seems to be working. But Scheme on the dashboard shows nothing and presents a label " Allow access to your cluster data. Realm prevents access to your data by default. "

Hi @donut, could you please share a screen capture of the page in question?

If sync were enabled and in development turned on then I’d expect to see this banner:

Could you please show the “Sync” page?

Also, could you please include a link to the guide that you’re following?


I’ve turned development back on. See image.

The instructions I’m following:

To start with a clean slate (and figure out what’s gone wrong), I’d suggest trying this:

  • Uninstall the mobile app
  • Turn off sync (in the Realm UI)
  • Enable sync (in the Realm UI)
  • Install and run your app
  • Check for Realm logs (in the Realm UI)

Let us know what you see.

Another thing to check is whether the data that’s being synced is also showing up in your Atlas collections.

OK so there seems to be an error:

This error is showing that the partition of the object in the mobile app doesn’t match the partition key of the partition you’re trying to write to.

Your mobile app’s Object classes should not include the partition key – the SDK will automatically set it based on the partition that you opened your realm with.

Hmm, according to the doc, I should add the partition key to the object class:

Is that incorrect?

Hi @donut, that part of the documentation is out of date. I’ve flagged that to the owner that it needs to be updated.

OK… what about the _id part? should be there?

Looks like it got resolved now (with _id).

Going back to my earlier comments. It’s not an error to include the partition key in your Object class but if you include it then you need to ensure that you set it to the same value as the partition you opened the realm with.

OK, but according to the error you can see it mentions “_partitionKey” twice, so I’m not sure where the mismatch is.

It looks like you opened the partition with the partition value set to _partitionKey (i.e. objects that contain { partition: "_partitionKey" }) but you have an object containing { partition: "" } – or something similar.

OK, so:

  1. Is it indeed optional to add it to the object classes? any downside to it?
  2. It would be more helpful to understand where in the RealmUI the value of the variable name should be and where does its’ value should be.

It’s now optional to include the partition in your Object classes – I don’t see an upside in including it.

In the Realm UI, the partition field appears in the schema definition, and you specify it as the partitioning key when enabling sync.

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