kesha-antonov / react-native-background-downloader

About A library for React-Native to help you download large files on iOS and Android both in the foreground and most importantly in the background.
https://www.npmjs.com/package/@kesha-antonov/react-native-background-downloader
Other
26 stars 3 forks source link

iOS: taskConfig is randomly nil #19

Open uzegonemad opened 2 weeks ago

uzegonemad commented 2 weeks ago

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

Bug Report

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?

iOS 17.4.1 (physical device) (I haven't tested it on Android yet, but I will update this issue if I experience it on Android.)

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

I'm unsure but I believe it's native RNBGD code.

Environment

Environment:

  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.5
    wanted: 0.73.5
"@kesha-antonov/react-native-background-downloader": "^3.1.2"

Expected Behavior

When a task finishes downloading, taskConfig should not be nil.

Actual Behavior

Randomly, all download tasks have a nil taskConfig. See here for reference

I discovered this because my downloads randomly aren't progressing (no downloadProgress event). To identify this, I added some additional debugging and checked the logs, and confirmed

Steps to Reproduce

I'm honestly not sure. I haven't been able to identify reproducible steps. I don't know if MMKV isn't persisting correctly or if there is some other issue.

If I'm able to identify reproducible steps I'll update here.

When this happens, closing & relaunching the app typically fixes the problem.