Ad request timing out wit tvOS sdk 4.3.2

90 views
Skip to first unread message

venkata nandamuri

unread,
Aug 25, 2020, 10:06:05 AM8/25/20
to Interactive Media Ads SDK
Hi, 

We recently updated our ima sdk in our tvos app.

We are getting the valid xml response on postman, but the ima sdk is throwing the 

"Ad request reached a timeout." error


Not sure what causing this. 


Here is the code used to request ads:


       let adDisplayContainer = IMAAdDisplayContainer(adContainer: view, viewController: self)

        let request = IMAAdsRequest(adTagUrl: tag, adDisplayContainer: adDisplayContainer, contentPlayhead: contentPlayhead, userContext: nil)

        request?.vastLoadTimeout = 20

        adsLoader?.requestAds(with: request)

venkata nandamuri

unread,
Aug 25, 2020, 10:13:53 AM8/25/20
to Interactive Media Ads SDK
please note the code is made sure it is called on main thread

venkata nandamuri

unread,
Aug 25, 2020, 10:19:04 AM8/25/20
to Interactive Media Ads SDK
If I provide the xml response to the sdk, I get the ads as expected. 

But in documentation, it says only provide xml response for debugging purposes. 

Here is the code that worked:

 DispatchQueue.main.async {

                    let adDisplayContainer = IMAAdDisplayContainer(adContainer: self.view, viewController: self)

                    let adsRequest = IMAAdsRequest(adsResponse: xml, adDisplayContainer: adDisplayContainer, contentPlayhead: self.contentPlayhead, userContext: nil)

                    self.adsLoader?.requestAds(with: adsRequest)

                }



Here is the code that didnt work:


let adDisplayContainer = IMAAdDisplayContainer(adContainer: view, viewController: self)

        let request = IMAAdsRequest(adTagUrl: tag, adDisplayContainer: adDisplayContainer, contentPlayhead: contentPlayhead, userContext: nil)

        request?.vastLoadTimeout = 20

        adsLoader?.requestAds(with: request)


What is the recommended approach ?


venkata nandamuri

unread,
Aug 25, 2020, 10:23:48 AM8/25/20
to Interactive Media Ads SDK
From documentation:

/**
 * Specifies the full URL to use for ads loading from an ad server. Required
 * for any <code>adsRequest</code>. For details on constructing the ad tag url,
 * see <a href="https://support.google.com/dfp_premium/answer/1068325">
 * Create a master video tag manually</a>.
 */
@property(nonatomic, copy, readonly) NSString *adTagUrl;/**
 * Specifies a VAST, VMAP, or ad rules response to be used instead of making a
 * request via an ad tag URL. This can be useful for debugging and other situations
 * in which an ad response is already available.
 */
@property(nonatomic, copy, readonly) NSString *adsResponse;

its timing out if I used adTagURL

it worked, if I download the xml repsonse and pass it to the adsResponse

IMA SDK

unread,
Aug 25, 2020, 1:46:55 PM8/25/20
to venkata....@rci.rogers.com, ima...@googlegroups.com
Hi there,

Thank you for bringing this ad not loading when using an ad tag in Tvos to us. Are you able to replicate the non loading in our Sample App? If yes, could you send us your ad tag via "Reply privately to author"?

Regards,
Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q23uW4O:ref

venkata nandamuri

unread,
Aug 25, 2020, 1:48:33 PM8/25/20
to Interactive Media Ads SDK
Hi, this is now resolved. 

The issue is the vast load timeout is given in seconds, whereas it expects in milliseconds. 

So all requests are getting timedout due to very low timeout. 
Reply all
Reply to author
Forward
0 new messages