amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Error: "Cannot read property 'create' of undefined"

Open github-nourdine-dahmani opened this issue 8 years ago • 8 comments

What's the issue?

We should be able to use window.$sf.ext (SafeFrame API) but didn't exist due to this error I think

47360018-8521ec00-d6ce-11e8-92a0-56d3573442c9

When the error "Cannot read property 'create' of undefined" is thrown, the entry point for SafeFrame framework does not exist as it should in the amp-ad type="doubleclick" iframe window (window.$sf).

Seems to be related to the doubleclick component cf https://github.com/ampproject/amphtml/blob/master/extensions/amp-ad-network-doubleclick-impl/safeframe.md

47162753-de67d500-d2f4-11e8-87ce-5356578851aa

Due to the "non-existing" SF entry point, the ad does not understand they are in an AMP SafeFrame context (and can't ask for an opening too)

How do we reproduce the issue?

https://calcio.fanpage.it/amichevole-italia-ucraina-le-ultime-sulle-formazioni-le-quote-e-dove-vederla-in-tv/amp/?google_preview=VR1kgoPGP1MYh5_33QUwh7us5QWIAYCAgKDb8MT0SQ&iu=1010633&gdfp_req=1&lineItemId=4816432979&creativeId=138246844693

What browsers are affected?

Either emulating an iphone or just loading up the non google cache link in desktop mode Google Chrome is up to date Version 69.0.3497.100 (Official Build) (64-bit)

Please find the original thread here: https://github.com/ampproject/amphtml/issues/18507#issuecomment-434502095

github-nourdine-dahmani avatar Nov 05 '18 14:11 github-nourdine-dahmani

Seems dup of #18507. @calebcordry assigning to you for triaging.

aghassemi avatar Nov 05 '18 17:11 aghassemi

Thanks for pulling this into a separate issue @ndahmani.

@keithwrightbos Can you take a look at what is happening here with SafeFrame? Or please reassign appropriately.

calebcordry avatar Nov 05 '18 18:11 calebcordry

Hi Team, thanks for taking a look. @keithwrightbos any chance to have an update? Publishers are asking for an ETA (and are losing monetizations). Feel free to ask if we can provide anything that can help.

github-nourdine-dahmani avatar Nov 14 '18 10:11 github-nourdine-dahmani

I don't see how the stacktrace above is related to SF usage as the stacktrace is part of FIE rendering for AMPHTML creatives. Note that by default the safeframe API is not included in AMP creatives unless required. Can you try retagging that slot with data-force-safeframe=true which will ensure that the safeframe library is included in the creative (see https://github.com/ampproject/amphtml/blob/master/extensions/amp-ad-network-doubleclick-impl/safeframe.md). Please re-open if you continue to see the issue.

keithwrightbos avatar Nov 14 '18 18:11 keithwrightbos

Hi @keithwrightbos, Thanks for the feedback much appreciated, Unfortunately, this doesn't solve the issue. Please see below the current setup: capture d ecran 2018-11-16 a 10 57 43

URL: https://calcio.fanpage.it/amichevole-italia-ucraina-le-ultime-sulle-formazioni-le-quote-e-dove-vederla-in-tv/amp/?google_preview=VR1kgoPGP1MYh5_33QUwh7us5QWIAYCAgKDb8MT0SQ&iu=1010633&gdfp_req=1&lineItemId=4816432979&creativeId=138246844693

github-nourdine-dahmani avatar Nov 16 '18 10:11 github-nourdine-dahmani

Hi @keithwrightbos, hope you're good Do you have any news regarding my last comment? Thanks for your help

github-nourdine-dahmani avatar Nov 20 '18 13:11 github-nourdine-dahmani

Hello guys,

I'm having this exact problem on this site too: https://www.freundin.de/beauty-foehn-im-test?amp&google_preview=vQ8hGQ9h31MY1Ifb3wUw1KOQ5wWIAYCAgKDbkYXoCw&iu=40748507&gdfp_req=1&lineItemId=4870567891&creativeId=138251967304

Again, $sf is not defined within the Google safeFrame.

Could someone see if there's any similarities causing the issue?

Thanks!

taacton avatar Nov 23 '18 16:11 taacton

Hi guys, We have more and more complaints from publishers using amp-ad This ticket seems to be not active since it has been closed, ticket reopen here: #19466

github-nourdine-dahmani avatar Nov 27 '18 10:11 github-nourdine-dahmani