question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[expo-background-fetch] Background fetch is not running

See original GitHub issue

šŸ› 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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:25 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
trajanocommented, Feb 8, 2021

@ppulwey try to do expo upgrade I just did that and it resolved my issue in #11866

1reaction
trajanocommented, Feb 7, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

IOS background fetch never runs - Expo SDK - Forums
Expo runs on Android, iOS, and the web. It has a BackgroundFetchScreen that has what I need and I was not able to...
Read more >
expo-background-fetch not working after reboot on newer ...
run the app and click 'Register background task ' Ā· try if it works while the app is in the background (it should)...
Read more >
Background Fetch is not working in real iOS devices
Background fetching is working properly in Simulator and http request reaches in the server. But background fetches not at all working in the...
Read more >
expo-background-fetch - npm
Start using expo-background-fetch in your project by running `npm i expo-background-fetch`. There are 7 other projects in the npm registryĀ ...
Read more >
Top 5 expo-background-fetch Code Examples - Snyk
To help you get started, we've selected a few expo-background-fetch examples, ... Use Snyk Code to scan source code in minutes - no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found