搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

CSS file is not loading in time (race condition) and it is only happening in Firefox and not other browsers

more options

We are getting errors that css values not defined as if the css file is not loaded from our CDN, which is only happening in Firefox and not other browsers that we support.

We confirmed something changed in Firefox that is triggering this around FF version 132. With the ESR (currently 128.5) and the page is working correctly. When we switched back to latest 133 and the bug is there


In the situations it happens, sometimes our css is NOT being loaded. In others, it is loaded and doesn't work but I see things trying to render before the file shows up in the console network logs. When it works...it is coming up cached. So this feels like a race condition of some type


I'm pretty sure the rule is that css is blocking, because we discussed race conditions when we implemented this, so this might be a Firefox bug? If this is a Firefox bug that isn't in an esr yet, we want to get it filed against firefox and fixed before the next esr.

We even tried a hacky patch on our code's method that is in question, as well as tried putting the expected css font-family style into a <style> tag in our index.html. The patch worked on Windows. It did not work on Mac. Stepping through the code, we see `undefined` / `null`. This definitely implies that the css styles simply have not been applied when the first component asking for the theme is routing through this code.


So again: our Firefox > 132. ESR up to 131 doesn't produce this issue, so something changed in Firefox 132.


If we tried loading our css file in a parent page (just loading, not using) to get it into the mix sooner, it doesn't help. An iframe is still loading faster than its parent frame is loading that css file from the CDN.

We are getting errors that css values not defined as if the css file is not loaded from our CDN, which is only happening in Firefox and not other browsers that we support. We confirmed something changed in Firefox that is triggering this around FF version 132. With the ESR (currently 128.5) and the page is working correctly. When we switched back to latest 133 and the bug is there In the situations it happens, sometimes our css is NOT being loaded. In others, it is loaded and doesn't work but I see things trying to render before the file shows up in the console network logs. When it works...it is coming up cached. So this feels like a race condition of some type I'm pretty sure the rule is that css is blocking, because we discussed race conditions when we implemented this, so this might be a Firefox bug? If this is a Firefox bug that isn't in an esr yet, we want to get it filed against firefox and fixed before the next esr. We even tried a hacky patch on our code's method that is in question, as well as tried putting the expected css font-family style into a <style> tag in our index.html. The patch worked on Windows. It did not work on Mac. Stepping through the code, we see `undefined` / `null`. This definitely implies that the css styles simply have not been applied when the first component asking for the theme is routing through this code. So again: our Firefox > 132. ESR up to 131 doesn't produce this issue, so something changed in Firefox 132. If we tried loading our css file in a parent page (just loading, not using) to get it into the mix sooner, it doesn't help. An iframe is still loading faster than its parent frame is loading that css file from the CDN.

所有回覆 (1)

more options

Could be that CSS isn't support in release browser version and your CSS need to be updated to work with non-esr browser.

有幫助嗎?

問個問題

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題