-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[firebase storage] uploadTask.events.listen() fires weird events #1314
Comments
Hi @logemann |
i can provide flutter doctor but self contained app is impossible cause it would involve a Cloud Storage account to upload something.... [✓] Flutter (Channel dev, v1.10.14, on Mac OS X 10.15 19A602, locale de-DE) [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [✓] Xcode - develop for iOS and macOS (Xcode 11.0) [✓] Android Studio (version 3.5) [✓] Connected device (1 available) |
If someone is really willing to test it with their Firebase Account. I could at least provide a small test app. |
Closing in favour of trying the latest Storage plugin which has since been refactored and a lot of underlying issues fixed. Thanks. |
Describe the bug
I am implementing an upload progress bar (definite) with the help of uploadTask.events.listen().
In the callback i computing percents of upload completion like this:
Imagine i have a print() statement right in the callback. The log looks like this:
13:28:37.163347 - Bytes 85 von 219131 --) 0.03878958248718803 %
13:28:40.099999 - Bytes 16469 of 219131 --) 7.5155956938999955 %
13:28:40.101480 - Bytes 32853 of 219131 --) 14.992401805312806 %
13:28:40.102404 - Bytes 49237 of 219131 --) 22.469207916725612 %
13:28:40.103234 - Bytes 65620 of 219131 --) 29.945557680109157 %
13:28:40.984518 - Bytes 82004 of 219131 --) 37.42236379152197 %
13:28:40.987146 - Bytes 98388 of 219131 --) 44.89916990293478 %
13:28:40.988821 - Bytes 98389 of 219131 --) 44.89962625096403 %
13:28:40.990674 - Bytes 114773 of 219131 --) 52.376432362376846 %
13:28:40.992537 - Bytes 131157 of 219131 --) 59.85323847378965 %
13:28:40.993965 - Bytes 147541 of 219131 --) 67.33004458520246 %
13:28:40.995440 - Bytes 163925 of 219131 --) 74.80685069661527 %
13:28:40.996644 - Bytes 180309 of 219131 --) 82.28365680802807 %
13:28:40.997861 - Bytes 196693 of 219131 --) 89.76046291944088 %
13:28:40.998986 - Bytes 213077 of 219131 --) 97.2372690308537 %
13:28:41.000252 - Bytes 219131 of 219131 --) 100.0 %
13:28:52.824658 - Bytes 219131 of 219131 --) 100.0 %
13:28:52.826356 - Bytes 219131 of 219131 --) 100.0 %
Pay attention to the first 100% output and the following two 100%. There is a gap of 11 seconds and this is most likely the upload itself of 219kb The uploadTask.onComplete Future is completed after the last 100% line.
As you can see, its impossible to make a proper upload progress bar with these numbers. The only thing i do is to throttle the Network speed via iOS -> Settings -> Developer -> Network Link Conditioner and set it to Edge to test larger upload durations. Dont know if its related.
To Reproduce
Just implement a callback yourself on an Cloud Storage Upload as described above.
Expected behavior
Only one Event fired when 100% and the one event should be right before the Future completes.
The text was updated successfully, but these errors were encountered: