flutter_downloader icon indicating copy to clipboard operation
flutter_downloader copied to clipboard

Backoff delay duration less than minimun value

Open shinewanna opened this issue 5 years ago • 12 comments

I/flutter (22850): fM-7nvr1QVU I/flutter (22850): download url=https://r2---sn-uphho-gboe.googlevideo.com/videoplayback?expire=1548715101&itag=140&keepalive=yes&requiressl=yes&ei=_S9PXNCuIKq4owOE_LbQDQ&pl=24&mime=audio%2Fmp4&id=o-AJRfzTnDCLzSYSkPNys-5Kr8XhuWZhkfvP-R026xZ71I&ms=au%2Crdu&fvip=3&mv=m&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&mt=1548693408&mn=sn-uphho-gboe%2Csn-30a7rn7z&mm=31%2C29&ip=65.18.120.148&gir=yes&key=yt6&ipbits=0&lmt=1541140746832930&txp=3533432&c=WEB&dur=198.251&clen=3209191&initcwndbps=187500&source=youtube&signature=AB349683662325AD53F2FEE9B39A9A4A60055424.9D51829BD4248011B9911F4244205D42C3013AFB W/WM-WorkSpec(22850): Backoff delay duration less than minimum value I/flutter (22850): Download task is enqueued with id(a29b6b9f-c688-4b95-8cbe-20ff4c864a05) I/WM-WorkerWrapper(22850): Worker result RETRY for Work [ id=a29b6b9f-c688-4b95-8cbe-20ff4c864a05, tags={ vn.hunghd.flutterdownloader.DownloadWorker, flutter_download_task } ]

shinewanna avatar Jan 28 '19 16:01 shinewanna

It seems that your internet connection is in high latency

hnvn avatar Jan 29 '19 09:01 hnvn

That happens because you use some thing that uses Android's WorkManager internally. Here is the code:

    /**
     * The minimum backoff time for work (in milliseconds) that has to be retried.
     */
    public static final long MIN_BACKOFF_MILLIS = 10 * 1000; // 10 seconds.

/**
     * @param backoffDelayDuration The backoff delay duration in milliseconds
     */
    public void setBackoffDelayDuration(long backoffDelayDuration) {
        if (backoffDelayDuration > MAX_BACKOFF_MILLIS) {
            Logger.get().warning(TAG, "Backoff delay duration exceeds maximum value");
            backoffDelayDuration = MAX_BACKOFF_MILLIS;
        }
        if (backoffDelayDuration < MIN_BACKOFF_MILLIS) {
            Logger.get().warning(TAG, "Backoff delay duration less than minimum value");
            backoffDelayDuration = MIN_BACKOFF_MILLIS;
        }
        this.backoffDelayDuration = backoffDelayDuration;
    }

Nothing critical, but you should know, that test will be restarted not earlier than in 10 seconds.

Gaket avatar Feb 25 '19 21:02 Gaket

I have this problem, too.Do you know why?

jlcool avatar May 02 '19 07:05 jlcool

It's like a simulator problem. It's OK to use the real machine.

jlcool avatar May 02 '19 07:05 jlcool

Loop Loop Download Is Problem

jlcool avatar May 02 '19 08:05 jlcool

same problem

W/WM-WorkSpec(20061): Backoff delay duration less than minimum value
I/flutter (20061): Download task is enqueued with id(b7bfe4de-b002-41bf-809f-46e1728cace3)
I/flutter (20061): b7bfe4de-b002-41bf-809f-46e1728cace3
I/flutter (20061): 0
I/zygote64(20061): Do partial code cache collection, code=29KB, data=26KB
I/zygote64(20061): After code cache collection, code=29KB, data=26KB
I/zygote64(20061): Increasing code cache capacity to 128KB


W/WM-WorkSpec(20061): Backoff delay duration less than minimum value
I/flutter (20061): Download task is enqueued with id(823f0124-fdbb-45f5-b5d5-90b2911b6f9f)
I/flutter (20061): 823f0124-fdbb-45f5-b5d5-90b2911b6f9f
I/flutter (20061): 0

there aren't any DownloadWorker show, it just stuck there.

yuxizhe avatar Sep 24 '19 13:09 yuxizhe

The problem is in FlutterDownloaderPlugin.java at line 119:

.setBackoffCriteria(BackoffPolicy.EXPONENTIAL, 5, TimeUnit.SECONDS)

Meanwhile, the minimum value is 10 seconds, as stated by @Gaket

yamsergey avatar Feb 09 '20 17:02 yamsergey

Any solution?

AhmedNourJamalElDin avatar Sep 10 '20 08:09 AhmedNourJamalElDin

I have the same issue in andorid smulator, but it works in real device.

dotw avatar Nov 19 '20 13:11 dotw

I am experiencing the same issue, my app closes itself whenever I try downloading anything.

the-genius-man avatar Jun 25 '21 17:06 the-genius-man

Same I think it is due to the Android version I am using? I think enabling something in AndroidManifest.xml would fix a similar issue, but it's been so long I don't remember at all

some legacy option that's all I know.. Google needs to stop changing APIs so fast :/

W/WM-WorkSpec( 6378): Backoff delay duration less than minimum value
I/flutter ( 6378): Fatal: could not find callback
F/libc    ( 6378): FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x74843d4680)
F/libc    ( 6378): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 6464 (1.ui), pid 6378 (rix.renti.renti)
Lost connection to device.

nonetrix avatar Sep 01 '21 01:09 nonetrix

Is there anyone fixed this issue? It happen in my old device.

shinewanna avatar Jan 20 '22 15:01 shinewanna