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

Progress bar on upload #1564

Closed
MichaelDvP opened this issue Jan 19, 2024 · 18 comments
Closed

Progress bar on upload #1564

MichaelDvP opened this issue Jan 19, 2024 · 18 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@MichaelDvP
Copy link
Contributor

In the latest 3.6.4-dev9 the upload progress starts with 350% and counts down to 100%, the bar runs from right to left showing the range 200% - 100%. Only cosmetic, no functioal issue. I have not found a change that causes this. Maybe a updated package?

grafik

@proddy proddy added the bug Something isn't working label Jan 19, 2024
@proddy proddy added this to the v3.6.5 milestone Jan 19, 2024
@proddy proddy self-assigned this Jan 19, 2024
@proddy
Copy link
Contributor

proddy commented Jan 19, 2024

hmm, not sure which package but I'll check.

MichaelDvP added a commit to MichaelDvP/EMS-ESP32 that referenced this issue Jan 20, 2024
@MichaelDvP
Copy link
Contributor Author

Seems the progress.total and progress.loaded are mixed. Tried to go back to alova 2.16.2, but no luck. I've made a workaround and check what value is greater to calculate the percentage. This works in my tests, but it's better to fix the root cause.

@proddy
Copy link
Contributor

proddy commented Jan 20, 2024

thanks, I'll investigate and try and find what has changed. the workaround is perfect for the time being

proddy added a commit that referenced this issue Jan 20, 2024
@proddy
Copy link
Contributor

proddy commented Jan 28, 2024

I'm still seeing this error, now and then. I'll re-open and spend some time fixing it. the latest alova lib now exposes event listeners to the upload progress

@MichaelDvP
Copy link
Contributor Author

I'm still seeing this error, now and then

I think this is due to the cache setting you've added a few days ago. I've commented it out for me, because i often change the versions and get confsed if changes don't show up.

@proddy
Copy link
Contributor

proddy commented Feb 3, 2024

good point, will look into that and rollback

@proddy
Copy link
Contributor

proddy commented Feb 4, 2024

I've removed the cache, will be in next PR. Let's see if it resolves the issue.

@proddy
Copy link
Contributor

proddy commented Feb 11, 2024

I added an etag for better cache management. But this issue with the progress bar is still there, on Mac OSX (edge) so I need to look into the Alova code again.

@proddy proddy modified the milestones: v3.6.5, v3.7.0 Mar 24, 2024
proddy added a commit to proddy/EMS-ESP32 that referenced this issue Apr 7, 2024
@MichaelDvP
Copy link
Contributor Author

After updating to alova 2.20.0 the progressbar is not shown anymore.

@proddy
Copy link
Contributor

proddy commented Apr 20, 2024

I'll fix

@proddy
Copy link
Contributor

proddy commented Apr 20, 2024

I've logged an issue with the Alova team

EDIT: it worked in alova 2.19.2

@proddy
Copy link
Contributor

proddy commented Apr 25, 2024

Alova team have a fix, waiting for the next release.

@MichaelDvP
Copy link
Contributor Author

v2.20.2 is out and working.
But still loaded and total are exchanged. The percentage is only shown right for (total * 100) / loaded.

@proddy
Copy link
Contributor

proddy commented Apr 26, 2024

I'll test as well

@proddy
Copy link
Contributor

proddy commented Apr 26, 2024

looks ok to me, I see the progress go from 0 to 100? What am I missing?

@MichaelDvP
Copy link
Contributor Author

The fix for the wrong direction was this check (same for the % number):

: progress.loaded <= progress.total
? Math.round((progress.loaded * 100) / progress.total)
: Math.round((progress.total * 100) / progress.loaded)

Works, but would be nice if names total and loaded match the meaning.

@proddy
Copy link
Contributor

proddy commented Apr 26, 2024

ah yes, I remember we had to hack that. I'll report it Alova.

@proddy
Copy link
Contributor

proddy commented Apr 26, 2024

I'll make a PR

@proddy proddy closed this as completed Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants