title: System.err: Error: Calling startGoBack while going back. using Natiescript
body: <p>I have a problem in my routing code in app Nativescript.</p>
  
  <p>I have this:</p>
  
  <pre><code>const routes: Routes = [
    {
      path: 'home',
      component: HomeComponent,
      canActivate: [AuthGuard],
      children: [
        {path: 'fp', component: FirstPageComponent},
        {path: 'setting', component: SettingsComponent}]},
    {
      path: 'test',
      component: TestComponent,
      children: [
        { path: 'login', component: LoginFirstComponent },
        { path: 'login1', component: LoginComponent },
      ]},
    { path: '', redirectTo: '/home/fp', pathMatch: 'full' }
  ];
  </code></pre>
  
  <p>I routing in first: <code>home/fp</code> > <code>home/setting</code> > <code>test/login</code>
  Click back in mobile
  and in this part back navigate in <code>test/login</code> > <code>home/setting</code> > and in end show this error:</p>
  
  <blockquote>
    <p>System.err: com.tns.NativeScriptException: System.err: Calling js
    method run failed System.err: System.err: Error: Calling startGoBack
    while going back. System.err: File:
    "file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js,
    line: 1, column: 948849 System.err: System.err: StackTrace:
    System.err:     Frame: function:'c',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 963843 System.err:     Frame:
    function:'t._beginBackPageNavigation',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 515811 System.err:     Frame: function:'',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 662072 System.err:     Frame: function:'e.invoke',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 953424 System.err:     Frame:
    function:'t.runGuarded',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 948778 System.err:     Frame: function:'',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 948390 System.err:     Frame: function:'e.notify',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 558758 System.err:     Frame:
    function:'t.onNavigatedFrom',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 1022304 System.err:     Frame:
    function:'t.raiseCurrentPageNavigatedEvents',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 1077896 System.err:     Frame:
    function:'t._updateBackstack',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 1077351 System.err:     Frame:
    function:'t.setCurrent',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 521360 System.err:     Frame: function:'',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 1298088 System.err:     Frame:
    function:'e.invokeTask',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 954109 System.err:     Frame: function:'t.runTask',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 949275 System.err:     Frame:
    function:'t.invokeTask',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 955223 System.err:     Frame:
    function:'o.useG.invoke',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 955121 System.err:     Frame:
    function:'r.args.(anonymous function)',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 966636 System.err:     Frame: function:'',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 1170073 System.err:     Frame: function:'e.invoke',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 953424 System.err:     Frame:
    function:'t.runGuarded',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 948778 System.err:     Frame: function:'',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 948390 System.err:     Frame: function:'run',
    file:'file:///data/data/org.nativescript.SecuritySystemMobile/files/app/vendor.js',
    line: 1, column: 1170132 System.err: System.err:     at
    com.tns.Runtime.callJSMethodNative(Native Method) System.err:     at
    com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116)
    System.err:     at com.tns.Runtime.callJSMethodImpl(Runtime.java:996)
    System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:983)
    System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:967)
    System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:959)
    System.err:     at
    com.tns.gen.java.lang.Runnable.run(Runnable.java:15) System.err:<br>
    at android.os.Handler.handleCallback(Handler.java:754) System.err:<br>
    at android.os.Handler.dispatchMessage(Handler.java:95) System.err:<br>
    at android.os.Looper.loop(Looper.java:163) System.err:     at
    android.app.ActivityThread.main(ActivityThread.java:6228) System.err: 
    at java.lang.reflect.Method.invoke(Native Method) System.err:     at
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
    System.err:     at
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/uxH5w.png" rel="nofollow noreferrer">Image</a></p>
  
  <p>Have you any idea please, how to solution this error?</p>