Ad Error: 402 timeout occurs in Advanced Example app.

470 views
Skip to first unread message

Gourav Saxena

unread,
Jan 17, 2020, 5:51:44 AM1/17/20
to Interactive Media Ads SDK
Hi There,

I am on the latest IMA android sample branch. I am facing Ad Error:402 ad timeout in the following scenario,

1. Please configure a pre-roll having 2 pod ads in advanced example with change media option on a button. [If you want I can share the zipped code privately.]
2. When the '1 of 1' ad is playing click on change media button and let the next 1st ad play. If you see ad time out then check the 3rd step or else click on change media once again and keep trying for 5-6 times.
3. The issue can be see on the 2nd ad as well.

You can see the logs attached and in this scenario what i observed that IMA does not send 'STARTED' ad event. It send LOADED, CONTENT_PAUSE_REQUESTED then does not send STARTED and in continuation IMA send FIRST_QUARTILE event.

Please check this as we are facing this issue very frequently in our app and it was very hard to reproduce on IMA advanced example as it does not use ExoPlayer to play.

-Thanks
Gourav
IMA_Time_Out_402.rtf

IMA SDK

unread,
Jan 17, 2020, 3:16:15 PM1/17/20
to gourav...@gmail.com, ima...@googlegroups.com
Hi Gourav,

Thank you for reaching out to us. Can you provide more details on changing media option? Can you share the zipped code via the imate...@gmail.com alias? Please, let us know once it is done.

Regards,
Arnaud Casame
IMA SDK Team


ref:_00D1U1174p._5001USwizi:ref

Gourav Saxena

unread,
Jan 19, 2020, 10:24:09 PM1/19/20
to IMA SDK, ima...@googlegroups.com
Hi Arnaud,

I have shared the code over the given email id: imate...@gmail.com

-Thanks

Gourav


Gourav Saxena

unread,
Jan 21, 2020, 6:48:32 AM1/21/20
to IMA SDK, ima...@googlegroups.com
Hi Arnaud,

Please let me know if you have any findings on that.

-Thanks

Gourav


IMA SDK

unread,
Jan 21, 2020, 3:57:35 PM1/21/20
to gourav...@gmail.com, ima...@googlegroups.com
Hi Gourav,

Thank you for providing additional insights with regards to the issue. We've successfully downloaded the sample apps you shared, built the AdvancedExample sample and tried to run the content and request the ad but nothing happened when I click on the play button. There was no content, no ad displayed on the screen, no error message displayed in the logcat (see screenshot attached). We also didn't notice any Change media option button, can you share a sample app capable of reproducing the behavior you reported?


Regards,
Arnaud Casame
IMA SDK Team


ref:_00D1U1174p._5001USwizi:ref
Screen Shot 2020-01-21 at 2.45.46 PM.png

Gourav Saxena

unread,
Jan 21, 2020, 11:43:45 PM1/21/20
to IMA SDK, ima...@googlegroups.com
Hi Arnaud,

Sorry i did not mention the steps to reproduce in my last email.

1. Go to 'Custom'.
2. If you press the textview where custom is written, there actually the changeMedia logic is. 😕 

You need to try a lot of time may be more than 10-15 times to see this behaviour.

-Thanks

Gourav


IMA SDK

unread,
Jan 22, 2020, 2:53:38 PM1/22/20
to gourav...@gmail.com, ima...@googlegroups.com
Hi Gourav,

We were not able to reproduce the behavior that you're seeing with the Ad Error:402 ad timeout being thrown by the SDK (see video recording attached).  We've tested the sample app you shared (several times), following the steps you suggested and nothing happened. If there's an issue, it seems to be with your implementation of the IMA SDK, we would recommend you to review your implementation.


Regards,
Arnaud Casame
IMA SDK Team


ref:_00D1U1174p._5001USwizi:ref
unreproducible_mov.html

Gourav Saxena

unread,
Jan 22, 2020, 11:41:17 PM1/22/20
to IMA SDK, ima...@googlegroups.com
Hi Arnaud,

As I said that it is tough to get this issue on sample app and as i can see in video, that it was not tried that much time. The attached logs were from the sample app only. With the logs, if you can analyse something as the issue comes from IMA sdk webview so from there i can not figure out anything.

 1. When the '1 of 1' ad is playing click on the 'custom' text view and let the next 1st ad play. If you see ad time out then check the 3rd step or else click on change media once again and keep trying for 5-6 times.
 2. The issue can be see on the 2nd ad as well.

You can see the logs attached and in this scenario what i observed that IMA does not send 'STARTED' ad event. It send LOADED, CONTENT_PAUSE_REQUESTED then does not send STARTED and in continuation IMA send FIRST_QUARTILE event.

I hope you will try to see this issue as it is leading to some issues as well in the ads which i am not mentioning here because this problem looks like the root cause.

-Thanks

Gourav


IMA_Time_Out_402.rtf

Gourav Saxena

unread,
Jan 22, 2020, 11:42:42 PM1/22/20
to IMA SDK, ima...@googlegroups.com
Or you have the code in which i implemented change media, you can tell me where i did mistake so that in parallel i can also check in my code.

Because change media works fine if there is single ad and we tested a lot of time earlier as well but never saw this issue.

-Thanks

Gourav


IMA SDK

unread,
Jan 23, 2020, 3:13:24 PM1/23/20
to gourav...@gmail.com, ima...@googlegroups.com
Hi Gourav,

We were not able to reproduce the behavior that you're seeing with the Ad Error:402 ad timeout being thrown by the SDK. Can you share a video recording showing the issue you encountered?


Regards,
Arnaud Casame
IMA SDK Team


ref:_00D1U1174p._5001USwizi:ref

Gourav Saxena

unread,
Jan 24, 2020, 12:09:20 AM1/24/20
to IMA SDK, ima...@googlegroups.com
Hi Arnaud,

Please find the attached adb logs with the video. Its 5 mins video, you may skip to last min video to see the skipping.

IMA_AD_TIME-OUT.rtf

Gourav Saxena

unread,
Jan 24, 2020, 1:42:36 AM1/24/20
to IMA SDK, Gilad Nadav, ima...@googlegroups.com
+Gilad Nadav 

-Thanks

Gourav


IMA SDK

unread,
Jan 24, 2020, 3:12:39 PM1/24/20
to gourav...@gmail.com, ima...@googlegroups.com
Hi Gourav,

We've watched the video recording you shared and saw nothing that would suggest a bug fix is needed in the SDK. We've also tried to run the sample app as shown in the video and noticed that the ad tag is returning an empty VAST XML every time the play button is pressed (see android_error screenshot attached). We tried to run the ad tag against our VSI, the SDK threw the same error, saying that the ad response coming from the server does not contain any valid ads (see html5_error screenshot attached). The ad serving issue is preventing us from reproducing the behavior you initially reported.
However, the Resolve VAST and IMA SDK errors documentation says that the VAST Error Code:402 is thrown when a fatal error occurs and is caused by a problem fetching or playing the ad MediaFile. There's no issue with the SDK, the issue is with the ad's MediaFile. Feel free to take a look at the recommendations so you can fix it.


Regards,
Arnaud Casame
IMA SDK Team


ref:_00D1U1174p._5001USwizi:ref
html5_error.png
android_error.png

Gourav Saxena

unread,
Jan 28, 2020, 6:06:58 AM1/28/20
to IMA SDK, ima...@googlegroups.com, amit....@viacom18.com, gaurav...@kaltura.com, Gilad Nadav
Hi Arnaud,

Please test the app using India vpn. You will definitely be able to see this issue.

-Thanks

Gourav


Gourav Saxena

unread,
Jan 28, 2020, 6:07:24 AM1/28/20
to IMA SDK, ima...@googlegroups.com, amit....@viacom18.com, gaurav...@kaltura.com, Gilad Nadav
These ads are geo blocked.

-Thanks

Gourav


IMA SDK

unread,
Jan 28, 2020, 2:57:00 PM1/28/20
to gourav...@gmail.com, ima...@googlegroups.com
Hi Gourav,

Unfortunately, the support team is not allowed to use VPN in testing issues. However, the 402 error code is not an IMA SDK issue, it occurs when there's a problem fetching or playing the MediaFile. Have you tried the recommendations listed in the Resolve VAST and IMA SDK errors documentation to fix the 402 error?


Regards,
Arnaud Casame
IMA SDK Team


ref:_00D1U1174p._5001USwizi:ref
Reply all
Reply to author
Forward
0 new messages