NSURLSessionDataTask should not log cancellation to debugger console. This is confusing for customers of SDKs and causes support overhead.

Originator:steipete
Number:rdar://36175576 Date Originated:21-Dec-2017 12:14 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 11 and above
Classification:UI/Usability Reproducible:Always
 
Summary:
This is a duplicate of radar #36156990

When cancelling an `NSURLSessionDataTask`, it typically logs this to the debugger console. It really shouldn’t do that, especially if the session’s delegate implements `-[<NSURLSessionDelegate> URLSession:task:didCompleteWithError:]`.


Steps to Reproduce:
- Build and run any of the schemes in the attached sample project
- make sure you can see the debugger console, and tap on the “Make Request” button

Expected Results:
If you have a working internet connection, and our website isn’t down, you shouldn’t see _anything_ logged to the console.

Actual Results:
For every tap on the button, you a line like the following is logged to the console:

2017-12-20 17:33:26.708636+0100 Task Force Swift[32801:407445] Task <E9222022-EA65-4105-8AD1-863F9ACB2C64>.<7> finished with error - code: -999

Version/Build:
iOS 11 and above

Version:
iOS 11 and above

Notes:
Sample: https://github.com/PSPDFKit-labs/radar.apple.com/tree/master/36156990%20-%20NSURLSessionDataTask%20should%20not%20log%20cancellation%20to%20debugger%20console

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!