-
Notifications
You must be signed in to change notification settings - Fork 193
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
[Getting this warning] "No task registered for key BackgroundFetch" #503
Comments
Why are you registering a headlessTask within a
the docs for Config.enableHeadless instruct that a headlessTask is to be added directly to the a warning showing TaskTimeout means that a task has timed out, where |
Thank you for quick response. I will make the necessary changes to remove out of useEffect. and Does "No task registered for key BackgroundFetch" means task timeout? |
There is no possible way that a headlessTask can operate correctly when registered within a useEffect block. All other queries about any warnings received are moot. |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
I have registered a headless task in my index.js to run when app is terminated on android along with BackgroundFetch.configure(code shown below) and receiving the below warning message.
WARN No task registered for key BackgroundFetch
Your Environment
Plugin version: "react-native-background-geolocation": "^4.14.6",
Platform: iOS and Android
OS version: Android >=9, iOS >= 15
Device manufacturer / model: Tested on iPhone 15 pro, Mi A1
React Native version (react-native -v): Expo 50.0.18
Expected Behavior
Expecting the app to save the current location to local storage even when app is terminated.
Actual Behavior
Giving "No task registered for key BackgroundFetch" warning when app is terminated
Steps to Reproduce
Context
Debug logs
screenshot when app is terminated for a while and opened again after receiving the warning:
The text was updated successfully, but these errors were encountered: