javascriptionic-frameworkappendchildangular10

ionic 5 angular 10 Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'appendChild')


ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'appendChild')
TypeError: Cannot read properties of undefined (reading 'appendChild')
    at StackController.transition (ionic-angular.js:2714:1)
    at ionic-angular.js:2611:1
    at StackController.<anonymous> (ionic-angular.js:2735:1)
    at Generator.next (<anonymous>)
    at fulfilled (tslib.es6.js:71:42)
    at ZoneDelegate.invoke (zone-evergreen.js:364:1)
    at Zone.run (zone-evergreen.js:123:1)
    at zone-evergreen.js:857:1
    at ZoneDelegate.invokeTask (zone-evergreen.js:399:1)
    at Zone.runTask (zone-evergreen.js:167:1)
    at resolvePromise (zone-evergreen.js:798:1)
    at resolvePromise (zone-evergreen.js:750:1)
    at zone-evergreen.js:860:1
    at ZoneDelegate.invokeTask (zone-evergreen.js:399:1)
    at Object.onInvokeTask (core.js:27425:1)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398:1)
    at Zone.runTask (zone-evergreen.js:167:1)
    at drainMicroTaskQueue (zone-evergreen.js:569:1)
    at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:484:1)
    at invokeTask (zone-evergreen.js:1621:1)

I have had this problem for several days. I have read that it is something about navigation, something about how the routes are declared, but I cannot find a concrete solution. I have tried several alternatives but none of them have been successful.

The error occurs, when I navigate between tabs, only there, and it does not affect the flow of the program… for the moment.

It is worth clarifying that I am not using Jquery.

Does anyone have knowledge of this error?

Did someone pass him?

Remember => ionic v5 Angular v10.

I think that with that information is fine, if you need more, let me know. Thank you very much!!!


Solution

  • so, after much research, what was breaking my program was that inside the <ion-split-pane> tag was an <ion-router-outlet> tag. The split-pane uses the router (ion-router-outlet) for various functions (official documentation - a bit sparse - ionicframework.com/docs/v5/api/split-pane ) and what I had to solve was change that tag ion-router-outlet to ion-nav, and all my problems were fixed. Obviously, inside that component of used ion-split-pane, not in global component. Very Thanks!