Skip to content
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

Fetch trapped in pending forever if app goes into the background #26

Open
kgillespieatmosphere opened this issue Feb 17, 2021 · 1 comment

Comments

@kgillespieatmosphere
Copy link

This is a common issue I have experienced trying to get any sort of HTTP request to work while the app is in the background.

I am using a plugin call https://github.com/transistorsoft/cordova-plugin-background-fetch to execute a little code every once in a while that goes out and fetches some data via our API.

The problem is when the app is placed into the background these fetches are stuck in "pending" until the app get foreground again. I can see this through the chrome debugger.

I have only had one plugin that actually can perform HTTP API requests successfully while the app is running in the background however it had it's own issues.

Any idea how it could be made possible to get requests to work while the app is in the background?

@kgillespieatmosphere
Copy link
Author

Ah forget this. Apparently I expected that fetch was suppose to get polyfilled but I just need to call cordovaFetch and I can get it working even in the background

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant