New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No task registered for key ReactNativeFirebaseMessagingHeadlessTask #1454
Comments
ready!!. I solved the problem, what happens is that in the steps described here, said, install Firebase correctly, I installed the Firebase along with the component @react-native-firebase/messaging, that's why I gave the error "No task registered for key ReactNativeFirebaseMessagingHeadlessTask", and I uninstall the package "@react-native-firebase/messaging" and now if it works well remote notifications |
@luigbren Were you able to receive the notification response for the notification received when the app was in the quit state? |
I solved it as follows: // index.js import App from './App'; messaging().setBackgroundMessageHandler(async remoteMessage => { AppRegistry.registerComponent(appName, () => App); This is because we have to validate when the push message arrives in the background in the app |
I solved this by adding: messaging().onMessage(onMessageReceived); in index.js instead of App.js and use react-native-notify library to show notification locally. import notifee, {AndroidImportance, EventType} from '@notifee/react-native'; async function onMessageReceived(message) { messaging().onMessage(onMessageReceived); AppRegistry.registerComponent(appName, () => App); |
Question:
Hello friends, I'm configuring the remote notifications with Firebase, when I receive a notification with the app closed! and I open the app I get that error in yellow (No task registered for key ReactNativeFirebaseMessagingHeadlessTask), if I have the app open and I get a notification, everything is normal, I do not get any error...
my AndroidManifest
my App.js TEST
The text was updated successfully, but these errors were encountered: