Uncaught TypeError: Cannot read property 'right' of undefined

466 views
Skip to first unread message

Larry Doyle

unread,
Apr 19, 2016, 4:37:45 PM4/19/16
to Interactive Media Ads SDK
I'm working on a desktop implementation of HTML5 IMA SDK and intermittently get the following error in the console when a Mercedes ad (among others) ends:

VM19758:1 Uncaught TypeError: Cannot read property 'right' of undefined

The error keeps repeating, into the thousands.

Content video plays but the IMA ad COMPLETE event seems to be blocked and our skin loses functionality. 

Opening the code that generates the error in dev tools the file appears to be an 'innovid'  script:

this.releaseVersion = "1.2.1",
    this.buildVersion = "95da189b6b613b72ca5057e403aabe4d3249114e-DIRTY";

this.initBeacons = function() {
        (0 == $ovv.geometrySupported || $ovv.DEBUG) && ($ovv.browser.ID === $ovv.browserIDEnum.Firefox ? _.bind(z)() : U.bind(z)("http://video.innovid.com/common/openvv/ovvbeacon-03d6bd7.swf"))
    }
 window.$ovv.addAsset(new OVVAsset("__innovid_iroll_EEA285BC2865EE3BEDDBDC661AD72ADA52990BF5__",{
    geometryViewabilityCalculator: new OVVGeometryViewabilityCalculator
}));


HTML5 SDK, desktop Mac using a Chrome browser.

Ad Call: 

What should I do to keep my player working correctly?

Cheers,
Larry Doyle

Vu Chau (IMA SDK Team)

unread,
Apr 20, 2016, 10:02:29 AM4/20/16
to Interactive Media Ads SDK
Hi Larry,

This might be related to historical cases due to Chrome's certain heuristics in handling flash ads (FYI, I didn't see the error on Firefox).  From your ad tag, we are seeing it serves Flash VPAID and regular MP4 creatives alternatively. I did some testing where I manipulated the AdsManager's dimensions to be less than the constants defined here (kLargeContentMinWidth and kLargeContentMinHeight):
adsManager.init(
    250,
    150,
    google.ima.ViewMode.NORMAL);

  adsManager.start();
};
With these dimensions, I saw sometimes Chrome would pause a Flash ad.  At that time it shows the undefined error.  However, for other regular MP4 creatives, the SDK successfully fired COMPLETE and did not error out.  Therefore, we are inclined to think that running into the "Uncaught TypeError: Cannot read property 'right' of undefined" is related to Chrome's heuristics in handling Flash ads.

As a workaround, I'd recommend maintaining a stable inventory on DFP where you are not supplying Flash creatives.  Otherwise, you might set a custom timer that runs for the relative length of the would-be Flash ad, and destroy the SDK (via AdsManager.destroy()) once the time is up.

Vu Chau
IMA SDK Team

Larry Doyle

unread,
Apr 20, 2016, 12:52:11 PM4/20/16
to Interactive Media Ads SDK
Hi Vu,

Thanks for your timely and insightful reply.

CBSi has no choice but to show Flash VPAID ads and to support Chrome along with all other browsers, so I'll implement the timer work-around and hope for the best.

Any chance this Chrome/IMA bug will be fixed in the future? Seeing thousands of errors  piling up in the console  masks important errors and is unsettling even if everything appears to be working correctly. 

Regards,
Larry Doyle
CBSInteractive

Larry Doyle

unread,
Apr 20, 2016, 12:55:07 PM4/20/16
to Interactive Media Ads SDK, Jarred Wilichinsky, Chris Xiques
adding Jarred Wilichinsky and Chris Xiques from CBSInteractive

Jarred Wilichinsky

unread,
Apr 20, 2016, 12:58:29 PM4/20/16
to Larry Doyle, Interactive Media Ads SDK, Chris Xiques, Peentoo Patel, Sujit Sanjeev, Benyah Shaparenko
Hey guys,

When a feature is put out we expect it to work.  We need to have ads work with no conditions based on browser when the feature is out there for us to use.  If we don't think it will work reliability then we need to ask the team to get us there so it works as advertised.

Adding some others to get them in the loop.   
--

Jarred Wilichinsky
VP Video Monetization and Operations
T 415.344.2111      C 954.547.9531  
235 2nd Street, San Francisco, CA 94105

Vu Chau (IMA SDK Team)

unread,
Apr 20, 2016, 3:33:40 PM4/20/16
to Interactive Media Ads SDK, larry...@cbsinteractive.com, chris....@cbsinteractive.com, peento...@google.com, san...@google.com, bshap...@google.com
Hi all,

I replaced the Innovid Flash VPAID from your tag with one of ours (https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinearvpaid&correlator=), and I'm not seeing that error anymore.  So then it's neither a Flash VPAID issue nor Chrome.  My recommendation would be to speak with Innovid about this and see if they can change something.


Vu Chau
IMA SDK Team

Reply all
Reply to author
Forward
0 new messages