Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 425
farouk osama Avatar asked Jul 14 '20 19:07

farouk osama


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

like image 113
Yumi H Avatar answered Oct 12 '22 20:10

Yumi H


Replace GeneratedPluginRegistrant.registerWith(registry); with

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

Please check this code

like image 35
Vettiyanakan Avatar answered Oct 12 '22 19:10

Vettiyanakan