Skip to content

RouteAware didPushNext is not called when pushing two routes at once #189050

Closed

Description

@emakar

Steps to reproduce

issue #55949 is closed, but the workaround is fragile and generally neither expected, nor universally applicable

please consider fixing it


navigator
  ..push(a)
  ..push(b);

Expected results

RouteAware receives didPushNext

Actual results

RouteAware does not didPushNext

Code sample

Code sample

see github.com//issues/55949

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.44.5, on macOS 26.4 25E246 darwin-arm64, locale en) [547ms]
    • Flutter version 3.44.5 on channel stable at /Users/yauhen/fvm/versions/3.44.5
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f94f4fc76b (15 hours ago), 2026-07-06 11:19:24 -0700
    • Engine revision 83675ed276
    • Dart version 3.12.2
    • DevTools version 2.57.0
    • Pub download mirror https://pub.dev
    • Feature flags: enable-web, no-enable-linux-desktop, no-enable-macos-desktop, no-enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, no-enable-swift-package-manager, omit-legacy-version-file,
      enable-lldb-debugging, enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [1,858ms]
    • Android SDK at /Users/yauhen/Library/Android/sdk/
    • Emulator version 36.4.9.0 (build_id 14788078) (CL:N/A)
    • Platform android-36.1, build-tools 36.1.0
    • ANDROID_HOME = /Users/yauhen/Library/Android/sdk/
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.10+-117844308-b1163.108)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.2) [1,795ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17C52
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [4ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (2 available) [6.8s]
    • Android SDK built for arm64 (mobile) • emulator-5554 • android-arm64  • Android 15 (API 35) (emulator)
    • Chrome (web)                         • chrome        • web-javascript • Google Chrome 149.0.7827.201

[✓] Network resources [682ms]
    • All expected network resources are available.

• No issues found!

Activity

  1. Mairramer commented on Jul 7, 2026

    @Mairramer
    Contributor

    @emakar Do you have a small example that reproduces the issue?

    I tested it on my end and it worked as expected. I'm using the master branch, though, so that may be a factor.

    Edit:
    I was able to reproduce it on my end, and I think I know where the problem is.

  2. added
    framework
    f: routes
    has reproducible steps
    team-framework
    on Jul 7, 2026
  3. mbcorona commented on Jul 7, 2026

    @mbcorona
    Member

    Hi @emakar , thanks for the report.
    Related to #70272 — same root cause: didPushNext isn't firing when a route gets covered synchronously before its RouteAware subscription completes, just via a different repro path.

    @Mairramer, thanks for reproducing the issue and raising a PR #189057

  4. changed the title [-][copy] RouteAware didPushNext is not called when pushing two routes at once[/-] [+]RouteAware didPushNext is not called when pushing two routes at once[/+] on Jul 7, 2026
  5. added
    P2
    triaged-framework
    on Jul 7, 2026
  6. added a commit that references this issue on Nov 19, 2026
    ed20d2e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2f: routesframeworkhas reproducible stepsteam-frameworktriaged-frameworkwaiting for PR to land (fixed)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions