Exception thrown while executing UI block: *** Collection <__NSSetM: 0x600000ff5820> was mutated while being enumerated.
See original GitHub issueDescription
Hey
I’m experiencing the weirdest error ever => I’m using Modal component from “react-native” and my app didn’t have any issues. I started to use Layout transitions exiting and entering yesterday. Since then, everytime I’m dismissing a modal, I’m having this error and I can’t find out what it is :
It’s driving me crazy and I can’t have any more debugs logs to help me out. I really hope you can find a solution because my app is in production and I’m completely stuck
And last but not least => It’s happening randomly 🗡️, sometimes the modal will dismiss properly like 25 times in a row and at some point => error
Expected behavior
Nothing should happen
Actual behavior & steps to reproduce
An error is thrown.
Snack or minimal code example
Init a project with expo SDK 45 Install react native reanimated 2.8.0 Implement a simple Modal :
<View style={{flex: 1}} style={[styles.backdrop, modalVisible ? StyleSheet.absoluteFill : null]}>
<Modal animationType="slide" transparent visible={modalVisible} onRequestClose={onCloseClick} >
<Button onPress={onCloseClick} />
</View>
–>
Package versions
| name | version | | react-native-reanimated | 2.8.0 | | expo | 45 |
Affected platforms
- Android
- [ X] iOS
- Web
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:13 (2 by maintainers)
Top Related StackOverflow Question
Hey, I know the layout animations are being rewritten atm. But do you have any approximative ETA to give us ? It’s quite huge since I can’t use layout animations anywhere in my apps.
there is rewriting on the way: #3332
dunno when this will be merged