realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.68k stars 562 forks source link

RangeError: number is not integral, js engine: hermes (Vague) #6748

Open Blankeos opened 2 weeks ago

Blankeos commented 2 weeks ago

Adding to the discussion from an old issue here because that previous issue was already closed. Hope it helps someone else too. Encountered this issue while at work: https://github.com/realm/realm-js/issues/6190

My problem wasn't actually even related to the double or int column on my schema.

It was actually "date".

Mainly because I was doing: createdAt: { type: "date", default: "" }

I know this is just some one-off mistake that I'll be able to keep in mind in the future. But I kinda wish there was some clearer error message to say that the culprit was the "createdAt" column.

I noticed this vague error message happens to a lot of the fields in Realm which makes development kind of a pain.

sync-by-unito[bot] commented 2 weeks ago

➤ PM Bot commented:

Jira ticket: RJS-2842

kraenhansen commented 2 weeks ago

@Blankeos are you able to share a list of the exact steps that I need to take to reproduce this? Without it, it's super hard for us to take action towards improving this 🙏