firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.68k stars 3.97k forks source link

🐛 [firebase_storage] Download: TaskState.running event reports Incorrect values for bytesTransferred and totalBytes after pause/resume. #3723

Closed yanivshaked closed 3 years ago

yanivshaked commented 4 years ago

Bug report

The download operation reports incorrect values for bytesTransferred and totalBytes on TaskState.running event after transfer is paused and resumed. In specific,

Steps to reproduce

Steps to reproduce the behavior:

  1. Initiate a download operation (while listening on snapshotEvents for TaskState.running event).
  2. While transfer is running, paused the transfer and later resume it.
  3. View the values reported for bytesTransferred and totalBytes. You will notice two incorrect behaviors:
    • There is a temporary glitch in the bytesTransferred value (looks like it is doubled?). After a few events, it goes back to the correct value:

image

image

(In the above images, green rectangles show correct values and red rectangle show the anomalies)

Expected behavior


Related logs

Following log shows the problem:

Click To Expand the log ``` I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 0.5% = 262144 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 1.1% = 524288 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 1.6% = 786432 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 2.1% = 1048576 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 2.7% = 1310720 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 3.2% = 1572864 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 3.7% = 1835008 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 4.3% = 2097152 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 4.8% = 2359296 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 5.3% = 2621440 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 5.9% = 2883584 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 6.4% = 3145728 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 6.9% = 3407872 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 7.5% = 3670016 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 8% = 3932160 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 8.5% = 4194304 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 9.1% = 4456448 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 9.6% = 4718592 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 10.1% = 4980736 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 10.7% = 5242880 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 11.2% = 5505024 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 11.7% = 5767168 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 12.3% = 6029312 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 12.8% = 6291456 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 13.3% = 6553600 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 13.9% = 6815744 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 14.4% = 7077888 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 14.9% = 7340032 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 15.5% = 7602176 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 16% = 7864320 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 16.5% = 8126464 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 17.1% = 8388608 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 17.6% = 8650752 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 18.1% = 8912896 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 18.7% = 9175040 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 19.2% = 9437184 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 19.7% = 9699328 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 20.3% = 9961472 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 20.8% = 10223616 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 21.3% = 10485760 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 21.9% = 10747904 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 22.4% = 11010048 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 22.9% = 11272192 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 23.5% = 11534336 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 24% = 11796480 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 24.5% = 12058624 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 25.1% = 12320768 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 25.6% = 12582912 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 26.1% = 12845056 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 26.7% = 13107200 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 27.2% = 13369344 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 27.7% = 13631488 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 28.3% = 13893632 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 28.8% = 14155776 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 29.3% = 14417920 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 29.9% = 14680064 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 30.4% = 14942208 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 30.9% = 15204352 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 31.5% = 15466496 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 32% = 15728640 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 32.5% = 15990784 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 33.1% = 16252928 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 33.6% = 16515072 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 34.1% = 16777216 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 34.7% = 17039360 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 35.2% = 17301504 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 35.8% = 17563648 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 36.3% = 17825792 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 36.8% = 18087936 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 37.4% = 18350080 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 37.9% = 18612224 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 38.4% = 18874368 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 39% = 19136512 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 39.5% = 19398656 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 40% = 19660800 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 40.6% = 19922944 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 41.1% = 20185088 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 41.6% = 20447232 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 42.2% = 20709376 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 42.7% = 20971520 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 43.2% = 21233664 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 43.8% = 21495808 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 44.3% = 21757952 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 44.8% = 22020096 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 45.4% = 22282240 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 45.9% = 22544384 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 46.4% = 22806528 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 47% = 23068672 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 47.5% = 23330816 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 48% = 23592960 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 48.6% = 23855104 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 49.1% = 24117248 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 49.6% = 24379392 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 50.2% = 24641536 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 50.7% = 24903680 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 51.2% = 25165824 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 51.8% = 25427968 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 52.3% = 25690112 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 52.8% = 25952256 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 53.4% = 26214400 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 53.9% = 26476544 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 54.4% = 26738688 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 55% = 27000832 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 55.5% = 27262976 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 56% = 27525120 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 56.6% = 27787264 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 57.1% = 28049408 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 57.6% = 28311552 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 58.2% = 28573696 / 49128467 D/ViewRootImpl@17e727b[MainActivity](23231): ViewPostIme pointer 0 D/ViewRootImpl@17e727b[MainActivity](23231): ViewPostIme pointer 1 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 58.2% = 28573696 / 49128467 W/StorageTask(23231): unable to change internal state to: INTERNAL_STATE_IN_PROGRESS isUser: false from state:INTERNAL_STATE_PAUSING I/flutter (23231): Got TaskState.paused I/flutter (23231): 2020-10-01 06:05:05.120759Z General, D: ChatViewItem: got streamed feed I/flutter (23231): 2020-10-01 06:05:05.121578Z General, D: ChatPage: got streamed localFeedId: 489, 138, 2020-09-30 13:58:22.592Z D/ViewRootImpl@17e727b[MainActivity](23231): ViewPostIme pointer 0 D/ViewRootImpl@17e727b[MainActivity](23231): ViewPostIme pointer 1 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 117.4% = 57671680 / 49128467 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 117.4% = 57671680 / 49128467 I/System.out(23231): (HTTPLog)-Static: isSBSettingEnabled false I/System.out(23231): (HTTPLog)-Static: isSBSettingEnabled false D/FileDownloadTask(23231): Resuming download file /data/user/0/com.twtech.twelve/app_flutter/videos/2020_10_01T09_04_29_471888f7afb2f0-03ab-11eb-992a-b9a3f061b321.mp4 at 28835840 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 143.4% = 29097984 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 144.7% = 29360128 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 146% = 29622272 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 147.3% = 29884416 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 148.6% = 30146560 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 149.9% = 30408704 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 151.1% = 30670848 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 152.4% = 30932992 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 153.7% = 31195136 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 155% = 31457280 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 156.3% = 31719424 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 157.6% = 31981568 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 158.9% = 32243712 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 160.2% = 32505856 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 161.5% = 32768000 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 162.8% = 33030144 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 164.1% = 33292288 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 165.4% = 33554432 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 166.6% = 33816576 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 167.9% = 34078720 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 169.2% = 34340864 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 170.5% = 34603008 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 171.8% = 34865152 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 173.1% = 35127296 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 174.4% = 35389440 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 175.7% = 35651584 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 177% = 35913728 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 178.3% = 36175872 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 179.6% = 36438016 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 180.9% = 36700160 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 182.1% = 36962304 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 183.4% = 37224448 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 184.7% = 37486592 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 186% = 37748736 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 187.3% = 38010880 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 188.6% = 38273024 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 189.9% = 38535168 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 191.2% = 38797312 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 192.5% = 39059456 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 193.8% = 39321600 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 195.1% = 39583744 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 196.4% = 39845888 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 197.6% = 40108032 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 198.9% = 40370176 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 200.2% = 40632320 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 201.5% = 40894464 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 202.8% = 41156608 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 204.1% = 41418752 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 205.4% = 41680896 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 206.7% = 41943040 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 208% = 42205184 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 209.3% = 42467328 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 210.6% = 42729472 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 211.9% = 42991616 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 213.2% = 43253760 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 214.4% = 43515904 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 215.7% = 43778048 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 217% = 44040192 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 218.3% = 44302336 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 219.6% = 44564480 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 220.9% = 44826624 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 222.2% = 45088768 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 223.5% = 45350912 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 224.8% = 45613056 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 226.1% = 45875200 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 227.4% = 46137344 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 228.7% = 46399488 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 229.9% = 46661632 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 231.2% = 46923776 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 232.5% = 47185920 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 233.8% = 47448064 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 235.1% = 47710208 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 236.4% = 47972352 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 237.7% = 48234496 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 239% = 48496640 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 240.3% = 48758784 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 241.6% = 49020928 / 20292627 I/flutter (23231): Got TaskState.running = event.bytesTransferred / event.totalBytes => 242.1% = 49128467 / 20292627 ``` --- ### Flutter doctor Run `flutter doctor` and paste the output below:
Click To Expand ``` [√] Flutter (Channel stable, 1.20.4, on Microsoft Windows [Version 10.0.18362.1016], locale en-IL) • Flutter version 1.20.4 at c:\src\flutter • Framework revision fba99f6cf9 (2 weeks ago), 2020-09-14 15:32:52 -0700 • Engine revision d1bc06f032 • Dart version 2.9.2 [√] Android toolchain - develop for Android devices (Android SDK version 30.0.0) • Android SDK at C:\Users\Yaniv\AppData\Local\Android\Sdk • Platform android-30, build-tools 30.0.0 • ANDROID_SDK_ROOT = C:\Users\Yaniv\AppData\Local\Android\Sdk • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) • All Android licenses accepted. [√] Android Studio (version 4.0) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 47.1.2 • Dart plugin version 193.7361 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) [√] VS Code (version 1.49.1) • VS Code at C:\Users\Yaniv\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.14.1 [√] Connected device (1 available) • SM G950F (mobile) • ce041714ca5a1e0402 • android-arm64 • Android 9 (API 28) • No issues found! ```
--- ### Flutter dependencies Run `flutter pub deps -- --style=compact` and paste the output below:
Click To Expand ``` Dart SDK 2.9.2 Flutter SDK 1.20.4 tw_app 0.4.13+724 dependencies: - ansicolor 1.0.5 - app_settings 4.0.4 [flutter] - autocomplete_textfield 1.7.3 [flutter] - bubble 1.1.9+1 [flutter] - cached_network_image 2.2.0+1 [flutter flutter_cache_manager] - connectivity 0.4.9+3 [flutter meta connectivity_platform_interface connectivity_macos connectivity_for_web] - contacts_service 0.4.6 [flutter collection quiver] - dashed_circle 0.0.1 [flutter] - device_info 0.4.2+8 [flutter device_info_platform_interface] - device_preview 0.4.8 [font_awesome_flutter http freezed_annotation json_annotation flutter flutter_localizations meta shared_preferences shared_preferences_macos] - devicelocale 0.3.2 [flutter] - equatable 1.2.5 [collection meta] - expandable 4.1.4 [flutter] - firebase_auth 0.18.0+1 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter] - firebase_core 0.5.0 [firebase_core_platform_interface flutter quiver meta firebase_core_web] - firebase_messaging 7.0.0 [meta platform flutter firebase_core] - firebase_storage 5.0.0-dev.2 [flutter firebase_core firebase_core_platform_interface firebase_storage_platform_interface quiver] - fixnum 0.10.11 - flushbar 1.10.4 [flutter] - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine] - flutter_absolute_path 1.0.6 [flutter] - flutter_better_camera 0.6.1 [flutter] - flutter_bloc 4.0.0 [flutter bloc provider] - flutter_html 1.0.0 [html csslib css_colors video_player chewie webview_flutter chewie_audio flutter_svg flutter] - flutter_local_notifications 1.4.4+4 [flutter platform flutter_local_notifications_platform_interface] - flutter_localizations 0.0.0 [flutter intl characters collection meta path typed_data vector_math] - flutter_secure_storage 3.3.3 [meta flutter] - flutter_sim_country_code 0.0.3 [flutter] - flutter_slidable 0.5.7 [flutter] - flutter_svg 0.17.4 [path_drawing xml vector_math meta flutter] - fluttertoast 7.1.1 [flutter flutter_web_plugins] - gbk2utf8 1.0.1 [flutter] - get_it 4.0.4 [async meta] - http 0.12.2 [http_parser path pedantic] - image 2.1.12 [archive xml] - intl 0.16.1 [path] - ios_app_group 1.0.2 [flutter] - json_serializable 3.5.0 [analyzer build build_config json_annotation meta path source_gen] - multi_image_picker 4.7.15 [flutter meta] - mutex 1.1.0 - native_device_orientation 0.4.3 [flutter] - ntp 1.0.7 [universal_io] - package_info 0.4.3 [flutter] - path_provider 1.6.18 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows] - pdf_flutter 1.1.3 [flutter pedantic path_provider flutter_cache_manager http uuid] - permission_handler 5.0.1+1 [flutter meta permission_handler_platform_interface] - phone_number 0.6.2+4 [flutter] - photo_view 0.10.2 [flutter] - pin_code_fields 3.1.2 [flutter] - receive_sharing_intent 1.4.1 [flutter] - reorderables 0.3.2 [flutter] - rxdart 0.24.1 - scroll_to_index 1.0.6 [flutter] - scrollable_positioned_list 0.1.7 [flutter meta] - share_extend 1.1.9 [meta flutter] - shared_preferences_app_group_ios 0.0.3 [flutter] - sliding_sheet 0.4.0 [flutter] - soundpool 1.1.2 [flutter soundpool_platform_interface soundpool_web soundpool_macos] - sprintf 5.0.0 - sqfentity 1.4.0+1 [flutter sqflite synchronized path sqfentity_gen sqflite_common_ffi] - sqfentity_gen 1.4.0 [build source_gen] - sqflite 1.3.1+1 [flutter sqflite_common path] - sticky_headers 0.1.8+1 [flutter meta] - tuple 1.0.3 [quiver] - url_launcher 5.7.2 [flutter url_launcher_platform_interface url_launcher_web url_launcher_linux url_launcher_macos url_launcher_windows] - uuid 2.2.2 [crypto convert] - vibration 1.5.0 [flutter] - video_player 0.10.12+5 [meta video_player_platform_interface video_player_web flutter] - video_thumbnail 0.2.2 [flutter] - web_socket_channel 1.1.0 [async crypto stream_channel] dev dependencies: - build_runner 1.10.1 [analyzer args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style glob graphs http_multi_server io js logging meta mime path pedantic pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - build_verify 1.1.1 [path test] - dependency_validator 1.5.0 [args logging path pub_semver yaml] - flutter_driver 0.0.0 [file json_rpc_2 meta path web_socket_channel vm_service_client webdriver flutter flutter_test fuchsia_remote_debug_protocol archive args async boolean_selector characters charcode clock collection convert crypto fake_async intl matcher platform process pub_semver source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math] - flutter_launcher_icons 0.7.5 [image args yaml] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data] - test 1.14.4 [analyzer async boolean_selector coverage http http_multi_server io js multi_server_socket node_preamble package_config path pedantic pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core] transitive dependencies: - _fe_analyzer_shared 6.0.0 [meta] - analyzer 0.39.14 [_fe_analyzer_shared args charcode cli_util collection convert crypto glob html meta package_config path pub_semver source_span watcher yaml] - archive 2.0.13 [crypto args path] - args 1.6.0 - async 2.4.1 [collection] - bloc 4.0.0 [meta] - boolean_selector 2.0.0 [source_span string_scanner] - build 1.3.0 [analyzer async convert crypto logging meta path glob] - build_config 0.4.2 [checked_yaml json_annotation meta path pubspec_parse yaml] - build_daemon 2.1.4 [built_collection built_value http_multi_server logging pedantic path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 1.3.11 [analyzer build crypto graphs logging path package_config pub_semver] - build_runner_core 6.0.1 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pedantic pool timing watcher yaml] - built_collection 4.3.2 [collection quiver] - built_value 7.1.0 [built_collection collection fixnum quiver] - charcode 1.1.3 - checked_yaml 1.0.2 [json_annotation source_span yaml] - chewie 0.9.10 [open_iconic_flutter video_player wakelock flutter] - chewie_audio 1.0.0+1 [open_iconic_flutter video_player screen flutter] - cli_util 0.1.4 [path] - clock 1.0.1 [meta] - code_builder 3.4.1 [built_collection built_value collection matcher meta] - collection 1.14.12 - connectivity_for_web 0.3.1+2 [connectivity_platform_interface flutter_web_plugins flutter] - connectivity_macos 0.1.0+5 [flutter] - connectivity_platform_interface 1.0.6 [flutter meta plugin_platform_interface] - convert 2.1.1 [charcode typed_data] - coverage 0.13.11 [args logging package_config path source_maps stack_trace vm_service] - crypto 2.1.4 [collection convert typed_data] - css_colors 1.0.2 [flutter] - csslib 0.16.2 [source_span] - dart_style 1.3.6 [analyzer args path source_span] - device_info_platform_interface 1.0.1 [flutter meta plugin_platform_interface] - ffi 0.1.3 - file 5.1.0 [intl meta path] - firebase 7.3.0 [http http_parser js] - firebase_auth_platform_interface 2.0.1 [flutter meta firebase_core plugin_platform_interface] - firebase_auth_web 0.3.0+1 [flutter flutter_web_plugins firebase meta http_parser intl firebase_core firebase_auth_platform_interface js] - firebase_core_platform_interface 2.0.0 [flutter meta plugin_platform_interface quiver] - firebase_core_web 0.2.0 [firebase firebase_core_platform_interface flutter flutter_web_plugins meta js] - firebase_storage_platform_interface 1.0.0-dev.1 [flutter meta collection firebase_core plugin_platform_interface] - flutter_cache_manager 1.4.2 [flutter path_provider uuid http path sqflite pedantic clock file rxdart] - flutter_local_notifications_platform_interface 1.0.1 [flutter plugin_platform_interface] - flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math] - font_awesome_flutter 8.8.1 [flutter] - freezed_annotation 0.11.0+1 [collection json_annotation meta] - fuchsia_remote_debug_protocol 0.0.0 [json_rpc_2 process web_socket_channel flutter_test flutter_driver archive args async boolean_selector charcode clock collection convert crypto fake_async file intl matcher meta path platform pub_semver source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math vm_service_client webdriver] - glob 1.2.0 [async collection node_io path pedantic string_scanner] - graphs 0.2.0 - html 0.14.0+3 [csslib source_span] - http_multi_server 2.2.0 [async] - http_parser 3.1.4 [charcode collection source_span string_scanner typed_data] - io 0.3.4 [charcode meta path string_scanner] - js 0.6.2 - json_annotation 3.1.0 - json_rpc_2 2.1.0 [stack_trace stream_channel] - logging 0.11.4 - matcher 0.12.6 [stack_trace] - meta 1.1.8 - mime 0.9.7 - multi_server_socket 1.0.2 [async] - nested 0.0.4 [flutter] - node_interop 1.1.1 [js] - node_io 1.1.1 [node_interop path] - node_preamble 1.4.12 - open_iconic_flutter 0.3.0 [flutter] - package_config 1.9.3 [path charcode] - package_resolver 1.0.10 [collection http package_config path] - path 1.6.4 - path_drawing 0.4.1+1 [vector_math meta path_parsing flutter] - path_parsing 0.1.4 [vector_math meta] - path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter] - path_provider_macos 0.0.4+4 [flutter] - path_provider_platform_interface 1.0.3 [flutter meta platform plugin_platform_interface] - path_provider_windows 0.0.4+1 [path_provider_platform_interface meta path flutter ffi win32] - pedantic 1.9.0 - permission_handler_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - petitparser 2.4.0 [meta] - platform 2.2.1 - plugin_platform_interface 1.0.2 [meta] - pool 1.4.0 [async stack_trace] - process 3.0.12 [file intl meta path platform] - provider 4.3.2+2 [flutter nested collection] - pub_semver 1.4.4 [collection] - pubspec_parse 0.1.5 [checked_yaml json_annotation pub_semver yaml] - quiver 2.1.3 [matcher meta] - screen 0.0.5 [flutter] - shared_preferences 0.5.12 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows] - shared_preferences_linux 0.0.2+2 [file flutter meta path path_provider_linux shared_preferences_platform_interface] - shared_preferences_macos 0.0.1+10 [shared_preferences_platform_interface flutter] - shared_preferences_platform_interface 1.0.4 [meta flutter] - shared_preferences_web 0.1.2+7 [shared_preferences_platform_interface flutter flutter_web_plugins meta] - shared_preferences_windows 0.0.1+1 [shared_preferences_platform_interface flutter ffi file meta path path_provider_platform_interface path_provider_windows] - shelf 0.7.9 [async collection http_parser path stack_trace stream_channel] - shelf_packages_handler 1.0.4 [async path shelf shelf_static package_resolver] - shelf_static 0.2.8 [convert http_parser mime path shelf] - shelf_web_socket 0.2.3 [shelf web_socket_channel stream_channel] - sky_engine 0.0.99 - soundpool_macos 0.2.4 [flutter soundpool_platform_interface] - soundpool_platform_interface 1.0.1 [flutter meta plugin_platform_interface] - soundpool_web 1.0.3 [flutter flutter_web_plugins soundpool_platform_interface http] - source_gen 0.9.7+1 [analyzer async build dart_style glob meta path pedantic source_span] - source_map_stack_trace 2.0.0 [path stack_trace source_maps] - source_maps 0.10.9 [source_span] - source_span 1.7.0 [charcode collection meta path term_glyph] - sqflite_common 1.0.2+1 [synchronized path meta] - sqflite_common_ffi 1.1.0+1 [sqlite3 sqflite_common synchronized path meta] - sqlite3 0.1.5 [collection ffi meta] - stack_trace 1.9.3 [path] - stream_channel 2.0.0 [async] - stream_transform 1.2.0 - string_scanner 1.0.5 [charcode meta source_span] - sync_http 0.2.0 - synchronized 2.2.0+2 - term_glyph 1.1.0 - test_api 0.2.15 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher] - test_core 0.3.4 [analyzer async args boolean_selector collection coverage glob io meta path pedantic pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api] - timing 0.1.1+2 [json_annotation] - typed_data 1.1.6 - universal_io 1.0.1 [meta zone_local] - url_launcher_linux 0.0.1+1 [flutter] - url_launcher_macos 0.0.1+8 [flutter] - url_launcher_platform_interface 1.0.8 [flutter meta plugin_platform_interface] - url_launcher_web 0.1.4+1 [url_launcher_platform_interface flutter flutter_web_plugins meta] - url_launcher_windows 0.0.1+1 [flutter] - vector_math 2.0.8 - video_player_platform_interface 2.2.0 [flutter meta] - video_player_web 0.1.4 [flutter flutter_web_plugins meta video_player_platform_interface] - vm_service 2.3.1 [meta] - vm_service_client 0.2.6+2 [async collection json_rpc_2 pub_semver source_span stack_trace stream_channel web_socket_channel] - wakelock 0.1.4+2 [flutter] - watcher 0.9.7+15 [async path pedantic] - webdriver 2.1.2 [archive matcher path stack_trace sync_http] - webkit_inspection_protocol 0.7.3 [logging] - webview_flutter 0.3.24 [flutter] - win32 1.7.3 [ffi] - xdg_directories 0.1.0 [path process flutter] - xml 3.6.1 [collection convert meta petitparser] - yaml 2.2.1 [charcode collection string_scanner source_span] - zone_local 0.1.2 ```
---
yanivshaked commented 4 years ago

Dear @Salakar ,

Appreciate if you could comment on this issue

Thanks, Yaniv

yanivshaked commented 4 years ago

One more important comment: This issue happens only on Android. On iOS the values are correctly reported.

Ehesp commented 4 years ago

This could be an issue with the SDK itself - will have to confirm. We don't do much in the way of manipulation, we simply pass values on. So it's either being accidentally mutated or an SDK issue.

russellwheatley commented 3 years ago

Hey @yanivshaked, I implemented a storage task using Firebase Android SDK natively. As you can see, after pausing and resuming, the getBytesTransferred roughly doubled before returning to expected values. This is an Android SDK issue and is not something we have control over unfortunately. I recommend raising an issue on the Firebase android sdk here

2020-12-31 13:34:08.590 26129-26129/com.example.deleteme D/storage-test: getTotalByteCount: 31457280
2020-12-31 13:34:08.647 26129-26129/com.example.deleteme D/storage-test: getBytesTransferred: 7340032
2020-12-31 13:34:08.647 26129-26129/com.example.deleteme D/storage-test: getTotalByteCount: 31457280
2020-12-31 13:34:08.705 26129-26129/com.example.deleteme D/storage-test: getBytesTransferred: 7602176
2020-12-31 13:34:08.705 26129-26129/com.example.deleteme D/storage-test: getTotalByteCount: 31457280
2020-12-31 13:34:08.710 26129-26129/com.example.deleteme D/storage-test: paused
2020-12-31 13:34:08.711 26129-26129/com.example.deleteme D/storage-test: getBytesTransferred: 7602176
2020-12-31 13:34:08.711 26129-26129/com.example.deleteme D/storage-test: getTotalByteCount: 31457280
2020-12-31 13:34:14.604 26129-26129/com.example.deleteme D/storage-test: resumed
2020-12-31 13:34:14.607 26129-26129/com.example.deleteme D/storage-test: getBytesTransferred: 15728640
2020-12-31 13:34:14.607 26129-26129/com.example.deleteme D/storage-test: getTotalByteCount: 31457280
2020-12-31 13:34:14.618 26129-26129/com.example.deleteme D/storage-test: getBytesTransferred: 15728640
2020-12-31 13:34:14.618 26129-26129/com.example.deleteme D/storage-test: getTotalByteCount: 31457280
2020-12-31 13:34:14.887 26129-26129/com.example.deleteme D/storage-test: getBytesTransferred: 8126464
2020-12-31 13:34:14.887 26129-26129/com.example.deleteme D/storage-test: getTotalByteCount: 23592960
2020-12-31 13:34:14.939 26129-26129/com.example.deleteme D/storage-test: getBytesTransferred: 8388608
2020-12-31 13:34:14.939 26129-26129/com.example.deleteme D/storage-test: getTotalByteCount: 23592960
yanivshaked commented 3 years ago

Hi @russellwheatley , thanks for the effort!!

I have raised an issue on firebase-android-sdk page