-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception while trying to access objects with RealmUUID property (Sentry ID: f5a9ed08e6334fbbb47c3e70320db3fa) #1649
Comments
➤ PM Bot commented: Jira ticket: RSTUDIO-536 |
I haven't been able to reproduce it. To generate a Realm file with UUID and embedded objects, I have used the following script: const Realm = require("realm");
const BSON = require("bson");
const Parent = {
name: "Parent",
primaryKey: "key",
properties: {
key: "uuid",
child: "Child",
},
};
const Child = {
name: "Child",
embedded: true,
properties: {
key: "uuid",
value: "string",
},
};
let realm = new Realm({ schema: [Parent, Child] });
realm.write(() => {
realm.create("Parent", { key: new BSON.UUID(), child: { key: new BSON.UUID(), value: "hello world" } } );
});
realm.close(); File was created using Realm JS v12.6.0. I can open the file with Realm Studio v15.0.1 (prompts me to upgrade), and I can access the embedded object. Can you share either a Realm file or sample Kotlin code to reproduce it? |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
Hi @kneth . Thanks for getting back on this and apologies for the delayed response I was able to create a minimal reproducible sample. This happens specifically for UUID v1. We do not generate UUID v1 now on our API, but some of the old data in our system were generated using UUID v1. I don't see this error for the latest data in the system that has unique IDs generated using UUID v4 You can find the reproducible sample on Github here and the realm file here |
I'm seeing this issue with UUIDv7. My object is not embedded. For me the bug also only started occuring after migrating from v23 to v24. So possibly it happens for all UUIDv1 and UUIDv7 ids on v24. Here's the basics of my code, in Kotlin
|
Describe the bug
Receiving this error
BSONTypeError: UUID string representations must be a 32 or 36 character hex string
in multiple scenariosFew things to note:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Versions:
Additional context
Stacktrace:
The text was updated successfully, but these errors were encountered: