INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable.

2,953 views
Skip to first unread message

larry...@cbsinteractive.com

unread,
Sep 27, 2013, 6:39:32 PM9/27/13
to ima...@googlegroups.com
Wondering what would cause this error in mobile web HTML5 Safari iPad iOS 6.1 two video tag implementation:

INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable.     ima3.js:81

It occurs after a couple of cycles of pre-roll, content, pre-roll, content, playing correctly followed by the next preroll which stalls immediately after calling "onContentPauseRequested". 

An attempt to load another ad at this point generates the error and the IMA plug-in goes silent with no ads playing.

Thanks,
Larry Doyle


larry...@cbsinteractive.com

unread,
Sep 27, 2013, 7:34:39 PM9/27/13
to ima...@googlegroups.com
this consistently happens on the third attempt to load the pre-roll.

Shawn Busolits (IMA SDK Team)

unread,
Sep 30, 2013, 11:16:45 AM9/30/13
to ima...@googlegroups.com
Hey Larry,

Do you have a sample page and ad tag where we can see this behavior? I'm also a little unclear on your use case - what action are you taking that results in the pre-roll being loaded more than once? Are you letting the video finish and then trying to replay it? Or are you making multiple ad requests while the video is playing?

Thanks,
Shawn Busolits
IMA SDK Team

larry...@cbsinteractive.com

unread,
Sep 30, 2013, 1:32:20 PM9/30/13
to ima...@googlegroups.com
The dev page is behind a firewall. The use case is a page with preview images that when touched start a pre-roll then content to play. When the video is over the user can select another video and watch the pre-roll and content, etc. Not making multiple ad requests while the video plays.

This implementation has worked without problems in other pages, and then the problem shows up. It may be our feed, but the IMA plugin is opaque and this is the only feedback I'm getting. Would be helpful to know what's breaking inside and causing this IMA DOM error..

Cheers,
Larry

SLee

unread,
Oct 1, 2013, 1:06:03 PM10/1/13
to ima...@googlegroups.com
Have you tried using the debug version of the IMA js lib ? just a thought.

Shawn Busolits (IMA SDK Team)

unread,
Oct 1, 2013, 1:13:03 PM10/1/13
to ima...@googlegroups.com
Hey Larry,

This is a good point - using the debug player could give you a clue as to what's going on inside the SDK. Could you confirm that you're calling contentComplete before making any requests after the first? (If it's working on other platforms then I assume you are). I'd also suggest taking a look at our Mobile Video Element docs to make sure you're properly initializing things as the result of a user action. If the page isn't reloading then you should only need to call initialize() on the display container before the first ad. Calling that more than once can cause problems.

Thanks,
Shawn Busolits
IMA SDK Team

larry...@cbsinteractive.com

unread,
Oct 1, 2013, 5:00:45 PM10/1/13
to ima...@googlegroups.com
thanks for the suggestions.

I'm using the debug player. The console output is the same up to the content pause requested event, at which point the ad either plays or it fails to dispatch an Ad Started event and the console is silent. The debug player offers no clues.

contentComplete is called correctly (reporting it in the console). The ad display container is instantiated and initialized only once per page load. 

I've re-reviewed the Mobile Video Element docs. We've followed the example. Our implementation is working in production on a premier video channel, but even there ads sometimes fail with a "Cannot complete this operation" message.

Our implementation registers for AdError events, but in this case no error events are thrown by IMA. Is there any way to know if the reason IMA is failing was in the VAST? video format? bad source url? etc...

Cheers,
Larry

Shawn Busolits (IMA SDK Team)

unread,
Oct 2, 2013, 9:59:05 AM10/2/13
to ima...@googlegroups.com
Hey Larry,

Are you checking LOG events as well? If you're working with ad rules playlists, an error with a single ad could be wrapped in a LOG AdEvent message rather than an AdErrorEvent to prevent the SDK from self-destructing. (All AdErrorEvents are treated as fatal, so in the event that one ad fails but others could potentially play, we fire a LOG AdEvent instead.) Let us know if you see anything in the LOG messages - that may give us more to work off of.

Thanks,
Shawn Busolits
IMA SDK Team

larry...@cbsinteractive.com

unread,
Oct 2, 2013, 7:34:05 PM10/2/13
to ima...@googlegroups.com, Jarred Wilichinsky
Hi Shawn,

Thanks for all your helpful suggestions. 

At this point it appears there is a bug in the IMA HTML5/JavaScript plugin. We can consistently reproduce a freeze by IMA if the second pre-roll is the same video creative (asset url) as the first pre-roll. IMA freezes right after it dispatches a Content Pause Request. (IMA v3 on a iOS 6.1 iPad.)

If we copy the asset, give it a different filename, and alternate serving the two different versions of the same ad, the pre-roll ads and content play correctly for as many cycles as you're willing to push the button for. If random different ads are played they all run correctly.

I'm cc'ing our Ad Opts Director so he can forward this to his contacts in Google also.

Cheers,
Larry Doyle
Message has been deleted

Shawn Busolits (IMA SDK Team)

unread,
Oct 3, 2013, 11:08:00 AM10/3/13
to ima...@googlegroups.com, Larry Doyle, DFP Support, Benyah Shaparenko
Hi all,

I'm looking into this on our end but I haven't been able to reproduce it in any of our test players, so it's most likely related to a difference in our implementations. If there's any way you could provide a test page that shows the issue it will make troubleshooting much faster on our end.

Thanks,
Shawn Busolits
IMA SDK Team

On Wednesday, October 2, 2013 7:40:25 PM UTC-4, Jarred Wilichinsky wrote:
Thanks guys just we can keep a record of this i'm logging a support ticket and adding Benyah.

Megan high level what we are seeing here is that with the html5 SDK if the same exact ad (video file) is called twice in a row on the same page the SDK errors out and the player gets stuck.  

You can see the chain below with some more details 
--

Jarred Wilichinsky
Director Ad Operations
T 415.344.2111      C 954.547.9531  
235 2nd Street, San Francisco, CA 94105

Cbs

Larry Doyle

unread,
Oct 3, 2013, 3:51:37 PM10/3/13
to Shawn Busolits (IMA SDK Team), Jarred Wilichinsky, ima...@googlegroups.com, DFP Support, Benyah Shaparenko
On this page the second preroll is the same as the first and IMA hangs after loading the second preroll. Play a video, after the preroll finishes content will start playing, play the second video anytime after that:


This page has different pre-rolls playing and works correctly:


Testing with iPad Safari iOS 6.1.

Regards,
Larry
--
Larry Doyle
Lead Software Engineer
415.344.2910
CBSInteracitve
235 Second St, San Francisco, CA 94105

Shawn Busolits

unread,
Oct 4, 2013, 9:42:39 AM10/4/13
to ima...@googlegroups.com, Shawn Busolits (IMA SDK Team), Jarred Wilichinsky, DFP Support, Benyah Shaparenko
Hey Larry,

Thanks so much for the additional info. I'm sharing this with the team and will let you know what we find.

Thanks,
Shawn Busolits
IMA SDK Team

Shawn Busolits (IMA SDK Team)

unread,
Oct 10, 2013, 4:04:47 PM10/10/13
to ima...@googlegroups.com, Shawn Busolits (IMA SDK Team), Jarred Wilichinsky, DFP Support, Benyah Shaparenko
Hi all,

Just to provide an update here - we've been looking at this one, and it looks like there may be a bug in mobile safari related to playing the same video file twice in a row when 2 video players are on a page. We've been able to replicate this on pages that don't use the SDK. We're going to work with them to see if we can get this resolved. We'll keep you posted with any updates.

Thanks,
Shawn Busolits
IMA SDK Team

Larry Doyle

unread,
Oct 10, 2013, 5:08:20 PM10/10/13
to ima...@googlegroups.com, Shawn Busolits (IMA SDK Team), Jarred Wilichinsky, DFP Support, Benyah Shaparenko
Hi Shawn, 

Thanks for the update.

We spent a long time this summer working thru using a two tag solution with Google, would it be better to use one tag in all cases? 

What is the motivation for using two separate video tags?

Cheers,
Larry


--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ima-sdk/9Jzdzp9nCN4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ima-sdk+u...@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at http://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/groups/opt_out.
Message has been deleted

Larry Doyle

unread,
Oct 11, 2013, 12:24:41 PM10/11/13
to ima...@googlegroups.com, Jarred Wilichinsky, Shawn Busolits (IMA SDK Team), DFP Support, Benyah Shaparenko
Thanks for the explanation Shawn. Since our current need is for pre-rolls only we'll implement a one tag solution on all iDevices. Keep us posted on Google's progress with this issue.

Cheers,
Larry


On Fri, Oct 11, 2013 at 7:53 AM, <ima...@googlegroups.com> wrote:
Hey Jared,

The main things you would lose are the ability to play AdSense, Ad Exchange, and YouTube hosted ads. The other big drawback is with content buffering - because the ad will play in the same player as the content, when a mid-roll starts you'll lose the buffer for the content, and the video will have to re-buffer when the ad break is over. We also have some optimizations in the SDK that load more than one ad in a pod at once so you don't need to wait for a buffer to fill between pods - you'd lose that as well. If you have any other questions let us know!

Thanks,
Shawn Busolits
IMA SDK Team


On 10/11/13 10:21:06 jarred.wi...@cbsinteractive.com wrote:
Shawn outside the adx and remnant ads if we go this path will we lose any other SDK features, ad rules, stream caps, etc?


On Fri, Oct 11, 2013 at 7:10 AM, <ima...@googlegroups.com> wrote:
Hey Larry,

We only really recommend the single tag solution on devices that can't handle more than one video tag at a time, like iPhone and older Android devices. 

The two tag solution offers a number of benefits. The first is that using a separate player for ads and content allows your content to keep buffering while ads are playing. Also with a single tag, you would need to swap out your content to play mid-rolls, which would cause you to lose any video you had buffered after the break. We also only support certain at types, like AdSense and Ad Exchange, including TrueView ads, in solutions that use the video player included with the SDK. If you have any other questions let us know!

Thanks,
Shawn Busolits
IMA SDK Team

On 10/10/13 17:08:20 larry...@cbsinteractive.com wrote:
Hi Shawn, 

To unsubscribe from this group and all its topics, send an email to ima-sdk+unsubscribe@googlegroups.com.

To post to this group, send email to ima...@googlegroups.com.
Visit this group at http://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/groups/opt_out.



--
Larry Doyle
Lead Software Engineer
415.344.2910
CBSInteracitve
235 Second St, San Francisco, CA 94105

--

Jarred Wilichinsky
Director Ad Operations
T 415.344.2111      C 954.547.9531  
235 2nd Street, San Francisco, CA 94105

Cbs

jeremy

unread,
Jun 20, 2014, 2:57:42 PM6/20/14
to ima...@googlegroups.com, ima-sdk-ad...@google.com
Curious, is this still an issue? 

Getting the same Invalid State Error and this appears to be the same case. It also seems playing the same ad creative consecutively is highly common scenario (assuming you are in standard playback, so the video tag is unaware of the content). In that sense, I will use custom playback on iPads as well until notified of any changes.

Larry Doyle

unread,
Jun 20, 2014, 3:15:53 PM6/20/14
to ima...@googlegroups.com, Shawn Busolits
We're still using the single video tag work-around.

Larry


To unsubscribe from this group and all its topics, send an email to ima-sdk+u...@googlegroups.com.

To post to this group, send email to ima...@googlegroups.com.
Visit this group at http://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.

Shawn Busolits (IMA SDK Team)

unread,
Jun 20, 2014, 3:23:43 PM6/20/14
to ima...@googlegroups.com, ima-sdk-ad...@google.com
Hi all,

Unfortunately this is still an issue. We've reported the problem to Apple but haven't heard anything back yet. As soon as we do we'll let you know.

Thanks,
Shawn Busolits
IMA SDK Team
For more options, visit https://groups.google.com/d/optout.

Jeremy Giovannetti

unread,
Jun 20, 2014, 5:16:07 PM6/20/14
to ima...@googlegroups.com, ima-sdk-ad...@google.com
Thanks for the quick response guys.


To unsubscribe from this group and all its topics, send an email to ima-sdk+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages