question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng CLI 1.5.5: ERROR Error: Uncaught (in promise): EmptyError: no elements in sequence

See original GitHub issue

Versions

Angular CLI: 1.5.5
Node: 9.2.0
OS: darwin x64
Angular: 5.0.5

Repro steps

Difficult to reproduce. I guess this is more a question of how to track the bug.

I have an Angular 5 app, which I upgraded from using the CLI from 1.5.0 to 1.5.4. In these versions the bug does not happen.

But with CLI 1.5.5 I do see the bug, when started with the CLI or bundled in a Web-Archive (.WAR file) deployed in an OSGi container.

Observed behavior

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 EmptyObservable._subscribe (EmptyObservable.js:83)
    at EmptyObservable.Observable._trySubscribe (Observable.js:172)
    at EmptyObservable.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 EmptyObservable._subscribe (EmptyObservable.js:83)
    at EmptyObservable.Observable._trySubscribe (Observable.js:172)
    at EmptyObservable.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)

In Chrome Dev Tools, I pause on caught exceptions. Still, I have difficulty in idetifying the cause.

Desired behavior

This happens right in the login page. The page does not change to the first page that is authenticated. I also commented the guard which is used to secure the routes. The error still shows up.

Mention any other details that might be useful (optional)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:19
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

37reactions
nawnitramancommented, Dec 2, 2017

The suggested fix of downgrading “rxjs” to “5.5.2” didn’t worked for me, but the workaround (adding pathMatch: ‘full’) suggested by @fabiogodoy resolved my issue. { path: ‘’, component: HomeComponent, pathMatch: ‘full’ }, { path: ‘about’, component: AboutComponent, pathMatch: ‘full’ }

23reactions
austinthedevelopercommented, Dec 3, 2017

@nawnitraman when you downgraded rxjs, did you remove node_modules and re-install? I just changed “^5.5.2” to “5.5.2” and the error went away.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EmptyError: no elements in sequence - angular - Stack Overflow
I am unsure why but for me this error was caused by CanActivate router guards using observables. Moving to promises fixed the issue...
Read more >
Uncaught (in promise): EmptyError: no elements in sequence
In this article we'll see how to fix the `Error: Uncaught (in promise): EmptyError: no elements in sequence` error caused by the Angular...
Read more >
Angular 5 - EmptyError: no elements in sequence
I ended up with the following error message when I tried to navigate using the Angular Router: EmptyError: no elements in sequence.
Read more >
[Solved]-Angular 6, EmptyError: no elements in sequence
Coding example for the question Angular 6, EmptyError: no elements in sequence - bad interceptor probably-rx.js.
Read more >
Angular问题速查宝典- 杨晓风-linda的博客
问题描述 ERROR Error: Uncaught (in promise): Error: Template parse errors:Can't bind to 'treeURL' since ... 《Angular之EmptyError:no elements in sequence》.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found