Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Invalid call promise-resolve on cancel download on Android #176

@raminious

Description

@raminious
const task = new RNFetchBlob
  .config({
    addAdnroidDownloads: {
      useDownloadManager: true,
      notification: true,
      mediaScannable: true
    },
    timeout: 15000,
    overwrite: startByte == 0,
    fileCache : true,
    path: filepath
})
.fetch('GET', link, headers)

return await task
.progress({ interval: 1000 }, (received, total) => {})
.then(function success(res) {
    console.log(res.path())
}, function error(e) => {
    console.log(e)
})

When I do task.cancel() success function triggeres.
This no happens on iOS but Android
I think this is bug, cuz when you cancel download action, should not resolve the promise

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions