Was getting the following errors when calling AVAssetImageGenerator generateCGImagesAsynchronously. The stream in question was an HLS stream. When I switched to using the AVURLAsset of an MP4, the error disappeared.
With Apple-supplied HLS stream:
Error Domain=AVFoundationErrorDomain Code=-11819 "Cannot Complete Action" UserInfo={NSLocalizedRecoverySuggestion=Try again later., NSLocalizedDescription=Cannot Complete Action, NSUnderlyingError=0x1c0057850 {Error Domain=NSOSStatusErrorDomain Code=-12178 "(null)"}}
With another HLS stream generated by a video hosting provider:
Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12436), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x1c4a57e20 {Error Domain=NSOSStatusErrorDomain Code=-12436 "(null)"}}