Skip to content

BSON JSON is case sensitive #7037

@ravikirankhareedi

Description

@ravikirankhareedi

How frequently does the bug occur?

Always

Description

I created a realm object in Swift using 10.54.5. Trying to read in Realm JS using the latest version 12.8.0.
But the get the below error:
BSONTypeError: UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".

Further analyzing, I figured out the UUID which has CAPITAL LETTERS in the hex string fails on Realm JS. I hope it to be streamlined across languages.

Stacktrace & log output

Can you reproduce the bug?

Always

Reproduction Steps

As mentioned above. Use Swift Realm to create a DB which has UUID field with caps in the hex string. Example: 285C4789-9AAD-7A82-81C9-CB32966B5DA5. Try reading it on Realm JS. You get the error:

BSONTypeError: UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".

The same can be seen on Realm Studio as well. Attaching the screenshot:

Image

Version

12.8.0 - Realm JS

What services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

Mac

Build environment

Which debugger for React Native: ..

Cocoapods version

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions