AVFoundation error -11829 "Cannot Open" (random-ish fail on same url)

trying to use AVPlayer on a remote (https:) mp4 file. randomly we get the above error on the exact same url. works fine on other urls. sometimes works on the failing url. no clue what is going on. "cannot open" is not a descriptive error message. the url plays fine in a browser. the random fail happens on some other URLs also. is there some way we can get more detailed error notes on what is causing the failure? using latest ios15.x update on iphone12 mini. does not seem to fail on iphone X (same ios level). which is also strange.

note: we traced what was causing this, if any one sees the Cannot Open error. It was a zero length cached version of the mp4 file.

for anyone interested in trying to trace weird AV errors, we ran across these methods on AVPlayerItem which seem like they may give more info

AVPlayerItemAccessLog * accessLog = [_playerItem accessLog];

         AVPlayerItemErrorLog * errorLog = [_playerItem errorLog];          NSString * errorString = [[NSString alloc] initWithData:[errorLog extendedLogData] encoding:[errorLog extendedLogDataStringEncoding]];         printf("video error string = %s\n", [errorString UTF8String]);

I need help, I have the same issue. Did you fix this problem?

AVFoundation error -11829 "Cannot Open" (random-ish fail on same url)
 
 
Q