-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[amp-story-player] Story not immediately loading in player, needs user interaction #35959
Comments
That sounds pretty bad, we've seen a ton of errors in our logs starting from 09/03, originating from a Player that would show Stories in their prerender mode. That might probably be it. cc @ampproject/wg-stories |
@swissspidy, thank you for raising this issue. Because of this bug, we have taken down the web story carousel so the web page linked above no longer contains a live example of the bug. |
Hi @pawelslabiak, I'm debugging this and am unable to reproduce the bug locally. |
Hi @processprocess, thank you for looking into this. On a desktop chromium-based browser, we observed the following:
On a mobile chromium-based browser, we observed the following:
On a desktop safari browser:
|
Thanks for positing the demo page. Happy to hear that it's working after updating but it sounds like it's slow and at times still requires interaction. I would like to try testing something else: |
Absolutely—we appreciate your investigating this issue. The page now has a number of spacers at the top to make scrolling necessary to get to the stories block. |
It looks like both stories in the carousel are failing validation: I'm not sure if this would effect the bug or not but it would be good to fix this and re-load the carousel to rule that out. |
Updating your Story with a valid one (cf @processprocess) seems to work for us. If you copy/paste this snippet in the console, and click on the first card, it should load correctly.
|
@processprocess, the black screen issue precedes the AMP validation problem, which is new and seems to arise from another plugin (Yoast SEO) generating an extraneous canonical tag for Web Stories. For the time being, we are filtering those out using the workaround suggested by Mike Zielonka in the relevant Github issue thread. After implementing the filter, stories pass AMP validation but the open behavior remains unchanged. |
As per #35959 (comment), the issue seems to be content based. |
@gmajoulet would love to help further but not sure I understand what exactly you're requesting. Feel free to email me if having an aside offline would be easier. |
@gmajoulet I put together a CodePen for you here: https://codepen.io/swissspidy/pen/eYRGoBN Same issue happens there. |
@processprocess @gmajoulet friendly ping 👋 have you had a chance to look at the CodePen? |
Thank you for following up @swissspidy and posting the codepen. I'm able to reproduce the bug with that and will look into this. |
Is this still a problem? |
Yes @gmajoulet , as @swissspidy notes above, this continues to be an issue. |
@gmajoulet Checking in here as we continue to get reports of this issue on the Web Stories forum. |
I am still getting this error, please can someone let me know when it will be fixed or if there is anything I can do to fix it my end as been many months this problem has been effecting my website for now. |
This buggy behavior also continues on our website. |
Is this problem every going to be fixed as reported way back in April and no one seems to be working on fixing it. |
It is ONE YEAR since this error was reported. Can someone please let me know if it is going to be fixed? |
Thank you for following up. Since it's been a while, can you post an example so we can repro? |
Hi Yes no problem see video of it not working. It has never worked for me. https://www.awesomescreenshot.com/video/10928529?key=1726e40417be7d0be880a6863c464e33 You can test for yourself by visiting https://bitcoin-casino-no-deposit-bonus.com/ |
I believe that the handshake request is sent from the story to the amp-story-player here and the handshake response is then supposed to be sent from the amp-story-player to the story here. In my opinion, the most likely possibilities are that the amp-story-player is either 1) never receiving the request and thus incapable of returning a response, or 2) mishandling the request in such a way that the |
Hello, The fact that the handshake request is never sent makes me think that the elements never built. This could very likely be because the elements have no size, we have an optimization that says that if the content is hidden, we don't build it. You're wrapping our player inside some divs with these classes |
Hi gmajoulet, Many thanks for looking into this for me. I did not realize there was any custom css which I have now found and removed the below .web-stories-embed:not(.web-stories-embed-amp) .wp-block-embed__wrapper { .alignnone { .web-stories-embed .wp-block-embed__wrapper { However the problem is not fixed and still requires two clicks to open a web story. |
Can you link to the updated website please? I've seen a few |
The live version is the updated version with the custom web stories code removed. https://bitcoin-casino-no-deposit-bonus.com/ Would you like me to post all of custom code for CSS/JS here, maybe problem there? Also not one person has been able to answer my ticket as to why certain videos are not been indexed by google. It is greatly damaging my site so if you have any ideas why this is the case it would be much apricated as no one in the google community can answer it. https://support.google.com/webmasters/thread/177831693?hl=en |
You have a You can test your code by running this in the console, and making sure that |
Wow that is so over my head as I no idea how to do that. Are you able to tell me exactly where I would find the code that needs to be changed in wordpress as I can not find any of these web stories lightbox settings??? |
@gmajoulet For context, that CSS is coming from the Web Stories WordPress plugin. Are you saying the player can‘t properly load when it‘s hidden like this? Should calling the player‘s load() method fix this? |
@gmajoulet could you perhaps point me to that optimization you mentioned? I fail to reproduce this locally with similar CSS. @DanielCryptoK Try adding this to your "Additional CSS" section in the WordPress customizer: .web-stories-list__lightbox { display: block !important; } |
The code worked but there is a hidden menu at the top. See image of what I mean here https://www.webpagescreenshot.info/#v2=r78urBJUv |
This is because of something on your website removing the CSS from https://cdn.ampproject.org/amp-story-player-v0.css. Either try disabling all other plugins to find the culprit or add this to "Additional CSS" as a workaround: amp-story-player.i-amphtml-story-player-loaded a { display:none !important; } |
Could it be the below error that is caused by my super progressive apps plugin which the developer knows about and has been trying to fix for the last two months. superpwa-sw.js:9 Uncaught (in promise) TypeError: Failed to execute 'put' on 'Cache': Partial response (status code 206) is unsupported |
That looks unrelated |
I'll also note that in this specific case, it looks like the css is being served from https://bitcoin-casino-no-deposit-bonus.com/wp-content/cache/min/1/amp-story-player-v0.js?ver=1663611239 which looks like it (a) is caching the css, and (b) is changing/minifying the css, both of which are potentially problematic. I can't actually determine whether that is affecting things in this scenario, but also the repro case above at https://cai2r.net/7079-2/ seems more minimal, as it is loading the scripts/styles as expected. Ideally we would find a way to construct a truly minimal reproducible example for this issue to be actionable. |
Would excluding web stories from the CSS option in WP rocket solve this issue? See image https://www.webpagescreenshot.info/#v2=pz4opMOAB |
@DanielCryptoK Maybe, but you would need to exclude |
Ok, just so you know excluding the web stories plugin from the WP rocket CSS settings fixed the Super progressive web app error which was a nice surprise. |
Glad we solved this :)) |
It's not clear to me: did this resolve the original issue? Or just the unrelated JavaScript error? |
@newmuis, the original issue appears not have been solved. @swissspidy @gmajoulet et al., Really appreciate everyone's attention to this issue. |
Who owns the |
I think that is from https://github.com/GoogleForCreators/web-stories-wp. @swissspidy can you confirm? |
Heya, yes as mentioned earlier that is coming from the Web Stories WordPress plugin! Ultimately, Gabriel's suggestion with regards to We should be able to resolve this in the Web Stories WordPress plugin very soon. @pawelslabiak Once we've done so, it will also resolve the issue for you. |
@pawelslabiak Just to follow up, I briefly tested this on your site with dev tools and the fix should work there as well. If you don't wanna wait for a plugin update, try adding this to your "Additional CSS" section in the WordPress customizer:
|
@swissspidy, thank you for following up on this—adding the line you've suggested to the CSS customizer appears to have solved the buggy loading behavior. 🎉 I thought I tested this line of CSS on Sept. 20 and observed no change in the web-story loading behavior. However, on the second go-around today I've realized that I mistakenly tested another CSS line from a recent comment in this thread. Apologies for not being more thorough there—could've probably saved @swissspidy an extra step. Thank you, @swissspidy, @newmuis, @gmajoulet, @coreymasanto, @processprocess for the time you've dedicated to solving this issue. 👏 Looking forward to the fix via plugin update, and to working with web stories again. 🥳 |
We did it, y'all! 🎉 💪 Thanks for the persistence everyone! |
P.S. Does anyone still find the test page at https://cai2r.net/7079-2/ helpful or can we take it down? |
I think you can remove that one |
Description
I originally mentioned this at #34271 (comment), but I think it's a separate issue altogether.
For the WordPress story editor we've been receiving some reports where stories being opened in a lightbox (using
amp-story-player
) are not immediately visible.There's some interesting behavior where the amp-story-player seems to load, but the story is not visible until some user interaction (i.e. press esc or click on the element).
Only after that interaction does the embedded story in the iframe have the
i-amphtml-story-standalone
classname.From what I can see, that class name is added in the
buildCallback
of theamp-story
component, so for some reason that is not being triggered initially:amphtml/extensions/amp-story/1.0/amp-story.js
Lines 518 to 529 in e1edbde
/cc @ampproject/wg-stories @Enriqe
Reproduction Steps
Here's a screenshot showing the missing
i-amphtml-story-standalone
classname at the beginning:Here's a screencast showing the issue:
Screen.Recording.2021-09-06.at.11.50.27.mov
Relevant Logs
Browser(s) Affected
No response
OS(s) Affected
No response
Device(s) Affected
No response
AMP Version Affected
2108192119000
The text was updated successfully, but these errors were encountered: