-
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
Android: Setting recoil state yields "ownKeys target is non-extensible but trap result keys differ from target keys" on v12 #6361
Comments
Thanks for reporting the issue and providing source-code to help us reproduce it! Are you explicitly mentioning Android, because this doesn't occur on iOS or is it simply because that's the only platform you've tested on? If the latter is the case, I'd like to update the title to be more precise - for example:
|
Thank you for your quick response, this appears to only occur on Android, strangely iOS is working fine :) |
Just to be sure, are you testing with Hermes enabled on both iOS and Android? |
Yep, Hermes is enabled on both podfile: gradle.properties: Also, if it helps: |
Might be related to facebook/hermes#1063 |
It would be great if you could create an issue with the recoil repository too, I suspect it is their |
Unfortunately there has been no reply from the Recoil repo guys. The package has not been updated in almost a year and allegedly the lead dev has been let go by Meta. As a result we are in the process of switching from using Recoil to another method (useContext). Not sure where this leaves this bug as technically it is still a problem, but not one that looks like it will be solved soon if it is indeed the Recoil side causing these issues. Using useContext we do not face this issue. |
@mattlewer Thank you for getting back to us. I am happy to hear that you have found an alternative solution. I agree, it is unlikely that the issue will be fixed. I will leave the issue open for other users to find it in case they run into the same situation - and can learn from your solution. |
Closing this as there's nothing obvious left for us to do here. |
How frequently does the bug occur?
Always
Description
TypeError: ownKeys target is non-extensible but trap result keys differ from target keys
I am receiving this error when attempting to store a Realm object into Recoil state.
This has been working well however after upgrading to anything >12.0.0, this occurs. Within the breaking changes there is mention of a related change:
Is there somewhere we can view how to handle these breaking changes as I'm at a bit of a loss?
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
'../interfaces/models/Session':
How I am using the Recoil State:
Getting the session:
Setting the session to recoil:
The error then occurs when I obtain the session from the DB and try to set the state of recoil to this.
Version
12.0.0, 12.5.0
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Android
Build environment
No response
Cocoapods version
No response
The text was updated successfully, but these errors were encountered: