question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fatal: failed to find callback

See original GitHub issue

Recently I upgraded this plugin and got this error:

E/DownloadWorker( 7363): Fatal: failed to find callback

I had followed the instruction to set up the codes on Android and iOS, on Flutter side I used a wrapper and the implementation like:

...
static void downloadCallback(String id, DownloadTaskStatus status, int progress) {
    if (taskFuncMap.containsKey(id)) {
      if (status == DownloadTaskStatus.complete) {
        taskFuncMap[id](STATUS_COMPLETE);
      } else if (status == DownloadTaskStatus.failed) {
        taskDirMap[id].delete(recursive: true);
        taskFuncMap[id](STATUS_FAILED);
      }
    }
  }

  Downloader._internal() {
    FlutterDownloader.registerCallback(downloadCallback);
  }

Could someone give me some hints to figure out this issue? Thank you!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chainzhangcommented, Oct 18, 2019

@hnvn Sorry, I found that I forgot calling FlutterDownloader.initialize() before running the App instance. I didn’t know that it’s required. It would be nice to indicate this usage in the document. Anyway, thanks for making this awesome plugin.

await FlutterDownloader.initialize();
runApp(App());

@alanmlira @mrdong916 I Hope it helps.

1reaction
alanmliracommented, Oct 18, 2019

I’m receiving this same problem:

I/flutter (27378): Download task is enqueued with id(7c2cb95b-4f71-431b-9248-d3f752516f4c)
I/flutter (27378): downloadFile.taskId: 7c2cb95b-4f71-431b-9248-d3f752516f4c
E/DownloadWorker(27378): Fatal: failed to find callback
D/skia    (27378): --- SkAndroidCodec::NewFromStream returned null
D/skia    (27378): --- SkAndroidCodec::NewFromStream returned null
D/skia    (27378): --- SkAndroidCodec::NewFromStream returned null

PS: Testing on the example project in this repository works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

firebase-messaging - Fatal: failed to find callback
Make sure you kill the app on your emulator so it is not running in the background. And now try sending a notification...
Read more >
[firebase_messaging] Error "Fatal: failed to find callback" is ...
[firebase_messaging] Error "Fatal: failed to find callback" is logged even if no background message handling is needed #180.
Read more >
firebase-messaging - Fatal: failed to find callback-Flutter
When I was trying to send a notification from the firebase console just to test my app receives notifications, I also encountered the...
Read more >
E/FlutterFcmService(23708): Fatal: failed to find callback
Flutter Nepal | E/FlutterFcmService(23708): Fatal: failed to find callback. Notification Channel metadata in AndroidManifest. Default value will be used.
Read more >
Flutter fcm service fatal failed to find callback - Casale Giacinta
Fatal: failed to find callback. They are intended, among other things, to enable the creation of effective offline experiences, intercept network requests ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found