-
Notifications
You must be signed in to change notification settings - Fork 1.6k
How to cancel the HTTPS Request Download #268
Comments
@leo403771872 , does it happens on both IOS and Android? |
@wkh237 Yes, both iOS and Android happen. Log says it' not a function |
Could you provide a code snippet about how you use it? Please also refer to #256 and try if the solution works for you 👍 |
I can replicate this issue on my end now, the cause is that when calling task.cancel() native context does not add the session to request table yet. I've applied a fix at 0b6beae. Please try to upgrade your package from the branch
|
I have exactly the same code, as shown in #256, upgraded to the fix-268 but still get the error |
Still experiencing this on |
Okay, I can confirm that on Android when either |
I have pushed a fixed version to branch |
Hello! Tried branch If I use "useDownloadManager" it does not. And |
@kesha-antonov , thanks for verifying this for us, will look into the issue 👍 |
Still never going to |
Still getting task.cancel is not a function using 0.10.9 branch installed from github. I am using eventChannel from redux-saga which requires a function callback to end the process. EDIT: My issue was not related to this issue, it was eventChannel using task.cancel when task was was already completed. I updated to check if the cancel function exists first: |
* upstream/0.10.9: Fixed problem with type casting (wkh237#513) My proposed 0.10.9 changes (wkh237#489) wkh237#268 Cancelled task should not trigger `then` promise function Add ability to cancel android DownloadManager fetches (wkh237#502) Fix iOS initialization race condition (wkh237#499) prevent UIApplication methods from being called on background thread (wkh237#486) Implemenet fs.hash() -- wkh237#439 "Feature: Calculate file hash" (wkh237#476) I forgot one error string for the Android readFile() method (wkh237#475) Fix for wkh237#467 (wkh237#472) Fix for issue wkh237#468, wkh237#461, wkh237#460 and minor cleanup (wkh237#469)
It's ok to stop HTTP Request Download By the function cancel().
However I use the function cancel() to stop a HTTPS Download but crash.
Log is RCTFatalException: Unhandled JS Exception: u.cancel is not a function. (In 'u.cancel()', 'u.cancel' is undefined).
Is this function cann't stop Https Download?
The text was updated successfully, but these errors were encountered: