flutter_cache_manager icon indicating copy to clipboard operation
flutter_cache_manager copied to clipboard

Connection closed while receiving data

Open AlexandreMaillot opened this issue 2 years ago • 1 comments

🐛 Bug Report

When using the downLoadWithProgress function to download a file with a specific URL, an "Connection closed while receiving data" error is triggered

Expected behavior

I expected the downLoadWithProgress function to successfully download the file from the provided URL without generating an error.

Reproduction steps

Call the downLoadWithProgress function with appropriate parameters, including filePathUrl and key. Wait for the download to be in progress and observe the steps.

Configuration

Version: 3.3.1

Stream<FileResponse> downLoadWithProgress({ required String filePathUrl, required String key, }) async* { try { final url = await _cachedFirestorage.getDownloadURL( mapKey: key, filePath: filePathUrl, ); final fileStream = _defaultCacheManager.getFileStream( url, withProgress: true, key: key, ); await for (final fileResponse in fileStream) { yield fileResponse; } } catch (e) { debugPrint(e.toString()); throw e.toString(); yield DownloadFailed(filePathUrl); } }

Platform:

  • [ ] :iphone: iOS
  • [X ] :robot: Android

AlexandreMaillot avatar Aug 29 '23 05:08 AlexandreMaillot

Were you able to solve it?

jerrypaulsam avatar Nov 13 '23 17:11 jerrypaulsam