Getting ReactNativeFirebaseMessagingHeadlessTask Error #5376
Unanswered
anilkumar2273702
asked this question in
Q&A
Replies: 1 comment 2 replies
-
It sounds like you have not integrated react-native-firebase correctly somehow. the ReactNativeFirebaseMessagingTask is added automatically for you I think during this module's startup sequence. In your code you are simply passing it a method to call? https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh - example of proper / basic integration |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm getting the following error - WARN No task registered for key ReactNativeFirebaseMessagingHeadlessTask
// index.js
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import 'react-native-gesture-handler';
export async function firebaseBackgroundMessage(message) {
console.log(message);
return Promise.resolve();
}
AppRegistry.registerComponent(appName, () => App);
AppRegistry.registerHeadlessTask(
'RNFirebaseBackgroundMessage',
() => firebaseBackgroundMessage,
);
I have done the above code in index.js, but still getting errors. When I open a notification from the background in Android mobile.
Beta Was this translation helpful? Give feedback.
All reactions