6

I am using firebase_messaging: ^6.0.16 package, and I did everything that was required of me, and after I sending the firebase message, I got this error :

FlutterFcmService(12133): Fatal: Failed to find callback

I searched for this issue but got nothing

I found one solution but it did not help me, solution

any help, thank you...

farouk osama
  • 2,374
  • 2
  • 12
  • 30

2 Answers2

3

Following this answer helped me solve the issue: https://stackoverflow.com/a/64483134/2931049

Please note the onBackgroundMessage part. Not implementing it as well as the others gave me the Failed to find callback error

Yumi H
  • 129
  • 1
  • 10
1

Replace GeneratedPluginRegistrant.registerWith(registry); with

FirebaseMessagingPlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));

Please check this code

Vettiyanakan
  • 7,957
  • 6
  • 37
  • 55