Search code examples
iosreactjsreact-nativenavigation

Suddenly not getting any back animations (React Native, React-Navigation)


SOLVED (JULY 27 2022)

I finally solved this myself. I was using use_frameworks! in my Podfile. This was needed for one of the libraries I was using (React Native Firebase 15.x.x). I deleted the use_frameworks! line and downgraded to Firebase 14.x.x which works without. This fixed everything. I'm on RN 0.69.2 and Hermes enabled.


I had a perfectly functioning react-native app. I made some changes and was about to release to production. Right before I do I think, I'll update to react 0.69.1. I started getting a BatchedBundler error where the app wouldn't start in release mode. I spent days trying to fix this, and eventually fixed it by disabling Hermes. No problem, can downgrade the app.

The app now (regardless of wether or not it's Hermes enabled, debug or release, simulator or device), doesn't have back animations. I'm using react-navigation, and createNativeStackNavigator.

If I enable headersShown: true and then use the native back button that appears, I get a regular animation. Otherwise animations look like this: https://user-images.githubusercontent.com/21344181/179496474-6fa6c511-49ea-443e-9be7-33a027597716.MP4

I have tried everything at this point, I've downgraded, restored an old version from git. I've deleted the project and started a new Xcode project and still this animation bug persists.

I have no idea what to even do anymore, I've been developing this app for nearly 2 years and this bug seems to have elevated itself above the code, above the cache, above everything. I've cleared cache and deleted node_modules, pods everything you can possibly clear. I've init'd a new react native project copied over the src and then reinstalled all the node modules and pod install but still, same issue. I'm not expecting anyone to know how to fix this at this point, but any advice on how to even begin debugging this would be a huge help. I can't create a repro which sadly makes it so hard to get help.

I can only find one instance where this has ever been a problem for anyone else: https://github.com/software-mansion/react-native-screens/issues/1356 and it was resolved with an update.

Please help.


Solution

  • I finally solved this myself. I was using use_frameworks! in my Podfile. This was needed for one of the libraries I was using (React Native Firebase 15.x.x). I deleted the use_frameworks! line and downgraded to Firebase 14.x.x which works without. This fixed everything. I'm on RN 0.69.2 and Hermes enabled.