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.

Uncaught (in promise) FlickingError: Animation is already playing.

See original GitHub issue

Description

Currently seeing this error when clicking either flicking.prev(); or flicking.next(); a lot and quickly from the browser.

Uncaught (in promise) FlickingError: Animation is already playing.

Is this a throttle issue? Does flicking have any throttle features or debounce features to prevent errors from the above relatively aggressive clicking behavior?

These are my dependencies:

 "@egjs/flicking": "^4.1.0",
 "@egjs/vue-flicking": "^4.1.0"

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
WoodNeckcommented, Jul 2, 2021

@robjewell-ibotta It’s okay to do that if you think it’s safer to do that, but you should consider other causes of error like when the user input has interrupted the animation or the event’s stop is called.

Rejecting the error may somehow seem absurd, but it can be also a chance of customization. Like, if you want to add some additional effects, like shaking the arrow button, when the button is clicked while Flicking’s moving you can simply do it like this:

flicking.next()
  .catch(err => {
    if (err instanceOf FlickingError && err.code === ERROR_CODE.ANIMATION_ALREADY_PLAYING) {
      // Show some effects
    } else {
      return;
    }
  });

So basically, I think you can safely ignore the error with the multiple clicks or other cases of errors Also, there’s a Arrow plugin that just released if you need it 😃

1reaction
robjewell-ibottacommented, Jul 7, 2021

Thank you @WoodNeck !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling errors | Flicking - NAVER Open Source
All known Flicking errors are thrown as FlickingError with a code property set as listed on the ERROR_CODE. ... console.error("Animation is already playing!...
Read more >
Issues · naver/egjs-flicking - GitHub
While using react-flicking , want to ignore error FlickingError: Animation is interrupted by user input. 4.x v4.x~ related issue ❓ Question Asking ...
Read more >
egjs/flicking - UNPKG
n ANIMATION_ALREADY_PLAYING: \"Animation is already playing. ... _axes;\n\n if (!axes) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.
Read more >
Angular 7 - ERROR Error: Uncaught (in promise): TypeError ...
When I set the animations inside my component.ts I do not get any errors. But when exporting animations to a separate file I...
Read more >
naver/egjs-flicking | Build 1844877808 | src/const/error.ts
Error codes of {@link FlickingError}. ... @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.
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