Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observable.timer(0, 0, animationFrame).take(n) throws "executing cancelled action" errors #2625

Closed
benlesh opened this issue May 29, 2017 · 3 comments
Assignees
Labels
bug Confirmed bug

Comments

@benlesh
Copy link
Member

benlesh commented May 29, 2017

RxJS version: 5.4.0

Code to reproduce:
http://jsbin.com/senabobafi/1/edit?js,console

Rx.Observable.timer(0, 0, Rx.Scheduler.animationFrame)
  .take(100)
  .subscribe(x => console.log(x));

Expected behavior:
No errors should be thrown, and animation scheduled loop should stop.

Actual behavior:
After the take completes the observable, the animation actions keep getting scheduled, and they throw an error repeatedly.

Additional information:
Workarounds:

Rx.Observable.interval(0, Rx.Scheduler.animationFrame)
  .take(100)
  .subscribe(x => console.log(x));
Rx.Observable.range(0, Number.POSITIVE_INFINITY, Rx.Scheduler.animationFrame)
  .take(100)
  .subscribe(x => console.log(x));
@kwonoj
Copy link
Member

kwonoj commented May 29, 2017

This seems similar case to #2594, we have some odds for handling tasks in scheduler.

@kwonoj
Copy link
Member

kwonoj commented Jun 29, 2017

closing via #2638.

@kwonoj kwonoj closed this as completed Jun 29, 2017
@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

3 participants