-
Notifications
You must be signed in to change notification settings - Fork 582
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
ObjectID Inconsistency on read #3622
Comments
Please note: This only happens when debugging on chrome. Without a debugger, everything is working as expected. |
Thanks for the detailed bug-report, we'll have to investigate further. |
Is there any planned date for the fix to be made? It blocks debugging React Native apps if you use ObjectIds from Realm. We have a workaround, however it seems quite important for developing RN apps with Realm. |
If you are debugging on iOS, you can use Safari Dev Tools to connect to your device's JS engine. |
Is there any progress on this issue? I just stumbled upon this myself and I am wondering how to debug my RN app when accessing an |
@xbaun We have looked into it, but unfortunately it is not a trivial fix. Our current efforts are focused on getting Flipper to work with realm. |
@takameyer Ok thanks. I tried to debug RN with Safari (as described in the linked article), but the source tab of Safari does not load source maps... But this is another problem I think. |
@xbaun Me and others also had this problem. This seems to be a problem with the current version of Safari. It should work with the Safari Technology Preview. |
@takameyer thanks for the hint 👍 I will try the tech preview. |
We have decided to close this as we do not plan to provide further support for the chrome debugger. |
@takameyer Debugging with Safari works for me now, but the result is the same as with Chrome (see image below). Under Safari, should the |
@xbaun It seems you still have the "debugger" enabled. In Safari you can debug without actually activating However, I have just attempted this as well in a sample app and it appears Safari also has trouble accessing Realm data. I have made a separate issue for this, which we will continue to investigate #3880 |
I'd also like to add an amendment to the closing of this issue. Realm works by extending the core functionality of the JSC engine. Unfortunately, this makes the Chrome debugger nearly impossible to use, since it is interpreting the JavaScript through the Chrome browser JavaScript engine, which does not contain Realm. A workaround was implemented, which has been nearly acceptable, but has been a burden to maintain. Therefore we are going to put effort into supporting alternative debugging experiences. You can follow our progress on supporting Flipper (which requires us to support Hermes) in this PR #3792 In the meantime, we recommend using Safari debugging. To view the contents of your Realm object using the |
After a macOS update and reboot, the Technical Preview and default Safari now show sources directly in the JSContext window without I now have the same error as you described above but the application does'nt break anymore when accessing the ObjectId. |
Goals
When reading objects, the ObjectId type is not an instance of ObjectId.
Expected Results
When reading an object with object ids, the property should be an instance of ObjectID
Actual Results
The property is in the following format:
["$oid", "603f6df28095c5cd1410d0f8"]
(an array of strings)
Steps to Reproduce
Given the following schema:
Creating an user like this:
When reading the users like this:
The "_id" property isn't a ObjectId, but an array of strings.
Code Sample
See above
Version of Realm and Tooling
The text was updated successfully, but these errors were encountered: