-
Notifications
You must be signed in to change notification settings - Fork 28.5k
[go_router]Popped Route Reappears When Pressing Browser Back Button #164969
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
Labels
found in release: 3.29
Found to occur in 3.29
found in release: 3.30
Found to occur in 3.30
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
p: go_router
The go_router package
P2
Important issues not at the top of the work list
package
flutter/packages repository. See also p: labels.
platform-web
Web applications specifically
team-go_router
Owned by Go Router team
triaged-go_router
Triaged by Go Router team
Comments
Reproducible on latest stable and the master channel, After popping the route it is still present in the browser history and can be navigated by pressing the browser back button looks similar to #154759 flutter doctor -v[!] Flutter (Channel stable, 3.29.1, on macOS 15.1.1 24B2091 darwin-arm64, locale en-US) [947ms]
• Flutter version 3.29.1 on channel stable at /Users/mahesh/Development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 09de023485 (11 days ago), 2025-02-28 13:44:05 -0800
• Engine revision 871f65ac1b
• Dart version 3.7.0
• DevTools version 2.42.2
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and
upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [3.1s]
• Android SDK at /Users/mahesh/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• ANDROID_HOME = /Users/mahesh/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.5+-12932927-b750.29)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0) [1,620ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [143ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.3) [142ms]
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)
[✓] IntelliJ IDEA Community Edition (version 2021.2.1) [141ms]
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 61.2.4
• Dart plugin version 212.5080.8
[✓] VS Code (version 1.96.2) [22ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.102.0
[✓] Connected device (4 available) [6.9s]
• sdk gphone16k arm64 (mobile) • emulator-5554 • android-arm64 • Android 15 (API 35) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 15.1.1 24B2091 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.1.1 24B2091 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.265
[✓] Network resources [777ms]
• All expected network resources are available.
! Doctor found issues in 1 category.
|
Please can you help with any workaround or updates on this @chunhtai |
@uttamkh @maheshj01 @chunhtai |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
found in release: 3.29
Found to occur in 3.29
found in release: 3.30
Found to occur in 3.30
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
p: go_router
The go_router package
P2
Important issues not at the top of the work list
package
flutter/packages repository. See also p: labels.
platform-web
Web applications specifically
team-go_router
Owned by Go Router team
triaged-go_router
Triaged by Go Router team
What package does this bug report belong to?
go_router
What target platforms are you seeing this bug on?
Web
Have you already upgraded your packages?
Yes
Dependency versions
pubspec.lock
Steps to reproduce
Expected results
After popping a route with context.pop(), pressing the browser back button should navigate to the previous page in the browser history (Home in this case), not restore the popped page (screen3).
Actual results
Even though the popped route (screen3) was removed from go_router's stack, pressing the browser's back button still navigates back to it. This indicates that go_router and the browser's history stack are out of sync.
Code sample
Code sample
Screenshots or Videos
Screen.Recording.2025-03-11.at.6.01.27.PM.mov
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: