title: IllegalArgumentException: Navigation action/destination packagename/action_xxx cannot be found from the current destination
body: <p>I am having an issue with the Android Navigation Architecture component when I try to navigate from one Fragment to another within a viewpager, I get this error:</p>
  <pre><code>java.lang.IllegalArgumentException: Navigation action/destination 
  com.gigaweb.mysales:id/action_mainFragment_to_addTransactionFragment cannot be found from the current 
  destination Destination(com.gigaweb.mysales:id/pagerFragment) label=fragment_pager class=com.gigaweb.mysales.PagerFragment
  </code></pre>
  <p>I have a viewpager which I use to navigate between two Fragments and it works just fine. the problem is that I have a button within one of the fragments, the button is also used to navigate to another Fragment using navcontroller, and when the button is clicked the app crashes and I get the error above.</p>
  <p><a href="https://i.stack.imgur.com/FVpHB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FVpHB.png" alt="Below is the screenshot of the error" /></a></p>
  <p><strong>Update</strong> This is the navGraph</p>
  <p>As you can see the SignIn Fragment is the start Destination and there is an action liking it to the pagerFragment which serves as the host for the ViewPager</p>
  <p>the way I want the app to work is:</p>
  <ol>
  <li><p>When the app launches The signIn Fragment is shown ..... working</p>
  </li>
  <li><p>Navigate to PagerFragment when SignIn Button is clicked ..... working</p>
  </li>
  <li><p>Navigate between MainFragment and AdminFragment by swiping left or right ..... working</p>
  </li>
  <li><p>Navigate to AddTransactionFragment whin the FAB Button is clicked ..... <strong>NOT WORKING!!</strong> as the button is clicked the app crashes.</p>
  </li>
  </ol>
  <p><strong>Update</strong> Here is the XML code for the Navigation Graph</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;navigation xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
  xmlns:tools=&quot;http://schemas.android.com/tools&quot;
  android:id=&quot;@+id/nav_graph&quot;
  app:startDestination=&quot;@id/signInFragment&quot;&gt;
  
  &lt;fragment
      android:id=&quot;@+id/signInFragment&quot;
      android:name=&quot;com.gigaweb.mysales.SignInFragment&quot;
      android:label=&quot;fragment_sign_in&quot;
      tools:layout=&quot;@layout/fragment_sign_in&quot; &gt;
      &lt;action
          android:id=&quot;@+id/action_signInFragment_to_pagerFragment&quot;
          app:destination=&quot;@id/pagerFragment&quot; /&gt;
  &lt;/fragment&gt;
  &lt;fragment
      android:id=&quot;@+id/addTransactionFragment&quot;
      android:name=&quot;com.gigaweb.mysales.AddTransactionFragment&quot;
      android:label=&quot;AddTransactionFragment&quot; &gt;
      &lt;action
          android:id=&quot;@+id/action_addTransactionFragment_to_mainFragment&quot;
          app:destination=&quot;@id/mainFragment&quot; /&gt;
  &lt;/fragment&gt;
  &lt;fragment
      android:id=&quot;@+id/mainFragment&quot;
      android:name=&quot;com.gigaweb.mysales.MainFragment&quot;
      android:label=&quot;MainFragment&quot; &gt;
      &lt;action
          android:id=&quot;@+id/action_mainFragment_to_addTransactionFragment&quot;
          app:destination=&quot;@id/addTransactionFragment&quot; /&gt;
  &lt;/fragment&gt;
  &lt;fragment
      android:id=&quot;@+id/adminFragment&quot;
      android:name=&quot;com.gigaweb.mysales.AdminFragment&quot;
      android:label=&quot;AdminFragment&quot; /&gt;
  &lt;fragment
      android:id=&quot;@+id/pagerFragment&quot;
      android:name=&quot;com.gigaweb.mysales.PagerFragment&quot;
      android:label=&quot;fragment_pager&quot;
      tools:layout=&quot;@layout/fragment_pager&quot; /&gt;
  &lt;/navigation&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/zFhQP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zFhQP.png" alt="enter image description here" /></a></p>