amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Error: Frame contentWindow unavailable.

Open dparikh opened this issue 8 years ago • 17 comments

stack trace:

Error: Frame contentWindow unavailable. at Error (https://raw.githubusercontent.com/ampproject/amphtml/1527203409437/src/log.js:505) at apply (https://raw.githubusercontent.com/ampproject/amphtml/1527203409437/src/log.js:221) at apply (https://raw.githubusercontent.com/ampproject/amphtml/1527203409437/src/log.js:234) at error (https://raw.githubusercontent.com/ampproject/amphtml/1527203409437/extensions/amp-ad-network-doubleclick-impl/0.1/safeframe-host.js:433) at sendMessage_ (https://raw.githubusercontent.com/ampproject/amphtml/1527203409437/extensions/amp-ad-network-doubleclick-impl/0.1/safeframe-host.js:358)

Sample referrer:

Referrer https://syndication-bleacherreport-com.cdn.ampproject.org/v/s/syndication.bleacherreport.com/amp/green-bay-packers?amp_js_v=0.1&usqp=mq331AQECAEoAQ%3D%3D User agent Mozilla/5.0 (Linux; Android 5.0.1; SAMSUNG SCH-I545 Build/LRX22C) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/6.4 Chrome/56.0.2924.87 Mobile Safari/537.36 Service default-cdn-1p-canary Version 001527816702194

dparikh avatar Jun 01 '18 22:06 dparikh

Talked to @keithwrightbos offline. He said @bradfrizzell would best know how to debug.

to/ @bradfrizzell

calebcordry avatar Jun 01 '18 22:06 calebcordry

hey @calebcordry sorry for the slow response on this Not sure I totally understand the issue here, can you explain what's happening? It looks like we are properly catching that the contentWindow has disappeared, and logging a dev error about it.

bradfrizzell avatar Jun 12 '18 19:06 bradfrizzell

This is the offending line: https://github.com/ampproject/amphtml/blob/master/extensions/amp-ad-network-doubleclick-impl/0.1/safeframe-host.js#L433

bradfrizzell avatar Jun 12 '18 19:06 bradfrizzell

How often is this happening?

bradfrizzell avatar Jun 13 '18 19:06 bradfrizzell

2k in 4 days. not a lot.

https://pantheon.corp.google.com/errors/CJTHpK264a-dfA?time=P1D&filter=Frame%20contentWindow%20unavailable&refresh=off&project=amp-error-reporting

lannka avatar Jun 13 '18 19:06 lannka

I think @erwinmombay was concerned about this a couple weeks ago, but maybe velocity slowed since. 🤷‍♂️

calebcordry avatar Jun 13 '18 20:06 calebcordry

Hi,

Is this the same as this error we are seeing now in production: Error: Invalid resize values. at Error (https://raw.githubusercontent.com/ampproject/amphtml/1528841168349/src/log.js:505) at apply (https://raw.githubusercontent.com/ampproject/amphtml/1528841168349/src/log.js:221) at apply (https://raw.githubusercontent.com/ampproject/amphtml/1528841168349/src/log.js:234) at error (https://raw.githubusercontent.com/ampproject/amphtml/1528841168349/extensions/amp-ad-network-doubleclick-impl/0.1/safeframe-host.js:601) at processMessage (https://raw.githubusercontent.com/ampproject/amphtml/1528841168349/extensions/amp-ad-network-doubleclick-impl/0.1/safeframe-host.js:95)

https://pantheon.corp.google.com/errors/CI2e5dSShvzWKg?service=default-cdn-1p&time=P1D&project=amp-error-reporting

adelinamart avatar Jun 13 '18 23:06 adelinamart

@bradfrizzell can you confirm the above? Thank you.

adelinamart avatar Jun 14 '18 17:06 adelinamart

Yes, again these are just errors that we are logging to handle bad data. nothing actually appears to be broken. Line in question: https://github.com/ampproject/amphtml/blob/master/extensions/amp-ad-network-doubleclick-impl/0.1/safeframe-host.js#L601

Should we be logging errors like this in a different way so that it doesn't cause alerting on your end?

bradfrizzell avatar Jun 14 '18 17:06 bradfrizzell

I linked the reporting to this issue so at least we will see it's known, but not sure if there's more we cna do here. @erwinmombay to comment.

adelinamart avatar Jun 14 '18 17:06 adelinamart

@bradfrizzell do you expect this error to be fixed by AMP dev? If not, it's more like user error, so you should do user().error().

lannka avatar Jun 14 '18 21:06 lannka

This issue hasn't been updated in awhile. @bradfrizzell Do you have any updates?

ampprojectbot avatar Sep 25 '18 08:09 ampprojectbot

This issue hasn't been updated in awhile. @bradfrizzell Do you have any updates?

ampprojectbot avatar Jan 09 '19 10:01 ampprojectbot

@bradfrizzell @erwinmombay @lannka This is currently the second-highest volume error being reported right now. It seems like we are correctly catching a race condition that (I'm guessing here) can occur when we try sending messages to the iframe right away before it's been fully added to the DOM and loaded. This seems to me like it's either a user error or an expected error. Can any of you weigh in on what you think is the right approach here?

rcebulko avatar Mar 12 '20 21:03 rcebulko

@calebcordry could you take a look? My hunch is the error should be ignored. The iframe is likely being detached from DOM when the ad refreshes.

lannka avatar Mar 12 '20 22:03 lannka

sure, will look.

calebcordry avatar Mar 12 '20 22:03 calebcordry

Nice job closing this!

rcebulko avatar Mar 16 '20 17:03 rcebulko