question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Router.pop throwing Exception

See original GitHub issue

When I call router.pop within a few milliseconds of pushing a child, An exception is thrown with the following Message: "Configuration stack can not be empty"

Am I doing something wrong, but if I call router.pop say after a delay of 200ms, it works as expected

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
arkivanovcommented, Apr 28, 2021

But if you disable the delay and bring model.errorOccured?.let{/******/} out of lauched Effect

Making side effects directly from @Composable functions is incorrect, the function may be executed multiple times in a row, and so you will pop multiple times as well. You should produce side effects from things like LaunchedEffect, DisposableEffect, click actions, etc.

1reaction
Shabindercommented, Apr 28, 2021

Rookie Mistake I guess, Sorry for all the inconvenience. Closing it now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error thrown on navigator pop until : "!_debugLocked': is not ...
I found that it will intermittently throwing asserting error on the debugLocked ... This will garantee that everything is ok before routing.
Read more >
No GoRouter found in context and other exceptions ... - GitHub
No GoRouter found in context . Only thing that seems to kind of work is appRouter.navigator?.pop(), and that requires 2 attempts after the...
Read more >
How to Solve Error Thrown On Navigator Pop? - Flutter Agency
When popping a screen navigating to another one by clicking on the showBottomSheet it started throwing an error. So, let's solve Error ......
Read more >
Router tutorial: tour of heroes - Angular
Any other URL causes the router to throw an error and crash the app. Add a wildcard route to intercept invalid URLs and...
Read more >
Create a nested navigation flow - Flutter documentation
You might notice that the Navigator.pop() is invoked by both the Leave and Stay buttons. ... throw Exception('Unknown route: ${settings.name}');.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found