-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
Cannot add new property '__reanimatedHostObjectRef' #66
Comments
Interesting. I'll try |
Are there any examples that can be replicated? |
Hi? Look forward to solving your problem, but I need an example. |
If there is Demo, I will reopen it. |
i have same issue with reaniamted@2.3.0-beta4 |
Are there any examples that can be replicated? |
I'm sorry. It doesn't seem to have anything to do with the reanimated version. It seems to happen in a specific layout situation, so I'm looking for the cause |
In my opinion, this problem seems to occur when a specific type of object is included in the data array. For example, if you put [1,2,3] in data, no error occurs. |
I found the cause. This error occurs when JSX is included in the item object of data. |
I used a very bad solution but can fix this for now and wait for later releases:
|
Can you give me a repo to reproduce? I've tried many times and I still can't reproduce your problem. |
@dohooo I am currently struggling with this error as well but I wasn't able to reproduce it outside my app. I have large array of objects where are other objects and arrays nested in each other but I am not quite sure if it is causing an error. When I am passing this object from my component props (data is fetched from api) to Carousel then I am getting an error but if I stringify it copy from console and put it instead then everything works fine (that's why baronha solution works). |
Show me a copy of your real data? it can be fake. |
@dohooo Here it is
|
@c0nsoleg I may find the problem. Can you try it with me? Discord is here. |
I don't think I can fix it any time soon because I really can't reproduce it. If someone can provide me with a stable repo, I'll try again, but I think I'll put it on hold... I'll pin this issue |
Hm, I seldomly saw the same issue, but I did not have the time to investigate yet. Since the crash is in the native part of reanimated2, it could also be a ra2 bug? Also for me it only happend on android. |
I also think it might be a bug in RA2 |
It seems that the reason is that the value we passed in was modified? We cut the association by “parser”. But how do we know what has been modified |
Thanks for the awesome library! However, I am having the same issue with data coming from API (Redux) :( |
@Saad-Bashar use it |
react-native-reanimated@2.4.0 was released. Did it fix this issue? Can anyone tell me about it |
No, I'm sorry, the issue is still the same. The Issue is still the same, but is now in line 38 instead of 28, probably due to code changes in reanimated. |
That's an important clue. Maybe it's showing that it's not Carousel? |
Hm, I am not 100% sure. Either that, or it is somehow used in an unsupported way. I have now an setup where I can directly reproduce this on Android, I'll investigate asap. |
The issue happens like following: When you assign data to the Carousel (in the data Props) and bind the exact same objects to another View. When you create a deep-copy before sending it to the native Module, e.g. by using
it will not crash anymore. So apparently the RN Module Bridge does (maybe freeze?) the Object and therefore ruins it for Reanimated2. My conclusion is, that this is a Reanimated2 issue, since it should check the Object's State and handle it properly, if the Object is e.g. frozen (or whatever it is, I did not dig into the bridge yet). |
Cool!The first thanks for your efforts! |
software-mansion/react-native-reanimated#1517 (comment) I made the repo |
We figured out that Do you think this will work? |
Wow, An interesting solutions. But I did't to try it, Dit you try it with above question? This does seem to have something to do with Redux, Can you reproduce the problem and test it? |
We use |
Cool, Submit a PR and I'll release a beta version later and then ask everyone to give it a try |
Try this!~ 🍺 yarn add react-native-reanimated-carousel@2.3.3-beta.1 |
It looks fine, I have released the official version, 2.3.3. |
Faced with this issue in v3.1.1 |
When I pass the data returned from the API I get an error:
Cannot add new property '__reanimatedHostObjectRef'
The text was updated successfully, but these errors were encountered: