-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InteractionManager.runAfterInteractions not running at all! (In Production/Release builds) #8606
Comments
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. |
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
Also, since I'm not entirely sure if this issue is caused by react-navigation, I have opened an issue at react-native as well. facebook/react-native#29421 |
Since I configure each of my animations to not block the |
Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on snack.expo.io. If it's not possible to repro it on snack.expo.io, then please provide the repro in a GitHub repository. |
@satya164 It's difficult providing an example snack since this issue only happens on production/release builds.... |
Closing this since I'm almost certain this is an issue from react-navigation-shared-element. |
Added failed gesture state to clear interaction manager queue **Motivation** My team ran into an issue on IOS where the user taps somewhere on the left edge of the screen without any swipe, and upon releasing their finger, the InteractionManager has one outstanding task in the queue. And this task can block user interactions wrapped into `InteractionManager.runAfterInteractions` It could be related with #8606 but i'm not sure **Test plan** 1. Create a stack with two screen with an ability to navigate by swipe 2. Navigate from screen (1) to screen (2) 3. Tap somewhere in the left edge of the screen 4. After that all actions wrapped into `InteractionManager.runAfterInteractions` will not work --------- Co-authored-by: viktoriltimirov <viktor.iltimirov@sbermarket.ru> Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com>
Current Behavior
I am using a lot of
InteractionManager.runAfterInteractions(() => ...)
calls throughout my project.For example, I have a feed of multiple posts in my HomeScreen (Tab Navigator) and each post has
useEffect
anduseFocusEffect
hooks which callInteractionManager.runAfterInteractions
inside the hook to schedule loading extra post data after some animations have completed. "Some animations" = mostly navigation transitions from react-navigation, but since the post items specifically are inside a Tab Navigator, no navigation transitions/animations are run so this should fire almost immediately.In development/debug build everything works fine, but once I build for production/release, the extra post data never gets loaded, a test
Alert.alert(...)
I've put in there never gets shown, and my animations will never start, causing my app to be fully stuck.I have added a
GlobalErrorHandler
callback to my entry point (App.tsx
):but this doesn't get called either.
Unfortunately, since this only happens on production/release builds, I'm having a hard time debugging this. I will happily provide any extra information needed.
Extra Details
NavigationContainer
, and inside of it, I conditionally render theLoginStackNavigator
or theHomeStackNavigator
depending if the user is logged in or not.enableScreens()
function at the top of my entry point (App.tsx
):App.tsx
):loadFont()
at the top of my entry point (App.tsx
):Right now, the InteractionManager does not call the callback function at all, causing my app to be "broken". Data is never getting loaded, delayed animations are not getting started, etc.
Expected Behavior
The InteractionManager should call the callback after animations have finished. (Which, on a Tab navigator, should be instantly.)
InteractionManager.runAfterInteraction
callbacks inside myuseEffect
hooks are being called.InteractionManager.runAfterInteraction
callbacks inside myuseEffect
hooks are not being called, the text for the post is not being loaded (which is inside anInteractionManager.runAfterInteraction
callback), and weirdly the react-native-vector-icons are not being displayed. no idea why that's the case, since that has nothing to do with anInteractionManager.runAfterInteraction
callback.How to reproduce
react-navigation
for navigation, create NavigationContainer, in my case a Stack Navigator containing a Tab Navigator (Home) and a "Post Details Screen".InteractionManager.runAfterInteractions(() => ...)
callbacks in your components (e.g.useEffect()
hook)Your Environment
The text was updated successfully, but these errors were encountered: