title: Navigation Architecture Component - Unable to navigate to fragment from onResume
body: <p>I'm testing this new library out and want to navigate to a login fragment if the user isn't signed in. This check is done in in a base fragment like:</p>
  
  <pre><code>abstract class SignedInFragment : Fragment() {
  
  override fun onResume() {
      super.onResume()
      if (FirebaseAuth.getInstance().currentUser == null) {
          NavHostFragment.findNavController(this /* Fragment */)
                  .navigate(R.id.action_login)
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>But this just ends up in a RuntimeException saying FragmentManager is already executing transactions:</p>
  
  <pre><code>    java.lang.RuntimeException: Unable to resume activity {me.hammarstrom.loco/me.hammarstrom.loco.MainActivity}: java.lang.IllegalStateException: FragmentManager is already executing transactions
      at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3645)
      at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3685)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2898)
      at android.app.ActivityThread.-wrap11(Unknown Source:0)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
      at android.os.Handler.dispatchMessage(Handler.java:105)
      at android.os.Looper.loop(Looper.java:164)
      at android.app.ActivityThread.main(ActivityThread.java:6541)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
  </code></pre>
  
  <p>The navigation graph looks as following:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;navigation xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  app:startDestination="@id/mainFragment"&gt;
  
  &lt;fragment
      android:id="@+id/loginFragment"
      android:name="me.hammarstrom.loco.ui.login.LoginFragment"
      android:label="LoginFragment" &gt;
      &lt;action
          android:id="@+id/action_loginFragment_to_signedInFragment"
          app:destination="@id/signedInFragment"  /&gt;
  &lt;/fragment&gt;
  &lt;fragment
      android:id="@+id/signedInFragment"
      android:name="me.hammarstrom.loco.ui.common.SignedInFragment"
      android:label="SignedInFragment" /&gt;
  &lt;fragment
      android:id="@+id/mainFragment"
      android:name="me.hammarstrom.loco.ui.main.MainFragment"
      android:label="MainFragment" /&gt;
  &lt;action
      android:id="@+id/action_login"
      app:destination="@id/loginFragment" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Should this kind of navigation be done in some other way? Am I missing something?</p>