azure stageBlock onProgress event

339 Views Asked by At

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

1

There are 1 best solutions below

0
Phil On

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!