Okay
  Public Ticket #1390313
V 3.0 throws error on content layout routes
Open

Comments

  • Michael started the conversation

    If you click content-layout on the starter kit - all the content-layout routes throw the following error:

    core.js:1350 ERROR Error: Uncaught (in promise): EmptyError: no elements in sequence
    EmptyError: no elements in sequence
        at new EmptyError (EmptyError.js:28)
        at FirstSubscriber._complete (first.js:154)
        at FirstSubscriber.Subscriber.complete (Subscriber.js:122)
        at MergeMapSubscriber._complete (mergeMap.js:150)
        at MergeMapSubscriber.Subscriber.complete (Subscriber.js:122)
        at MapSubscriber.Subscriber._complete (Subscriber.js:140)
        at MapSubscriber.Subscriber.complete (Subscriber.js:122)
        at ArrayObservable._subscribe (ArrayObservable.js:124)
        at ArrayObservable.Observable._trySubscribe (Observable.js:172)
        at ArrayObservable.Observable.subscribe (Observable.js:160)
        at new EmptyError (EmptyError.js:28)
        at FirstSubscriber._complete (first.js:154)
        at FirstSubscriber.Subscriber.complete (Subscriber.js:122)
        at MergeMapSubscriber._complete (mergeMap.js:150)
        at MergeMapSubscriber.Subscriber.complete (Subscriber.js:122)
        at MapSubscriber.Subscriber._complete (Subscriber.js:140)
        at MapSubscriber.Subscriber.complete (Subscriber.js:122)
        at ArrayObservable._subscribe (ArrayObservable.js:124)
        at ArrayObservable.Observable._trySubscribe (Observable.js:172)
        at ArrayObservable.Observable.subscribe (Observable.js:160)
        at resolvePromise (zone.js:824)
        at resolvePromise (zone.js:795)
        at eval (zone.js:873)
        at ZoneDelegate.invokeTask (zone.js:425)
        at Object.onInvokeTask (core.js:4621)
        at ZoneDelegate.invokeTask (zone.js:424)
        at Zone.runTask (zone.js:192)
        at drainMicroTaskQueue (zone.js:602)
        at ZoneTask.invokeTask [as invoke] (zone.js:503)
        at invokeTask (zone.js:1540)

  • Michael replied

    During further testing it looks like in app-routing.module.ts if you have both Full routes and Content routes - it will error (you can escape and restart service to see it).  It works if its only one or the other content or full layout.

    So it looks like it's not the layout component itself but something in the way the routes are declared in app routing.

  •  30
    Andrew replied

    Hello Michael,

    We have checked starter-kit at our end for this issue. But it is working fine at our end. So i am not sure whether you have updated any npm package or made any other changes in starter kit or not at your end. 

    But i have found workaround of this error for you which is to add  pathMatch: 'full' in your routes. Please check below link. May be it will help you.

    https://github.com/angular/angular-cli/issues/8724

    Let me know if you get any issue.

    Cheers~

  • Michael replied

    Ok so it looks like that might be the bug since a fresh npm install adds rxjs 5.5.3.  You should change the package.json to peg to 5.5.2 rather than ^5.5.2.


    You'll be able to reproduce this issue if you do a fresh npm install of the node_modules directory.

    I tried adding pathMatch full to the routes but that didn't fix it - so the only workaround is to downgrade to the previous version of rxjs.

  •  30
    Andrew replied

    Hello Michael,

    Based on your suggestion, we have identified the issue at our end as well. We will fix it in next release.

    Thank you for getting in touch.