You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @janicduplessis ,
I am having another issue with Animated library when useNativeDriver=true.
Randomly when I mount the component it will throw an error "Attempting to disconnect view that has not been connected with the given animated node"
The component has styles that are are controller through Animated.event (onScroll).
once I change useNativeDriver=false it will never happen again.
Was wondering if this could be related to #11317 or #11809 ?
This is happening only on Android (tested on RN 0.42.0 and 0.41.2)
The text was updated successfully, but these errors were encountered:
It looks like your description is missing some necessary information. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.
I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!
I see the same Attempting to disconnect view that has not been connected with the given animated node error. For me it happens when a parent component has a Animated.Value passed to child components, which is driven by a native scroll event.
Where the children consume this scrollPosition with interpolation.
And even though there are actually multiple consumers of this animated value, only one seems to cause the before mentioned error.
Something like this (contrived example):
constBlock=(props)=>{consttranslateY=props.scrollPosition.interpolate({inputRange: [offset,offset+100],outputRange: [0,-100],extrapolate: 'clamp',});return(<View><Headingstyle={{transform: [{ translateY }]}}/><Content>
// ...
</Content></View>);}constBlocks=(props)=>{// Removing the animated scale from the image actually prevents the error from happening.constscaleStyle={transform: [{scale: props.scrollPosition.interpolate({inputRange: [-100,0],outputRange: [2,1],extrapolateRight: 'clamp',}),}],};return(<View><Animated.Imagestyle={scaleStyle}/><AnimatedListView{...props}renderRow={rowData=><BlockscrollPosition={props.scrollPosition}block={rowData}/>}// .../></View>));constPage=()=>(<BlocksonScroll={Animated.event([{nativeEvent: {contentOffset: {y: this.state.scrollPosition}}}],{useNativeDriver: true},)}scrollPosition={this.state.scrollPosition}// .../>);
Also when I take out the component that causes the error, and a second Page component appears on top of the previous one (a screen from react navigation in my case), and later this second Page component is removed, all attached animated components in the previous Page component below do no longer respond to the scroll event.
facebook
locked as resolved and limited conversation to collaborators
May 24, 2018
Hi @janicduplessis ,
I am having another issue with Animated library when useNativeDriver=true.
Randomly when I mount the component it will throw an error "Attempting to disconnect view that has not been connected with the given animated node"
The component has styles that are are controller through Animated.event (onScroll).
once I change useNativeDriver=false it will never happen again.
Was wondering if this could be related to #11317 or #11809 ?
This is happening only on Android (tested on RN 0.42.0 and 0.41.2)
The text was updated successfully, but these errors were encountered: