fluttercommunity / fluttercommunity/flutter_downloader

Downloading fails often in android 10.

Open
#965 2 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
940
Forks
561
Avg merge
1h 18m
Merged PRs (30d)
1

Description

Everytime I try to download using flutter downloader package.

Always this error shows up in the condole.
"D/DownloadWorker( 2768): Update too frequently!!!!, but it is the final update, we should sleep a second to ensure the update call can be processed
"

This is how my downloadCallBack function looks like.

@pragma('vm:entry-point')
static void downloadCallback(String id, int status, int progress) {
print(
'Background Isolate Callback: task ($id) is in status ($status) and process ($progress)');
final SendPort? send =
IsolateNameServer.lookupPortByName('downloader_send_port');
send?.send([id, status, progress]);
}

and this function, I have called it in the initState().

void _bindBackgroundIsolate() {
IsolateNameServer.registerPortWithName(
port.sendPort, 'downloader_send_port');
port.listen((dynamic data) {
// String id = data[0];
status = data[1];
progress = data[2];
setState(() {});
});
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the download on Android 10 and inspect the DownloadWorker log around the final update. Then trace the downloadCallback and _bindBackgroundIsolate entry points shown in the report, checking whether the callback data reaches the listener. Done means identifying the cause of the failed downloads and confirming a successful download with the callback still updating progress.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.