software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.88k stars 1.3k forks source link

Fix crash when current activity is null #6022

Closed maciekstosio closed 4 months ago

maciekstosio commented 4 months ago

Summary

Should fix: #5892. We do not check if the current activity is null and it seems that it randomly can be null. It seems like ongoing issue on react native side: https://github.com/facebook/react-native/issues/37518, https://github.com/facebook/react-native/issues/18345. The useAnimatedKeyboard hook won't work when the app when current activity is null, but it should not crash the app anymore. Our assumption is that most of the libs handle it this way (#5892), so it must be some corner case when most functionality won't work - that's why we don't try to recover from this state.