Closed ampprojectbot closed 3 years ago
@dvoytenko this started appearing in small volumes 1/9 (probably the first Nightly build that contained https://github.com/ampproject/amphtml/pull/31762 from 1/7) and has grown in volume as it reached Beta/Experimental. Appears to be related to the changes in amp-img
or custom-element
.
/cc @samouri as reviewer of ampproject/amphtml#31762 Looks like this error is occurring only on iPhone user-agents
Errors surface across both ESM and non-ESM builds
Stacktrace indicates this.getResource_()
is returning undefined
. That function call evaluates to this.getResources().getResourceForElement(this)
returning undefined
Two potential dupes:
The error means the Resource doesn't exist for the img and is happening during layoutCallback
. The only way I can guess for an img to get to that state would be if it was disconnect()
ed and didn't have its layoutCallback cancelled correctly.
Could be that this section of code needs to include ResourceState.LAYOUT_SCHEDULED
:
Looks like the fix worked. Bug is not appearing in nightlies or beta anymore.
Details
Error report: link First seen: Jan 9, 2021 Frequency: ~ 4,110/day
Stacktrace
Notes
@dvoytenko
modifiedsrc/custom-element.js:996-1004
in #31762 (Jan 7, 2021)@dvoytenko
modifiedbuiltins/amp-img.js:270-271
in #31762 (Jan 7, 2021)@zhouyx
modifiedsrc/custom-element.js:1118-1118
in #15410 (May 18, 2018)@jridgewell
modifiedsrc/utils/promise.js:75-78
in #15143 (May 8, 2018)@renovate-bot
modifiedsrc/utils/promise.js:74-74
in #27350 (Mar 30, 2020)@zhouyx
modifiedsrc/custom-element.js:1118-1118
in #15410 (May 18, 2018)@jridgewell
modifiedsrc/service/resource.js:950-950
in #20814 (Feb 14, 2019)@jridgewell
modifiedsrc/service/vsync-impl.js:469-470
in #20836 (Feb 14, 2019)@rsimha
modifiedsrc/service/vsync-impl.js:426-426
in #23363 (Jul 17, 2019)Seen in:
Possible assignees:
@dvoytenko
,@rsimha
/cc @ampproject/release-on-duty