expo: [expo-background-fetch] Background fetch is not running
đ Bug Report
Summary of Issue
Hi everyone, Iâm writing this issue because expo-background-fetch doesnât work with my project.
Environment
Expo CLI 3.24.2 environment info:
System:
OS: macOS 10.15.6
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.19.0 - ~/.nvm/versions/node/v10.19.0/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.7 - ~/.nvm/versions/node/v10.19.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6241897
Xcode: 11.6/11E708 - /usr/bin/xcodebuild
npmGlobalPackages:
expo-cli: 3.24.2
Reproducible Demo
Iâve created a little project which is here.
Itâs a little app which uses some chunks of code that Iâve seen in this issue.
Expected Behavior vs Actual Behavior
My task function doesnât work whereas I initialized the tasks.
console.log(
"Task is running in background each ",
INTERVAL_TASKS,
" seconds."
);
I also try to switch between my actuel version of the npm package to the latest (8.4.0). It doesnât change
"dependencies": {
"expo": "~38.0.8",
"expo-background-fetch": "~8.3.0",
"expo-status-bar": "^1.0.2",
"expo-task-manager": "~8.3.0",
"react": "~16.11.0",
"react-dom": "~16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-web": "~0.11.7"
},
Any guesses to solve this issue ?
Thanks for your help.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 27 (14 by maintainers)
@ppulwey try to do
expo upgradeI just did that and it resolved my issue in #11866I still have that issue for iOS. Android works perfectly fine, but iOS wonât fire the fetch event when the app is backgrounded. Does anyone have a solution for this situation?
weâre still having problem with it om IOS. our application can works in offline mode and we need to send some data to the backend when the app is in the background and the internet is available. but as I can see IOS doesnât allow us to send several requests to the backend in background. Is there anyone there who has figured this out?
Push notifications should work (but I didnât try), but not in China for Android which is why I had to go through alternatives that do not involve Google. Another alternative I tried but failed was https://pushy.me/ but that does not work in Expo https://github.com/pushy-me/pushy-react-native/issues/61
Yes itâs required by the docs.