Sdwebimage: iOS 12 NSLocalizedDescription=已取消} [-999]

Created on 21 Sep 2018  ·  7Comments  ·  Source: SDWebImage/SDWebImage

在iOS12 上使用http 或 使用SDWebImageRefreshCached 的时候会频繁出现
_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <2598BFA1-B359-4A5D-964D-AB00F62F3D1E>.<21>, NSLocalizedDescription=已取消} [-999]

stale usage

Most helpful comment

@JKjiangnan Do you use UITableView or UICollectionView? because cell or imageView would be reused, so if we get a cell from reuse queue and set a new image url, we would cancel the download task of previous image, so these cancellation logs would be appear, do you faced any issue besides these annoying logs?

All 7 comments

@JKjiangnan Can you describe the issue you have in English?

CC @dreampiggy @zhongwuzw for chinese :)

@JKjiangnan Do you use UITableView or UICollectionView? because cell or imageView would be reused, so if we get a cell from reuse queue and set a new image url, we would cancel the download task of previous image, so these cancellation logs would be appear, do you faced any issue besides these annoying logs?

He means when using http or SDWebImageRefreshCached in iOS 12, there will be frequtelly NSURLErrorCancelled (-999) error.

But however, there are no any different in my test on iOS 12 simulator && real device.

@JKjiangnan If you means you will see some logs in the console output, it's the standard output for Apple's URLSesson framework, each time you call NSURLSessonTask.cancel() on it.

You can just ignore it, using some tricks like https://stackoverflow.com/questions/37800790/hide-strange-unwanted-xcode-logs. Because from Xcode 8, Apple 's own framework using OSLog, they all output to the same console and save it into the same log files (OS_LOG_DEFAULT)

@zhongwuzw Thanks for your translation

@dreampiggy Yes, except for these logs, everything else can be used normally, but before iOS12, there would be no such logs.
And I will try your suggestion, thanks.

@bpoplauschi Sorry, I will describe it in English next time. -_-

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings