Open lunxinfeng opened 5 months ago
@lunxinfeng Can you provide a runnable reproducible code sample that shows the stuck behavior as compared to the one wherein it worked before ?
@lunxinfeng Can you provide a runnable reproducible code sample that shows the stuck behavior as compared to the one wherein it worked before ?
https://github.com/lunxinfeng/flutter_test_
@darshankawar this is a demo, I found that:
Thanks!
Thanks for the update. Using the repro provided, I observed that it goes to next page but while tapping on return, it doesn't perform any action. Keeping the issue open and labeling for team's input / attention.
canPop is not update either. I can not break this while loop. 13.2.5 worked. https://github.com/cuong0993/go_router_test/blob/main/lib/on_exit_example.dart#L91
This is a serious issue that just caused a hard-to-catch bug in our app.
It can lead to infinity pop()
which will just crash your app to a black screen.
In our case we're doing the following for some bottom sheets to pop all following routes until the route is the current bottom sheet:
Navigator.of(context).popUntil((_) {
return ModalRoute.of(context)!.isCurrent;
});
but then ModalRoute.of(context)!.isCurrent
will always return false until the app crashes to the black screen.
We're stuck on version 13.2.2
because of this now.
@chunhtai Can you increase the priority of this issue?
I use the popUtil extension Stuck on go_router 14.1.0, but it fine on go_router 13 and before.
By log , I found
routerDelegate.currentConfiguration.matches.last.matchedLocation
has no immediate change after pop()。