I’m using Realm for the first time for a React Native (created via react-native init) project, and I’m a bit confused as to why new Realm.App({ id: appId }) produces an empty object {} despite passing in the correct appId.
I’ve installed Realm via yarn add realm@10.0.0-beta.9
If anyone has encountered this problem or has any advice, I’d definitely appreciate any suggestions. Thank you!
It looks like object has enumerable or hidden members?
Printing out the object after JSON.stringify-ing it results in an empty object, but I can call app.logIn() just fine. The user object app.logIn() produces is also empty {}, but logging user.id prints out a UUID string, so I’m not quite sure why printing the user object would show an empty object {}. Attempting to print the object’s keys and enumerable properties results in empty arrays, as well. Is this intended behavior?
Also, with regards to the app initialization – the typescript definitions seem like they don’t accept a “timeout” or “app” parameter, but including them doesn’t throw any errors or change any behavior from initial testing, so I’m not sure whether they’re required or not for React Native.
Hopefully these help others who are experiencing similar issues!
Im experiencing the same issue - can access the property but the objects seems empty.
Seems like mongoDB return the object with all properties non-enumerable.
Did you find a way to fix that ?