kimmobrunfeldt / kimmobrunfeldt/progressbar.js

Uncaught promise error in 1.1.0

Open
#255 13 comments 15 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.9k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

Hi,

Firstly, I want to thank you for your library, it adds a nice touch to our application.
As I am a developer, it's sometime nice when we know how our creation is used, so I've attached a partial screenshot to show to you our use case.

Secondly, I encouters a little issue since I've upgrade progressbar.js from 1.0.1 to 1.1.0.
In my browser console, there is sometime one or multiple uncaught promise errors:

```
Uncaught (in promise) {offset: 289.0670000019968}
Promise.then (async)
animate @ progressbar.js:1183
animate @ progressbar.js:1406
```

It does'nt seem to affect the UI. Unfortunatly, I have not been able to find exactly why it occurs.

By by looking into the diffs from [1.0.1 to 1.1.0](https://github.com/kimmobrunfeldt/progressbar.js/compare/1.0.1...1.1.0#diff-4d74f839e0b8f64858c424ed76e895c1R118-R121),
I have been able to find that the error may be caused since the upgrade of the `shifty` dependency from the [Pull Request #196](https://github.com/kimmobrunfeldt/progressbar.js/pull/196) ([commit](https://github.com/kimmobrunfeldt/progressbar.js/commit/cebeb0786a331de9e2083e416d191c5181047e53)).

By adding an empty catch function to [R118-R121](https://github.com/kimmobrunfeldt/progressbar.js/compare/1.0.1...1.1.0#diff-4d74f839e0b8f64858c424ed76e895c1R118-R121), the promise error is handled and it seem to not affect the UI. But, I'm not sure that it is the right way to fix this problem...

```js
.catch(function(state) {})
```

I hope it helps you, thank you very much!

---------------------------

![Screenshot_2019-10-30_13-43-15](https://user-images.githubusercontent.com/7907713/67884230-dc497080-fb1b-11e9-8671-0875b30ea82d.png)

Contributor guide

Open the contributing guide

Research direction

Start in progressbar.js at lines 118-121 and follow the animate paths shown at lines 1183 and 1406. Compare versions 1.0.1 and 1.1.0, including the shifty upgrade from pull request #196, and reproduce the promise rejection. Done means the uncaught promise error no longer appears without changing the unaffected UI behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.