Skip to content
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

bug: pushing and popping views can unmount entering view when done quickly #29397

Open
3 tasks done
FabianTauriello opened this issue Apr 25, 2024 · 4 comments
Open
3 tasks done
Labels
package: react @ionic/react package type: bug a confirmed bug report

Comments

@FabianTauriello
Copy link

FabianTauriello commented Apr 25, 2024

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

On the iOS platform, the destination page/route seemingly doesn't render when I navigate quickly between two routes within a tab.

In the repo I have linked below, there is a landing page, and 3 tabs. After the tabs are displayed, I can press the 'go to detail' button on tab 2, navigate back by pressing the 'Back' button, then press the 'go to detail' button again, and the destination page occasionally doesn't render. Most of the time, the app works perfectly fine, and the destination page is rendered, but on occasion, the bug occurs, and the page doesn't render. To trigger the error, I think these steps have to be done very quickly (but they can be done by a human).

Tab 2 home/default page:
tab 2

What the destination page should look like when the 'go to detail' button is pressed:
success

What the destination page occasionally looks like when the bug occurs:
bug

Expected Behavior

The app should navigate to the destination page every time, rendering the correct content as seen here:
success

Steps to Reproduce

  1. Build and run the app (https://github.com/FabianTauriello/ionic-demo) on an iOS device or simulator
  2. Tap the 'go to tabs' button on the 'Landing' page
  3. Tap the Tab 2 button in the bottom tab bar.
  4. Tap the 'go to detail' button
  5. Tap the 'Back' button
  6. Tap the 'go to detail' button again
  7. Quickly repeat steps 5 and 6 until the issue occurs. Speed is important here, so these steps should be done quickly to trigger the bug.

Code Reproduction URL

https://github.com/FabianTauriello/ionic-demo

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 8.0.1

Capacitor:

Capacitor CLI : 6.0.0
@capacitor/android : not installed
@capacitor/core : 6.0.0
@capacitor/ios : 6.0.0

Utility:

cordova-res : 0.15.4
native-run : 2.0.1

System:

NodeJS : v18.18.2 (/usr/local/bin/node)
npm : 8.5.0
OS : macOS Unknown

Additional Information

  • I have only been able to replicate this issue on iOS so far, but it may occur on other platforms (web and Android).
  • The console doesn't display any errors when the page fails to render.
  • The example repo is using Ionic v8, but I've found that the issue exists for Ionic v7 as well
@ionitron-bot ionitron-bot bot added the triage label Apr 25, 2024
@FabianTauriello FabianTauriello changed the title bug: Ion Page doesn't occasionally render with quick navigation bug: Ion Page occasionally doesn't render with quick navigation Apr 25, 2024
@FabianTauriello FabianTauriello changed the title bug: Ion Page occasionally doesn't render with quick navigation bug: IonPage occasionally doesn't render with quick navigation Apr 25, 2024
@FabianTauriello FabianTauriello changed the title bug: IonPage occasionally doesn't render with quick navigation bug: IonPage occasionally doesn't render when navigating quickly Apr 25, 2024
@FabianTauriello
Copy link
Author

FabianTauriello commented May 1, 2024

I've noticed this issue occurs on Android and web as well.

Also, I think that the isssue is possibly linked to the page/component transitions, because if I set the 'animated' prop in an IonRouterOutlet to false, the issue seems to be fixed.

@thetaPC thetaPC changed the title bug: IonPage occasionally doesn't render when navigating quickly bug: pushing and popping views can unmount entering view when done quickly May 2, 2024
@thetaPC thetaPC added package: react @ionic/react package type: bug a confirmed bug report labels May 2, 2024
@ionitron-bot ionitron-bot bot removed triage labels May 2, 2024
@thetaPC thetaPC removed their assignment May 2, 2024
@thetaPC
Copy link
Contributor

thetaPC commented May 2, 2024

Thank you for submitting the issue! I was able to replicate it on my end.

@Fluffy-the-Destroyer
Copy link

I have also encountered this issue on web, when IonRouterOutlet has mode set to ios, by using the browser's forward button or my mouse thumb button to go forward before the animation for going back has finished. On continuing to navigate with the browser buttons, pages load correctly but there is no animation.

@tonye3003
Copy link

I'm also encountering this issue using @ionic/react 7.6.1 on iOS and web. I can get it to work properly when disabling animations in the IonRouterOutlet but this is an undesirable workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: react @ionic/react package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

4 participants