Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
I have a bottom nav bar integration set up based onhttps://developer.android.com/develop/ui/compose/navigation#bottom-nav and I'm trying to clear saved states of individual tabs when logging out via https://issuetracker.google.com/issues/303194381 . Each tab has its own child graph and I'm passing the child graph's route as a parameter to
navController.clearBackStack()
as suggested e.g. inclearBackStack()
. When I callclearBackStack()
for the first tab while in the second tab, it crashes withjava.lang.IllegalStateException: Restore State failed
. It only crashes if there was some other entry in the back stack before navigating from the first tab to the second tab. If there was no such entry, it doesn't crash.Component used:
Version used:
Devices/Android versions reproduced on:
Sample project to trigger the issue:
Steps to reproduce:
Stack trace: