Doubleclick FF: Version mismatch accessing extension service
doubleclick Error executing onCreativeRender: G(a.ownerDocument.defaultView).loadExtension is not a function. (In 'G(a.ownerDocument.defaultView).loadExtension("amp-analytics")', 'G(a.ownerDocument.defaultView).loadExtension' is undefined)
sample page error occurred: https://www-dicasdemulher-com-br.cdn.ampproject.org/c/s/www.dicasdemulher.com.br/hidratacao-caseira/amp/
user agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) GSA/33.0.164895372 Mobile/14D27 Safari/602.1
might possibly just be in canary right now. I don't have much other information but please reach out to me so we can dig for more if needed.
@keithwrightbos @taymonbeal do you guys mind triaging this? Thanks
Not currently able to repro this, even in canary. Do you have more detailed instructions for doing so?
+@dvoytenko This appears to line up with https://github.com/ampproject/amphtml/blame/master/extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js#L490. Looking at code history the code was changed as part of #10992 which changed from this.extensions_./OK/loadExtension('amp-analytics'); to this.extensions_./OK/installExtensionForDoc(this.getAmpDoc(), 'amp-analytics');
Could this be a version sync issue where the extension service changed and older code is consuming the new service?
@erwinmombay Is this on Canary?
The only way I see this happening is via version mismatch.
Setting to P0 until we confirm whether this is canary issue or PROD, at the very least.
I don't see how this would happen for the specified URL: this is RTV serving path.
This appears to be a canary issue (at least I can confirm that ad request is sending art=2 which indicates canary). We are not seeing any alerts associated with production traffic.
@dvoytenko i can only see canary right now with very low occurrences. double checking
Still, in RTV path we can never have this kind of issues, right?
@dvoytenko you are correct. is this code path not usually reached? im just curious about the low occurrence.
In this case it'd never be reached. Right?
In other words, we can never have RTV version mismatched. We can't have it in non-RTV either, but definitely not in RTV.
some addt'l info. notice that version ends with 313 (current canary) but rtv in the error stack is 635 (current prod)
Query string: v = 001504119607313 noAmp = 0 m = doubleclick Error executing onCreativeRender: G(a.ownerDocument.defaultView).loadExtension is not a function. (In 'G(a.ownerDocument.defaultView).loadExtension("amp-analytics")', 'G(a.ownerDocument.defaultView).loadExtension' is undefined) a = 0 rt = 1p ca = 1 vs = channelOpen jse = Safari exps = canary=1,expAdsenseA4A=0,expDoubleclickA4A=0,expAdSenseFFDR=0,a4aProfilingRate=1,dbclk_a4a_viz_change=0,ad-type-custom=1,ios-embed-wrapper=1,amp-apester-media=1,amp-playbuzz=1,chunked-amp=1,pump-early-frame=1,sticky-ad-early-load=1,amp-auto-ads=1,amp-auto-ads-adsense-holdout=0,slidescroll-disable-css-snap=1,visibility-v3=1,version-locking=1,as-use-attr-for-format=1,a4aFastFetchDoubleclickLaunched=0,a4aFastFetchAdSenseLaunched=0,a4a-measure-get-ad-urls=1,ad-loader-v2=1,3p-use-ampcontext=0,amp-animation=1,amp-sidebar toolbar=1 el = u s = sd@https://cdn.ampproject.org/rtv/011504040004635/v0/amp-ad-network-doubleclick-impl-0.1.js:115:483 onCreativeRender@https://cdn.ampproject.org/rtv/011504040004635/v0/amp-ad-network-doubleclick-impl-0.1.js:135:415 https://cdn.ampproject.org/rtv/011504040004635/v0/amp-ad-network-doubleclick-impl-0.1.js:65:117 Yc@https://cdn.ampproject.org/rtv/011504040004635/v0/amp-ad-network-doubleclick-impl-0.1.js:93:392 Xc@https://cdn.ampproject.org/rtv/011504040004635/v0/amp-ad-network-doubleclick-impl-0.1.js:89:85 https://cdn.ampproject.org/rtv/011504040004635/v0/amp-ad-network-doubleclick-impl-0.1.js:82:105 promiseReactionJob@[native code] r = ae = doubleclick Error executing SHORT = 1 Fragment:
Seems like canary runtime is loading prod version of ad extension script. As talked with @erwinmombay offline:
- It's not likely for canary amp runtime to know the current prod RTV and compose a wrong extension URL. More likely it's a environment problem
- This failure is before ad request, so it couldn't be the version from the ad either.
- We don't allow amp-ad in AMP ad, so it shouldn't be amp-inabox
I'm not very familiar what service-worker is doing for caching. Does it rewrite URL to full RTV version? Do we use service-worker on CDN in any case? @jridgewell
Also, worth to mention that this bug might exist for a while, just recently revealed because of the method signature change.
It looks like service workers are not currently involved. I really don't see how RTV can ever be wrong - they are always explicitly selected. The only possibility I see now is that Cache intermittently inserts wrong RTV. But not sure if that's really possible or the case here. I also don't think Cache ever inserts amp-ad-network-doubleclick-impl-0.1.js, but I could be wrong.
i also don't believe cache inserts amp-ad-network-doubleclick-impl-0.1.js from what @lannka told me that is dynamically fetched (correct me if i'm wrong @lannka)
@dvoytenko is there any additional logging we can do to give us more information?
i also don't believe cache inserts amp-ad-network-doubleclick-impl-0.1.js from what @lannka told me that is dynamically fetched (correct me if i'm wrong @lannka)
It is definitely dynamically fetched, but we are definitely considering to add them in Cache. Nor sure where that project is now.
/cc @codewiz
@erwinmombay To answer your question about logging. The current logging is pretty clear and points to a problem very well. We just don't know how we ever arrive at it.
The cache insertion project is still in the works and definitely hasn't been deployed to production yet.
@taymonbeal This is canary error. HAs it been deployed to canary?
No. Also, this is (will be) a feature of the Google AMP Cache; it's entirely separate from the AMP runtime release process.