Thank you for your support on this Quinn. I just so happened to run in to the scenario where the taskDescription is nil this morning. Just before it I see the following logged (this looks to be by iOS):
Task <39EBDA50-1653-4B16-B5FC-FBC1CDE9B130>.<462> finished with error [-1000] Error Domain=NSURLErrorDomain Code=-1000 "bad URL" UserInfo={_kCFStreamErrorCodeKey=22, _NSURLErrorFailingURLSessionTaskErrorKey=BackgroundUploadTask <39EBDA50-1653-4B16-B5FC-FBC1CDE9B130>.<462>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"BackgroundUploadTask <39EBDA50-1653-4B16-B5FC-FBC1CDE9B130>.<462>",
"LocalUploadTask <39EBDA50-1653-4B16-B5FC-FBC1CDE9B130>.<462>"
), NSLocalizedDescription=bad URL, _kCFStreamErrorDomainKey=1, NSErrorFailingURLStringKey=https://my-subdomain.on.company.com/event/pack, NSErrorFailingURLKey=https://my-subdomain.on.company.com/event/pack}
This is the same error passed in to URLSessionTaskDelegate.urlSession(_:task:didCompleteWithError:).
I can't see anything wrong with this URL though. The value of task.currentRequest?.url?.absoluteString is https://my-subdomain.on.company.com/event/pack so URL at least thinks it's valid.
Until I can recreate the actual crash I don't know if this scenario is a red herring or not.
In an attempt to provide as much as I can here I've already attached the output of p task.
p task.txt
Topic:
App & System Services
SubTopic:
Networking
Tags: