Skip to content
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] Support for download progress #2884

Closed

Conversation

awazgyawali
Copy link
Contributor

@awazgyawali awazgyawali commented Jul 2, 2020

Description

Adds support for Download Progress;

Related Issues

#420

Checklist

Before you create this PR confirms that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • If the pull request affects only one plugin, the PR title starts with the name of the plugin in brackets (e.g. [cloud_firestore])
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the [Flutter Style Guide].
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the [CLA].
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@awazgyawali awazgyawali changed the title Created new file for download progres [firebase_storage] Created new file for download progres Jul 2, 2020
@awazgyawali awazgyawali changed the title [firebase_storage] Created new file for download progres [firebase_storage] Support for download progress Jul 2, 2020
@pc-brainants
Copy link

@googlebot I consent.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Jul 3, 2020
@awazgyawali
Copy link
Contributor Author

awazgyawali commented Jul 5, 2020

For those who might be wondering how to use this right away, use this on your pub spec.

  firebase_storage:
    git:
      url: https://github.com/awazgyawali/flutterfire
      path: packages/firebase_storage
      ref: storage_download_progress

Note: On the Windows environment, you might get weird long pathname issues, follow here.

A star on my fork would be appreciated if it helped you, Thanks. :-)

@awazgyawali
Copy link
Contributor Author

awazgyawali commented Jul 8, 2020

Example Usage

    StorageFileDownloadTask task =
        _storage.ref().child(attachment.storageReference).writeToFile(file);
    task.events.listen((event) {
      double progress =
          event.snapshot.bytesTransferred / event.snapshot.totalByteCount;
          // TODO: This is progress
    });
    await task.onComplete; // This is resolved once download is completed

@sudhanshug16
Copy link

@awazgyawali Lol I figured it out minutes after I commented so I deleted it. Thanks anyways

@yanivshaked
Copy link

Any timeline on when will this because a part of the official release?

@awazgyawali
Copy link
Contributor Author

awazgyawali commented Jul 15, 2020

There is an ongoing refactor of the whole package paradigm from invertase at #2582

Once it is stable, I will maintain the PR and might get reviewed too. Please expect a timeline of around about a month.

@awazgyawali awazgyawali marked this pull request as ready for review July 16, 2020 15:39
@nstosic-go
Copy link

Thanks for the update @awazgyawali. Just to confirm, you're keeping this PR on hold until the firebase_storage package rewrite has been merged. You're not going to wait for all FlutterFire packages to be rewritten, right?

@awazgyawali
Copy link
Contributor Author

Yes, we are only interested on firebase_storage change however the team might not have time to review or approve the changes until all the packages are refactored. I'll do my part anyway to complete it once the rework of storage package is done but we might have to wait till everything closes out.

@yanivshaked
Copy link

yanivshaked commented Jul 27, 2020

For those who might be wondering how to use this right away, use this on your pub spec.

  firebase_storage:
    git:
      url: https://github.com/awazgyawali/flutterfire
      path: packages/firebase_storage
      ref: storage_download_progress

Note: On the Windows environment, you might get weird long pathname issues, follow here.

A star on my fork would be appreciated if it helped you, Thanks. :-)

I have tried using the above suggestion, but got the following errors (on firebase_auth):


C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:8: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:538: error: cannot find symbol
    public void onComplete(@NonNull Task<AuthResult> task) {
                            ^
  symbol:   class NonNull
  location: class FirebaseAuthPlugin.SignInCompleteListener
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:558: error: cannot find symbol
    public void onComplete(@NonNull Task<Void> task) {
                            ^
  symbol:   class NonNull
  location: class FirebaseAuthPlugin.TaskVoidCompleteListener
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:576: error: cannot find symbol
    public void onComplete(@NonNull Task<ProviderQueryResult> task) {
                            ^
  symbol:   class NonNull
  location: class FirebaseAuthPlugin.ProvidersCompleteListener
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:175: error: cannot find symbol
                      public void onComplete(@NonNull Task<AuthResult> task) {
                                              ^
  symbol: class NonNull
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:270: error: cannot find symbol
          public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
                                          ^
  symbol: class NonNull
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:435: error: cannot find symbol
              public void onComplete(@NonNull Task<GetTokenResult> task) {
                                      ^
  symbol: class NonNull
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:487: error: cannot find symbol
          public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
                                          ^
  symbol: class NonNull
Note: C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
8 errors

FAILURE: Build failed with an exception.

Is there any way to use a version of firebase_auth that is aligned with the changes in the above suggested repository?

I have tried using the following:

  firebase_auth:
    git:
      url: https://github.com/awazgyawali/flutterfire
      path: packages/firebase_auth/firebase_auth
      ref: storage_download_progress 

but got the following error:

Running "flutter pub get" in tw_app...                          
Because every version of firebase_storage from git depends on firebase_core ^0.5.0-dev.1 and every version of firebase_auth from git depends on firebase_core ^0.4.5, firebase_storage from git is incompatible with firebase_auth from git.

So, because tw_app depends on both firebase_auth from git and firebase_storage from git, version solving failed.
pub get failed (1; So, because tw_app depends on both firebase_auth from git and firebase_storage from git, version solving failed.)
exit code 1

Thanks!

@awazgyawali
Copy link
Contributor Author

awazgyawali commented Jul 27, 2020

Use the following

  firebase_storage:
    git:
      url: https://github.com/awazgyawali/flutterfire
      path: packages/firebase_storage
      ref: 5ac07af

@yanivshaked
Copy link

firebase_storage:
git:
url: https://github.com/awazgyawali/flutterfire
path: packages/firebase_auth/firebase_storage
ref: 5ac07af

Tried, got:

PS C:\dev\12Tech12\git\client\tw_app> flutter pub get
Could not find a file named "packages/firebase_auth/firebase_storage/pubspec.yaml" in https://github.com/awazgyawali/flutterfire 5ac07af765bf43974d30f654dd84fe5417259787.
Running "flutter pub get" in tw_app...
pub get failed (1; Could not find a file named "packages/firebase_auth/firebase_storage/pubspec.yaml" in https://github.com/awazgyawali/flutterfire 5ac07af765bf43974d30f654dd84fe5417259787.)

@awazgyawali
Copy link
Contributor Author

I edited my comment :-)

@yanivshaked
Copy link

I edited my comment :-)

Still getting the following errors:


C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:8: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:538: error: cannot find symbol
    public void onComplete(@NonNull Task<AuthResult> task) {
                            ^
  symbol:   class NonNull
  location: class FirebaseAuthPlugin.SignInCompleteListener     
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:558: error: cannot find symbol
    public void onComplete(@NonNull Task<Void> task) {
                            ^
  symbol:   class NonNull
  location: class FirebaseAuthPlugin.TaskVoidCompleteListener
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:576: error: cannot find symbol
    public void onComplete(@NonNull Task<ProviderQueryResult> task) {   
                            ^
  symbol:   class NonNull
  location: class FirebaseAuthPlugin.ProvidersCompleteListener
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:175: error: cannot find symbol
                      public void onComplete(@NonNull Task<AuthResult> task) {
                                              ^
  symbol: class NonNull
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:270: error: cannot find symbol
          public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
                                          ^
  symbol: class NonNull
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:435: error: cannot find symbol
              public void onComplete(@NonNull Task<GetTokenResult> task) {
                                      ^
  symbol: class NonNull
C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:487: error: cannot find symbol
          public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
                                          ^
  symbol: class NonNull
Note: C:\Users\Yaniv\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
8 errors

FAILURE: Build failed with an exception.

Which version of firebase_auth should I use? (currently using latest release)

@yanivshaked
Copy link

I could not establish a working set of firebase_auth, firebase_storage, firebase_messaging and firebase_core with the support for download progress.
If possible, please provide the correct sources to use in pubspec.yaml for all 4 packages.

Thanks!

@awazgyawali
Copy link
Contributor Author

pubspec.txt
Its working for me, please filter your required versions and package

@yanivshaked
Copy link

pubspec.txt
Its working for me, please filter your required versions and package

Thanks, following set seems to be working:


  # Firebase Core Flutter SDK
  firebase_core: ^0.4.5
  # Flutter plugin for Firebase Auth, enabling Android and iOS authentication using passwords, phone numbers and identity providers like Google, Facebook and Twitter.
  firebase_auth: ^0.16.1
  # Flutter plugin for Firebase Cloud Storage, a powerful, simple, and cost-effective object storage service for Android and iOS.
  firebase_storage:
    git:
      url: https://github.com/awazgyawali/flutterfire
      path: packages/firebase_storage
      ref: 5ac07af
  # Flutter plugin for Firebase Cloud Messaging, a cross-platform messaging solution that lets you reliably deliver messages on Android and iOS.
  firebase_messaging: ^6.0.16

@yanivshaked
Copy link

yanivshaked commented Aug 1, 2020

Hi,

I have noticed the following incorrect behavior when using pause/resume functionality on download operation. There is a glitch in the progress reporting due to:

  • incorrect totalBytesCount reported after resume operation (only the remainder size is reported).
  • incorrect bytesTransferred reported shortly after the resume operation (the correct size is back after a few progress events)

See following log to clarify the issue, let me know if you need more information:


I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.19667280368881546 = 14417920 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.20024867284679393 = 14680064 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2038245420047724 = 14942208 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.20740041116275085 = 15204352 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.21097628032072932 = 15466496 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2145521494787078 = 15728640 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.21812801863668624 = 15990784 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2217038877946647 = 16252928 / 73309170
I/flutter (13637): calling downloadWrapper.storageFileDownloadTask.pause
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2217038877946647 = 16252928 / 73309170
W/StorageTask(13637): unable to change internal state to: INTERNAL_STATE_IN_PROGRESS isUser: false from state:INTERNAL_STATE_PAUSING
I/flutter (13637): transferEventStream::Pause
I/flutter (13637): pause
I/flutter (13637): 2020-08-01 05:04:03.544983Z General, D: ChatViewItem: got streamed feed
I/flutter (13637): 2020-08-01 05:04:03.547224Z General, D: ChatPage: got streamed feed: 1691, 35, 131, 2020-07-31 05:51:50.299Z
I/flutter (13637): calling downloadWrapper.storageFileDownloadTask.resume
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.4505595139052863 = 33030144 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.4505595139052863 = 33030144 / 73309170
D/FileDownloadTask(13637): Resuming download file /data/user/0/<CUT_package_name>/app_flutter/videos/2020_08_01T05_03_54_078542659fb1c0-d3b4-11ea-e81e-a3ba6807d756 at 16515072
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2954042161211892 = 16777216 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3000199069980828 = 17039360 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.30463559787497635 = 17301504 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.30925128875186997 = 17563648 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.31386697962876353 = 17825792 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3184826705056571 = 18087936 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3230983613825507 = 18350080 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3277140522594443 = 18612224 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.33232974313633784 = 18874368 / 56794098

@yanivshaked
Copy link

When trying to pause the transfer on iOS, the operation fails with the following message:

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: PlatformException(pause_error, task == null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156)
<asynchronous suspension>

Is there some different setup required for iOS?
(Same codebase on Android is working)

@yanivshaked
Copy link

@awazgyawali Appreciate your help with the above two issue.

@Salakar Salakar mentioned this pull request Sep 22, 2020
22 tasks
@yanivshaked
Copy link

Dear @awazgyawali ,
I have just updated to the latest firebase_storage version (5.0.0-dev.1).
The issue I have reported below (on Aug 1st) still exists.

Is there any chance someone can attend it?
Otherwise, if you can provide me with some guidelines, I will try to fix it and submit a PR.

Thanks,
Yaniv

Hi,

I have noticed the following incorrect behavior when using pause/resume functionality on download operation. There is a glitch in the progress reporting due to:

  • incorrect totalBytesCount reported after resume operation (only the remainder size is reported).
  • incorrect bytesTransferred reported shortly after the resume operation (the correct size is back after a few progress events)

See following log to clarify the issue, let me know if you need more information:


I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.19667280368881546 = 14417920 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.20024867284679393 = 14680064 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2038245420047724 = 14942208 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.20740041116275085 = 15204352 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.21097628032072932 = 15466496 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2145521494787078 = 15728640 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.21812801863668624 = 15990784 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2217038877946647 = 16252928 / 73309170
I/flutter (13637): calling downloadWrapper.storageFileDownloadTask.pause
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2217038877946647 = 16252928 / 73309170
W/StorageTask(13637): unable to change internal state to: INTERNAL_STATE_IN_PROGRESS isUser: false from state:INTERNAL_STATE_PAUSING
I/flutter (13637): transferEventStream::Pause
I/flutter (13637): pause
I/flutter (13637): 2020-08-01 05:04:03.544983Z General, D: ChatViewItem: got streamed feed
I/flutter (13637): 2020-08-01 05:04:03.547224Z General, D: ChatPage: got streamed feed: 1691, 35, 131, 2020-07-31 05:51:50.299Z
I/flutter (13637): calling downloadWrapper.storageFileDownloadTask.resume
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.4505595139052863 = 33030144 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.4505595139052863 = 33030144 / 73309170
D/FileDownloadTask(13637): Resuming download file /data/user/0/<CUT_package_name>/app_flutter/videos/2020_08_01T05_03_54_078542659fb1c0-d3b4-11ea-e81e-a3ba6807d756 at 16515072
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2954042161211892 = 16777216 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3000199069980828 = 17039360 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.30463559787497635 = 17301504 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.30925128875186997 = 17563648 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.31386697962876353 = 17825792 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3184826705056571 = 18087936 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3230983613825507 = 18350080 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3277140522594443 = 18612224 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.33232974313633784 = 18874368 / 56794098

@awazgyawali
Copy link
Contributor Author

Dear @awazgyawali ,
I have just updated to the latest firebase_storage version (5.0.0-dev.1).
The issue I have reported below (on Aug 1st) still exists.

Is there any chance someone can attend it?
Otherwise, if you can provide me with some guidelines, I will try to fix it and submit a PR.

Thanks,
Yaniv

Hi,

I have noticed the following incorrect behavior when using pause/resume functionality on download operation. There is a glitch in the progress reporting due to:

  • incorrect totalBytesCount reported after resume operation (only the remainder size is reported).
  • incorrect bytesTransferred reported shortly after the resume operation (the correct size is back after a few progress events)

See following log to clarify the issue, let me know if you need more information:


I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.19667280368881546 = 14417920 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.20024867284679393 = 14680064 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2038245420047724 = 14942208 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.20740041116275085 = 15204352 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.21097628032072932 = 15466496 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2145521494787078 = 15728640 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.21812801863668624 = 15990784 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2217038877946647 = 16252928 / 73309170
I/flutter (13637): calling downloadWrapper.storageFileDownloadTask.pause
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2217038877946647 = 16252928 / 73309170
W/StorageTask(13637): unable to change internal state to: INTERNAL_STATE_IN_PROGRESS isUser: false from state:INTERNAL_STATE_PAUSING
I/flutter (13637): transferEventStream::Pause
I/flutter (13637): pause
I/flutter (13637): 2020-08-01 05:04:03.544983Z General, D: ChatViewItem: got streamed feed
I/flutter (13637): 2020-08-01 05:04:03.547224Z General, D: ChatPage: got streamed feed: 1691, 35, 131, 2020-07-31 05:51:50.299Z
I/flutter (13637): calling downloadWrapper.storageFileDownloadTask.resume
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.4505595139052863 = 33030144 / 73309170
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.4505595139052863 = 33030144 / 73309170
D/FileDownloadTask(13637): Resuming download file /data/user/0/<CUT_package_name>/app_flutter/videos/2020_08_01T05_03_54_078542659fb1c0-d3b4-11ea-e81e-a3ba6807d756 at 16515072
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.2954042161211892 = 16777216 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3000199069980828 = 17039360 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.30463559787497635 = 17301504 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.30925128875186997 = 17563648 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.31386697962876353 = 17825792 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3184826705056571 = 18087936 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3230983613825507 = 18350080 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.3277140522594443 = 18612224 / 56794098
I/flutter (13637): _progress = event.bytesTransferred / event.totalByteCount => 0.33232974313633784 = 18874368 / 56794098

@yanivshaked This PR has not been merged, @Salakar and the team re worked on the plugin and introduced the download progress feature.

May be he can help you with this.

@awazgyawali awazgyawali closed this Oct 1, 2020
@yanivshaked
Copy link

Dear @Salakar,
Maybe you can help with this issue, I have opened a bug report.

Thanks,
Yaniv

@firebase firebase locked and limited conversation to collaborators Nov 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants