Skip to content
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

[Android] java.lang.IllegalStateException: Cannot transition entry that is not in the back stack #28809

Open
jonathanantoine opened this issue Apr 4, 2025 · 0 comments
Labels
t/bug Something isn't working

Comments

@jonathanantoine
Copy link

Description

I have a lot of crashes reported on my .net 9 Android app in firebase with this stacktrace :

Fatal Exception: java.lang.IllegalStateException: Cannot transition entry that is not in the back stack
  at androidx.navigation.NavController$NavControllerNavigatorState.prepareForTransition(NavController.kt:382)
  at androidx.navigation.fragment.FragmentNavigator$onAttach$2.onBackStackChangeStarted(FragmentNavigator.kt:182)
  at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2182)
  at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2115)
  at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2052)
  at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:703)
  at android.os.Handler.handleCallback(Handler.java:958)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loopOnce(Looper.java:230)
  at android.os.Looper.loop(Looper.java:319)
  at android.app.ActivityThread.main(ActivityThread.java:8919)
  at java.lang.reflect.Method.invoke(Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

Does not seems related to a given Android version and always when the app is in foreground :

Image

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI, Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11 and higher

Did you find any workaround?

No response

Relevant log output

@jonathanantoine jonathanantoine added the t/bug Something isn't working label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant