flutter_downloader icon indicating copy to clipboard operation
flutter_downloader copied to clipboard

Maximum concurrent tasks option doesn't work in iOS, when going offline download task doesn't fail

Open bshankar-coder opened this issue 3 years ago • 4 comments
trafficstars

Maximum concurrent tasks option in iOS not working, flutter downloader downloads all items. When going offline mode downloading tasks not failing in iOS.

Steps to reproduce the behavior:

Used the example given by flutter_downloder plugin, did the configuration mentioned in flutter_downloader plugin iOS integration section from https://pub.dev/packages/flutter_downloader.

  1. Added example.
  2. Setup iOS config - Enable background mode, Added sqlite library, configured App Delegate, Disabled ATS completely, Configured maximum number of concurrent tasks to be 2.
  3. Clicked on multiple items to download.
  4. More than 2 items downloading at a time. (All of them)
  5. Switched off internet.
  6. Running downloads halted.
  7. Came back online downloads starts running again.

Expected behavior

Maximum concurrent tasks should work as it works for Android. In this case only 2 items must download others must remain in queue. Like Android when going offline downloads must fail.

Screenshots Screenshot 2022-07-11 at 5 53 44 PM

Device information:

  • Device: [iPhone 13 Pro - Simulator]
  • OS: [iOS 15.2]
  • plugin version [v1.7.2]

Additional context

Output of flutter doctor -v

[✓] Flutter (Channel stable, 2.10.2, on macOS 12.2.1 21D62 darwin-arm, locale en-IN)
    • Flutter version 2.10.2 at /Users/[email protected]/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 097d3313d8 (5 months ago), 2022-02-18 19:33:08 -0600
    • Engine revision a83ed0e5e3
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/[email protected]/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] VS Code (version 1.68.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.40.0

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554                        • android-arm64  • Android 12 (API 31) (emulator)
    • iPhone 13 Pro (mobile)      • 1EE2C303-EE3A-4368-89E8-313046FB03DF • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)
    • Chrome (web)                • chrome                               • web-javascript • Google Chrome 103.0.5060.114

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

bshankar-coder avatar Jul 11 '22 13:07 bshankar-coder

+1

hemachandsai avatar Jul 12 '22 11:07 hemachandsai

+1

vinuthna-tricon avatar Jul 12 '22 13:07 vinuthna-tricon

+1

vishwajitrkt avatar Jul 12 '22 14:07 vishwajitrkt

+1 quite critical for my case since it is causing ext services to go 403

deckikwok avatar Jul 18 '22 02:07 deckikwok

Hi, thanks for the report. I confirm I can reproduce this problem. I hope to find some time to work on the fix, but no promises, unfortunately :)

Maximum concurrent tasks option in iOS not working, flutter downloader downloads all items. When going offline mode downloading tasks not failing in iOS.

Are these 2 independent issues?

bartekpacia avatar Aug 17 '22 10:08 bartekpacia

Just found out that this is the duplicate of #332. Please continue the discussion there.

bartekpacia avatar Aug 18 '22 20:08 bartekpacia

Hi, thanks for the report. I confirm I can reproduce this problem. I hope to find some time to work on the fix, but no promises, unfortunately :)

Maximum concurrent tasks option in iOS not working, flutter downloader downloads all items. When going offline mode downloading tasks not failing in iOS.

Are these 2 independent issues?

Yes there are two issues, one being about concurrency and other is when we go offline in Android downloads fail but in iOS this it doesn't.

bshankar-coder avatar Aug 20 '22 05:08 bshankar-coder