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

Download stays locked in pending when provided slow responding download link #22

Open
3 tasks done
Cereser01 opened this issue May 14, 2024 · 1 comment
Open
3 tasks done

Comments

@Cereser01
Copy link

Cereser01 commented May 14, 2024

Is this a bug report, a feature request, or a question?

Bug

Have you followed the required steps before opening a bug report?

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

I've only experienced and been able to reproduce it on Android.

Is the bug related to the native implementation? (NSURLSession on iOS and Fetch on Android)

Not that I've been able to detect.

Environment

Environment:
React: 18.2.0
React native: 0.74.0
react-native-background-downloader: ^3.1.2
Node: 18
Java: 17

Target Platform:
Android (34.0)

Expected Behavior

The file should correctly download after the URL responds.

Actual Behavior

The download is permanently in a state of "Pending" and never finishes.

Steps to Reproduce

The following repository contains a basic app to recreate the issue:
https://github.com/Cereser01/wdvcamerapoc

How to reproduce using the app from the above repository:

  1. Pull the code from the above repository.
  2. Run npm install.
  3. Run react-native run-android (if using McAfee Anti-virus, add --port=1234)
  4. Click "Toggle Job URL" so that the "Problematic URL" is selected.
  5. Press "Attempt download"
  6. Note that parameters are correctly being fed into the 'download' function from react-native-background-downloader
  7. Note that the download will forever stay at a pending state.

How to reproduce from scratch:

  1. Create an app and install react-native-background-downloader.
  2. Import {download} from '@kesha-antonov/react-native-background-downloader'.
  3. Feed the url https://www.weg.net/campaigns/dw/ to the download function.
  4. Run the function.
  5. Note that the download will forever stay at a pending state.

Relevant information

The problematic URL takes 2 to 6 minutes to respond after being called.

@RanderGabriel
Copy link

I am having the same problem. Cereser01, were you able to resolve the issue?

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

2 participants