1

I'm using the stageBlock method and the onProgress callback. I thought I had this working when I wrote this 9 months ago but I'm doubting myself now. The progress update is showing "loadedBytes" and it does not resemble what is actually going over the network. onProgress reports as all bytes "loaded" while the browser is still uploading the file via a network request. How do you monitor the network bytes while using this azure method?

await blockBlobClient.stageBlock(blockId, chunk, chunk.size, {
                onProgress: e => {
                    console.log('onProgress loadedBytes: ' + e.loadedBytes);
                },
                abortSignal: abortControllerRef.current.signal,
            });

enter image description here

I'm using version 12.1.1 of azure nodejs package...

enter image description here

I have just upgraded to version 12.3.0 and still have the same problem.

Edit

I have created a small repro here: https://github.com/philwindsor/az-progress-bug

Its a react app, clone it and run yarn install then yarn run.

Gif of problem: enter image description here

Phil
  • 1,609
  • 12
  • 24
  • COuld you please describe the issue in detail or provide a screenshot of the error? – Jim Xu Dec 22 '20 at 08:11
  • @JimXu I dont receive an error, the progress reported by the onProgress call back is incorrect. It appears as if it is reporting on the bytes loaded in memory and not what has actually been sent over the network. – Phil Dec 22 '20 at 11:25
  • Could you please provide a sample? Let me try it. Besides, could you please tell me the size of file and every chunk's size? – Jim Xu Dec 24 '20 at 01:12
  • @JimXu have added a sample git repo. Let me know if you need anything else – Phil Dec 30 '20 at 15:12
  • We have just been experimenting with this and found that throttling the network speed in chrome seems to make the update progress report the correct values. – Phil Dec 30 '20 at 15:27

1 Answers1

0

I ended up raising an issue on github: https://github.com/Azure/azure-sdk-for-js/issues/13161 which I have now closed.

Turns out our company virus scanner (sohpos) is the cause of the problem. Once disabled the problem goes away!

Phil
  • 1,609
  • 12
  • 24