ampproject / error-reporting

Contains production error tracking issues.
Apache License 2.0
2 stars 5 forks source link

🚨 Error: Failed to execute 'observe' on 'IntersectionObserver': Cannot observe a cross-origin target because the observer has a root margin value specified as a percent. #20

Closed ampprojectbot closed 3 years ago

ampprojectbot commented 3 years ago

Details

Error report: link First seen: Oct 26, 2020 Frequency: ~ 146/day

Stacktrace

Error: Failed to execute 'observe' on 'IntersectionObserver': Cannot observe a cross-origin target because the observer has a root margin value specified as a percent.
    at observe (src/service/loading-indicator.js:94:4)
    at loadingIndicator (src/custom-element.js:1644:10)
    at toggleLoading (src/custom-element.js:838:6)
    at node (src/polyfills/custom-elements.js:455:8)
    at connectedCallback_ (src/polyfills/custom-elements.js:369:8)
    at upgrade (src/polyfills/custom-elements.js:345:6)
    at forEach (src/polyfills/custom-elements.js:344:4)
    at define (src/polyfills/custom-elements.js:150:4)

Notes

@dvoytenko modified src/service/loading-indicator.js:1-179 in #30634 (Oct 15, 2020) @dvoytenko modified src/custom-element.js:1641-1648 in #30634 (Oct 15, 2020) @dvoytenko modified src/custom-element.js:837-838 in #30634 (Oct 15, 2020) @jridgewell modified src/polyfills/custom-elements.js:454-458 in #18190 (Dec 5, 2018) @jridgewell modified src/polyfills/custom-elements.js:347-387 in #17205 (Aug 3, 2018) @jridgewell modified src/polyfills/custom-elements.js:345-346 in #25337 (Oct 30, 2019) @renovate-bot modified src/polyfills/custom-elements.js:344-344 in #27350 (Mar 30, 2020) @jridgewell modified src/polyfills/custom-elements.js:140-196 in #17205 (Aug 3, 2018)

Seen in:

Possible assignees: @dvoytenko, @jridgewell

/cc @ampproject/release-on-duty

jridgewell commented 3 years ago

/cc @samouri

dvoytenko commented 3 years ago

To clarify: is this PROD?

samouri commented 3 years ago

@dvoytenko: Only "seen in" Beta and Experiment-A. Chromium source: https://chromium.googlesource.com/chromium/src/+/7beaecbcac87a75ced26b4415fb84fc2cf559307/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp#210

dvoytenko commented 3 years ago

Found this error here too. I don't yet understand why we're not running into it with the loader experiment?

jridgewell commented 3 years ago

Can we just switch from root margin percents to absolutes?

dvoytenko commented 3 years ago

Yes. For this class of problems we definitely can. Pull request is on the way.

dvoytenko commented 3 years ago

Fix: https://github.com/ampproject/amphtml/pull/30871