FlutterFcmService("number"): Fatal: failed to find callback

Viewed 4408

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...

2 Answers

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

Replace GeneratedPluginRegistrant.registerWith(registry); with

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

Please check this code

Related