Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Flipper crashes on AVAggregateAssetDownloadTask using #2507

Closed
OSkliarenko opened this issue Jun 25, 2021 · 3 comments
Closed

[iOS] Flipper crashes on AVAggregateAssetDownloadTask using #2507

OSkliarenko opened this issue Jun 25, 2021 · 3 comments

Comments

@OSkliarenko
Copy link

OSkliarenko commented Jun 25, 2021

馃悰 Bug Report

Flipper crashes on AVAggregateAssetDownloadTask using due currentRequest property is not available for AVAggregateAssetDownloadTask object

From AVKit SDK

@interface AVAggregateAssetDownloadTask : NSURLSessionTask
...
@property (readonly, copy) NSURLRequest *currentRequest NS_UNAVAILABLE;

*** Terminating app due to uncaught exception 'NSGenericException', reason: 'AVAggregateAssetDownloadTask does not support currentRequest property'

To Reproduce

Try to download AVURLAsset with - (nullable AVAggregateAssetDownloadTask *)aggregateAssetDownloadTaskWithURLAsset:(AVURLAsset *)URLAsset mediaSelections:(NSArray <AVMediaSelection *> *)mediaSelections assetTitle:(NSString *)title assetArtworkData:(nullable NSData *)artworkData options:(nullable NSDictionary<NSString *, id> *)options

Environment

iOS 14.5
RN 0.63.4
Flipper 0.87.0

@alexejh
Copy link

alexejh commented Feb 27, 2023

The issue still exists with the error 'AVAggregateAssetDownloadTask does not support currentRequest property'
Tested on:
iOS 16
RN 0.62.2
Flipper 0.182.0

@yavor87
Copy link

yavor87 commented Mar 6, 2023

I run into this issue too. I am able to reproduce it every time I try to start a aggregateAssetDownloadTask. Same code works just fine in standalone ios app.

// Create the configuration for the AVAssetDownloadURLSession.
let backgroundConfiguration = URLSessionConfiguration.background(withIdentifier: "AAPL-Identifier")
        
// Create the AVAssetDownloadURLSession using the configuration.
let assetDownloadURLSession = AVAssetDownloadURLSession(configuration: backgroundConfiguration, assetDownloadDelegate: self, delegateQueue: OperationQueue.main)

let _asset = AVURLAsset(url: URL(string: "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8")!)
let preferredMediaSelection = _asset.preferredMediaSelection
guard let task =
   assetDownloadURLSession.aggregateAssetDownloadTask(with: _asset,
                                                      mediaSelections: [preferredMediaSelection],
                                                      assetTitle: "my asset",
                                                      assetArtworkData: nil,
                                                      options:
       [AVAssetDownloadTaskMinimumRequiredMediaBitrateKey: 265_000]) else { return }

task.taskDescription = "1"

task.resume()

@mweststrate , please reopen this issue. It is a real showstopper for us.

@rahulnainwal107
Copy link

rahulnainwal107 commented May 28, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants