I'm seeing some weird behaviour with the progress event in various browsers. This is what I'm seeing:
Windows/Chrome - The progress is way too fast. For instance a 160MB file shows 100% complete after about a second, while the actual transfer takes about 41s.
Windows/Firefox - Correct behaviour.
Windows/Edge - The progress event doesn't seem to fire ever???
Windows/IE11 - Fast progress like Windows/Chrome.
Mac/Chrome - Correct behaviour.
Mac/Firefox - Correct behaviour.
Mac/Safari - Very chunky progress.
Any idea what's going on?
Superagent doesn't track the upload progress, it only forwards events from the browser.
This is probably bufferbloat: https://en.wikipedia.org/wiki/Bufferbloat
I tried a plain XMLHttpRequest and tried Axios as well. All of them are identical. Here is a gif that someone made to demonstrate it from: https://github.com/mzabriskie/axios/issues/593
We are experiencing the same issue with XHR Progress. Just came here from google, searching for this issue.
From our observations this seems like an issue with Windows (independent of browser or framework). All browsers we tested so far (Chrome, Firefox, Edge, IE 11) are jumping from 0% to 100% in a few seconds on a Windows host. The final response - upload request completed - takes until the upload is done, and the server responds. Showing 100% for a few minutes...
On Linux Mint we get the progress events representing the real network speed. Tested with Chrome and Firefox on Linux.
A weird fact: The upload continues on windows, even if you close your browser. On Linux the upload stops as soon as the browser is closed.
This led us to conclude, that somehow Windows takes the files from the browser and handles the upload from there on. The browser thinks it has send the complete file, and waits for the response... (But we don't have any evidence for this conclusion at the moment).
Hey @tkoenig89,
we have encountered the same issue. Have you ever been able to find a fix for this issue?
We have observed the exact same behavior, including the fact that the upload continues even if we close the browser window.
Hi @KerimG ,
actually we did not find a solution for this issue, as I recall. We later switched from a file upload to a download from an update server, as this did fit better with our emebeded system update scenario.
@tkoenig89
Unfortunate. Thank you very much for the additional information, though. Much appreciated 馃槂
Most helpful comment
We are experiencing the same issue with XHR Progress. Just came here from google, searching for this issue.
From our observations this seems like an issue with Windows (independent of browser or framework). All browsers we tested so far (Chrome, Firefox, Edge, IE 11) are jumping from 0% to 100% in a few seconds on a Windows host. The final response - upload request completed - takes until the upload is done, and the server responds. Showing 100% for a few minutes...
On Linux Mint we get the progress events representing the real network speed. Tested with Chrome and Firefox on Linux.
A weird fact: The upload continues on windows, even if you close your browser. On Linux the upload stops as soon as the browser is closed.
This led us to conclude, that somehow Windows takes the files from the browser and handles the upload from there on. The browser thinks it has send the complete file, and waits for the response... (But we don't have any evidence for this conclusion at the moment).