You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The upload of a file does not continue correctly after killing and restarting the app.
Steps to reproduce the error
Start TUSKitExample and select a large file to upload (e.g. 150MB)
Go to the iOS home screen and close the app with the swipe gesture
Restart TUSKitExample. The upload will not be continued
Close TUSKitExample again and restart it. The upload will now continue.
Tested with iOS 18.3
Unfortunately, the error is not forwarded to the TUSClientDelegate so that the user is not aware of it.
Short analysis
The following method is called within Self.tusClient.start(): api.checkTaskExists and then session.getAllTasks. session.getAllTasks returns the previous task even after a kill of the app.
completion(hasTask) therefore returns true.
However, the task immediately ends in a failed. However, the error is not passed to the user at this point:
class: TUSClient.swift Method: reregisterCallbacks
self.api.registerCallback({ result in
task.taskCompleted(result: result, completed: { _ in })
}, forMetadata: metadata)
The error here is the following: failure(TUSKit.TUSClientError.couldNotUploadFile(underlyingError: TUSKit.TUSAPIError.underlyingError(Error Domain=NSURLErrorDomain Code=-999 "(null)" UserInfo={NSURLErrorBackgroundTaskCancelledReasonKey=0, NSErrorFailingURLStringKey=myurl, NSErrorFailingURLKey=myurl, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"BackgroundUploadTask <7B808DB7-FC94-48A5-B803-B749BD220559>.<4>",
"LocalUploadTask <7B808DB7-FC94-48A5-B803-B749BD220559>.<4>"
), _NSURLErrorFailingURLSessionTaskErrorKey=BackgroundUploadTask <7B808DB7-FC94-48A5-B803-B749BD220559>.<4>})))
It would be good if the error also ends up in the TUSClientDelegate or the error is handled internally so that the upload is continued.
The text was updated successfully, but these errors were encountered:
The upload of a file does not continue correctly after killing and restarting the app.
Steps to reproduce the error
Tested with iOS 18.3
Unfortunately, the error is not forwarded to the
TUSClientDelegate
so that the user is not aware of it.Short analysis
The following method is called within
Self.tusClient.start()
:api.checkTaskExists
and thensession.getAllTasks
.session.getAllTasks
returns the previous task even after a kill of the app.completion(hasTask) therefore returns
true
.However, the task immediately ends in a
failed
. However, the error is not passed to the user at this point:The error here is the following:
failure(TUSKit.TUSClientError.couldNotUploadFile(underlyingError: TUSKit.TUSAPIError.underlyingError(Error Domain=NSURLErrorDomain Code=-999 "(null)" UserInfo={NSURLErrorBackgroundTaskCancelledReasonKey=0, NSErrorFailingURLStringKey=myurl, NSErrorFailingURLKey=myurl, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"BackgroundUploadTask <7B808DB7-FC94-48A5-B803-B749BD220559>.<4>",
"LocalUploadTask <7B808DB7-FC94-48A5-B803-B749BD220559>.<4>"
), _NSURLErrorFailingURLSessionTaskErrorKey=BackgroundUploadTask <7B808DB7-FC94-48A5-B803-B749BD220559>.<4>})))
It would be good if the error also ends up in the
TUSClientDelegate
or the error is handled internally so that the upload is continued.The text was updated successfully, but these errors were encountered: