Can't write object storage

I’m attempting to write to the storage, but consistently encounter the following error:
“rpc error: code = Internal desc = Error writing storage objects.”

Here’s the code I’ve been using:

{
  "objects": [
    {
      "collection": "P",
      "key": "p2",
      "value": "{\n \"address\":  \"1\"\n}",
      "permissionRead": 1,
      "permissionWrite": 0
    }
  ]
}

However, when I append version:"*" to the code, the write operation succeeds. Yet, this introduces a new problem. When I try to read from the database, the server throws the following error:
“Could not read storage objects.”,“error”:“cannot convert [p] to Text”

Any insights on resolving this would be much appreciated.

1 Like

Hello @headria,

Could you please share which version of the server you’re using?

It would also help if you could provide your custom RPC code.

I changed the database from CockroachDB to PostgreSQL, and the problem was solved

I see, I believe this is an issue related to a bug in CRDB, make sure you’re using the latest CRDB version and it should resolve itself, we’ve recently upgraded the version in the docker-compose files on master to address it.