You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've come across a strange issue where Bento components sporadically fail to render when they appear on some transformed AMP pages (i.e. SSR'ed with AMP Optimizer). I've put together a test case to demonstrate: https://amp-bento-component-ssr-init-fail.glitch.me/
See the following video for the buggy behavior in the third iframe with the heading “With WP Admin Bar w/ SSR”, after I reload the page a couple times:
This SSR'ed AMP with the WordPress admin bar consistently fails to have the amp-youtube and amp-video Bento components render.
Pass
Fail
The difference between the two is the i-amphtml-sizer element. In the working version, it has the slot="i-amphtml-svc" attribute whereas in the failing version, this slot attribute is absent.
When the WordPress admin bar is present (in which case the SSR'ed Bento components often fail to render), the following changes are present:
Additional stylesheets are added.
Additional scripts are added.
Additional HTML elements are added.
There seems like a race condition going on, and it may be that the additional stylesheets and scripts are making the race condition more likely to happen.
I can reproduce consistently in Chrome, Edge, and Safari. In Firefox I've been able to reproduce the issue less frequently, mainly after doing hard refreshes.
Description
I've come across a strange issue where Bento components sporadically fail to render when they appear on some transformed AMP pages (i.e. SSR'ed with AMP Optimizer). I've put together a test case to demonstrate: https://amp-bento-component-ssr-init-fail.glitch.me/
See the following video for the buggy behavior in the third iframe with the heading “With WP Admin Bar w/ SSR”, after I reload the page a couple times:
bento-components-sporadically-fail-to-initialize-with-ssr.mov
This SSR'ed AMP with the WordPress admin bar consistently fails to have the
amp-youtubeandamp-videoBento components render.The difference between the two is the
i-amphtml-sizerelement. In the working version, it has theslot="i-amphtml-svc"attribute whereas in the failing version, thisslotattribute is absent.The markup pre-SSR:
The markup after SSR:
When the WordPress admin bar is present (in which case the SSR'ed Bento components often fail to render), the following changes are present:
There seems like a race condition going on, and it may be that the additional stylesheets and scripts are making the race condition more likely to happen.
Reproduction Steps
Go to https://amp-bento-component-ssr-init-fail.glitch.me/ (and potentially reload the page) to see the third iframe have Bento AMP components that fail to load.
I can reproduce consistently in Chrome, Edge, and Safari. In Firefox I've been able to reproduce the issue less frequently, mainly after doing hard refreshes.
Relevant Logs
No response
Browser(s) Affected
Chrome, Firefox, Safari, Edge
OS(s) Affected
No response
Device(s) Affected
No response
AMP Version Affected
2107170150000