-
Notifications
You must be signed in to change notification settings - Fork 680
Web page code examples from prism are broken on last production build #6310
Comments
@schalkneethling I've seen that too. Do you know what it could be? |
@tobinmori this looks like a platform issue rather than a docs issue. See also #6307. |
thanks @chrisdavidmills, sorry for the mis-assignment! |
@atopal can you let me know the priority of this one? |
@EstevesDiogo - is this working for you? Thanks! |
I can also confirm that this works for me in Fx-Dev, Fx, Chrome and Safari |
I've seen that before when we were experimenting with inline CSS. It seems like some CSS is missing. @tobinmori this is the top priority, if anyone can reproduce. It's the most visible feature on MDN. |
I wanted to check when this broke and the page load waterfall on Speedcurve, but it seems like the last recorded deployment was on December 19. Is that correct? |
Weird thing is that this doesn't show up in Speedcurve tests over the last few days (only testing in Chrome though). It seems to be an intermittent issue, so it could still be happening. Do we have any error logging that would help to see if anything has spiked? |
If it is some CSS not loading, which is surely what it looks like, then it is happening on the sub-domain(interactive-examples.mdn.mozilla.net) and not the main d.m.o domain so, not sure what logging we have there. |
The only CSS that matters is What's so baffling is that the last release was: fb2d23f which was 3 weeks ago. What it introduced has virtually nothing to do with CSS or .css files or anything like that. Even after months on the team I still don't really understand how interactive examples really works but someone more familiar with how it's released and deployed and hosted. For one thing, the static .css files aren't aggressive cached so what might happen if one changes in the CDN and thee other doesn't or something like that? |
@tobinmori It works and then it does not, it is |
Thank you!! Do you see anything interesting in the Web Console when that happens? |
Hey, @peterbe yes some times when you refresh it corrects and some times when you refresh it breaks again as you can see on this gif ----> |
It's extremely hard to see but all that yellow text appears to be the same block of yellow text on the renders when it actually does work. |
Yes, they are the same warnings. |
Interestingly I see all of those, except for the first, mentioned Codota.com. Is there perhaps a browser extension from this website/service that you have installed? If so, could you try disabling it, or accessing the site in a private window and see whether the problem goes away? Thanks so much for your help in debugging this. |
Btw, @schalkneethling - @atopal and I could reliably reproduce this upon opening a new tab in Chrome and loading the page from scratch. (if you reload an existing instance of the page in a tab, the err goes away). A hypothesis - some sort of Chrome-specific race condition regarding CSS loading/rendering related to caching? I could not reproduce this in FF or Safari. |
We have updated CodeMirror and there is a new release of Bob: I will do some testing locally to ensure nothing broke but I have also asked @wbamberg to kick the tyres. |
Ok, mdn/interactive-examples#1525 has been merged. In ~30min the new builds of interactive examples will be on production. 🤞 |
The new version of CodeMirror is live, and seems to work fine, but I still see the overlapping-line-numbers problem in Chrome :(. |
Can you please verify the network (JS files) used inside the iframe? As of 1min ago I see |
|
+1 Confirming that the err still occurs, unfortunately; I'm using codemirror build 5-50-2. (Chrome) |
SOME PROGRESS! Hang on this is messy. So, I manually edited the compiled browser JS (used That fixes it! According to https://codemirror.net/doc/manual.html
I have a feeling that https://codemirror.net/doc/manual.html#addon_autorefresh might be the ticket. It's kinda hard to know exactly how our iframe works but clearly there's something weird going on exclusively in some browsers (looking at you Chrome). |
Turns out we are already doing that for the tabbed interface: Definitely looks like autorefresh will make this easier by taking care of that automatically. Thanks, @peterbe |
Great find Peter! \o/ |
That's a bit worrying, because I see this problem with the HTML examples, too: |
That means that how we're doing |
So, we are not doing that for the initial load. If you switch between the tabs does it fix itself? |
I can unfortunately still reproduce this on production in Chrome. While it does not happen on the first load, refreshing the page in the new tab a couple of times(4-5) reproduces the issues. 😿 |
@schalkneethling on which page are you seeing that behavior? I was able to reproduce it reliably, but can't reproduce it at all anymore in the latest release version of Chrome (79) |
I followed the steps outlined by Will on the related issue:
|
Ah, alright. I thought this was the "open new tab" > "open MDN page" steps. Which wasn't reproducing for me anymore. That said, even the steps you just outlined, I can't reproduce it. |
Unfortunately, I can reproduce this; initial load is fine, but the gutter bug appears after I hit reload on the right-clicked new tab. Chrome 79. |
Almost definitely a race condition. I can now reproduce again in about 20% of the reloads. I think this is fine for now, but I'd like to know if there is any way we can instrument this. I'd really like to know how often this is happening. Any ideas? |
I and @peterbe chatted about this briefly. The other option is to not use the plugin, and instead do something like:
The problem I see with instrumenting this is to know what to use as an event to send a GA event. There is no error that correlates with this happening so, it is hard to know when exactly it happened. Perhaps there is a class or DOM element that is not injected and one can check for the presence/absence of it. At the same time, perhaps it is overkill and the times this does happen would be very rare now? |
Well, the whole point is that we don't know whether it's rare or not, because we have no idea what triggers it. Maybe we should add a small feedback option, and ask users to report broken examples. We don't have a baseline to measure it against, but at least we could get a hint for the magnitude. |
There might be a way to tell, after a second or so, if the refresh didn’t
work. But if that’s the case we could just trigger the refresh.
I’d be happy to fix interactive examples but not sure where to find the
time :)
On Sun, Jan 26, 2020 at 7:40 AM Kadir Topal ***@***.***> wrote:
Well, the whole point is that we don't know whether it's rare or not,
because we have no idea what triggers it. Maybe we should add a small
feedback option, and ask users to report broken examples. We don't have a
baseline to measure it against, but at least we could get a hint for the
magnitude.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6310?email_source=notifications&email_token=AAAGQ4YAXOYNVZNLIKWATZTQ7WAFDA5CNFSM4KD2QKVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ5S5LY#issuecomment-578498223>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAGQ462IJTS6HNFO7ZG6RDQ7WAFDANCNFSM4KD2QKVA>
.
--
Peter Bengtsson
Mozilla MDN Web Docs
https://www.peterbe.com
|
@atopal can we close or table this for now? |
yeah, let's close this :( |
The text was updated successfully, but these errors were encountered: