IjzerenHein / react-native-shared-element

Native shared element transition "primitives" for react-native 💫
MIT License
2.21k stars 97 forks source link

Android: Error while updating property 'endNode' of a view managed by: RNSharedElementTransition #30

Closed mrousavy closed 3 years ago

mrousavy commented 4 years ago

I got the following error on Android:

android error screenshot

The error was thrown after I played around a little bit, so it only appears sometimes. Don't know an exact way on how to reproduce this..

In my project I have a lot of navigation and animation going on, including many shared elements, this doesn't seem to be the cause for this issue though, as it also happened after I stripped my code down to a minimum just so I can test it.

package.json

"react-native": "0.62.2",
"react-native-shared-element": "^0.7.0",
"react-navigation-shared-element": "^5.0.0-alpha1",
"@react-navigation/native": "^5.1.6",
"@react-navigation/stack": "^5.2.13",
"@react-navigation/bottom-tabs": "^5.2.7",

I'm not sure if this is react-native-shared-element or react-navigation-shared-element related...

suretarget commented 4 years ago

Yes, it happens randomly. I like the library but cannot use it right now😢

IjzerenHein commented 4 years ago

Can you share the minimum code that reproduces it?

mrousavy commented 4 years ago

Sorry for not responding! I didn't get a notification from this thread.. 🤔 The error is gone for now, I'll try to create a minimal example in your test app though - I'll send a PR when I got it reproduced! 👍

borstessi commented 3 years ago

I get the same error sometimes on Android. Using Android API 29, React-Navigation 5 and Expo. It might be simulator bug, because it only happens when i dont do much in simulator and then come back testing later.

Hard to reproduce due to randomness.

kdo1234 commented 3 years ago

I have the same issue on Android 30. Wrapping each SharedElement and each child of the SharedElement with a <View collapsable={false}> seemed to resolve the issue in the debug apk, but not in the release apk. I thought the issue might be related to the new detachInactiveScreens logic in React Navigation and react-native-screens, so I tried with detachInactiveScreens={false} and detachInactiveScreens={false} as well as calling enableScreens() from react-native-screens. This didn't resolve the issue. I also tried versions of React Navigation and react-native-screens from before detachInactiveScreens was introduced and that didn't resolve the issue.

Latest versions used: "@react-navigation/bottom-tabs": "5.11.2", "@react-navigation/compat": "5.3.10", "@react-navigation/material-top-tabs": "5.3.10", "@react-navigation/native": "5.8.10", "@react-navigation/stack": "5.12.8", "react-native-tab-view": "2.15.2", "react-native-screens": "2.16.1", "react-native-shared-element": "0.7.0", "react-navigation-shared-element": "5.0.0-alpha1",

Versions from from detachInactiveScreens was introduced: "@react-navigation/bottom-tabs": "5.11.2", "@react-navigation/compat": "5.3.10", "@react-navigation/material-top-tabs": "5.3.10", "@react-navigation/native": "5.8.10", "@react-navigation/stack": "5.10.0", "react-native-tab-view": "2.15.2", "react-native-screens": "2.13.0", "react-native-shared-element": "0.7.0", "react-navigation-shared-element": "5.0.0-alpha1",

mdrajibsk8 commented 3 years ago

Did anyone find any solution?

mdrajibsk8 commented 3 years ago

is this project dead?

mdrajibsk8 commented 3 years ago

it worked when I use yarn to install these package. 🤣🤣

monikamateeva commented 3 years ago

Hi, I have the same issue on Android, although I have upgraded to the latest versions. This is my package.json:

"@react-native-community/masked-view": "0.1.10",
"@react-navigation/native": "^5.8.10",
"@react-navigation/stack": "^5.12.8",
"expo": "^41.0.0",
"expo-status-bar": "~1.0.4",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
"react-native-animatable": "^1.3.3",
"react-native-gesture-handler": "~1.10.2",
"react-native-reanimated": "~2.1.0",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.0.0",
"react-native-shared-element": "0.7.0",
"react-native-web": "~0.13.12",
"react-navigation-shared-element": "^5.0.0-alpha1"
mrousavy commented 3 years ago

I believe that was a reanimated error.

niraj-khatiwada commented 3 years ago

Getting the same error but happens randomly. Setting collapsible={false} didnt solve the issue.

factorycreacom commented 2 years ago

I had the same problem and solved it as follows.

if you used flatlist

NOT WORK:

const RenderItem = (item,index) => {
return <View><Text>{item}</Text></View>;
}
<FlatList
...
renderItem={(item,index) => <RenderItem item={item} index={index} />} />

WORK:

const RenderItem = (item,index) => {
return <View><Text>{item}</Text></View>;
}
<FlatList
...
renderItem={(item,index) => RenderItem(index,item)} />