Exception thrown while executing UI block: *** Collection <__NSSetM: 0x600000ff5820> was mutated while being enumerated.

See original GitHub issue

Description

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 :

Capture d’écran 2022-06-06 à 17 10 01

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:closed
  • Created a year ago
  • Reactions:9
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
yonitoucommented, Sep 15, 2022

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.

3reactions
hkar19commented, Aug 2, 2022

there is rewriting on the way: #3332

dunno when this will be merged

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange error appearing in React Native: Collection NSSetM ...
Sometimes it works, sometimes it can throw an error: Collections <_NSSetM was mutated while being enumerated. I am using expo 44.0.0.
Read more >
iOS : React Native: Exception thrown while executing UI block
iOS : React Native: Exception thrown while executing UI block [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] iOS ...
Read more >
rnmapbox/Lobby - Gitter
@mherrerabarraza Yes, it's possible although you should provide the routing ... app crashes ( Exception thrown while executing UI block: *** -[__NSArrayM ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found