cssreactjsmaterial-uiemotionnext.js14

Inline stylesheets not reflected applied by emotion(mui) in Next.js project only in Chrome


Classes from Inline stylesheets generated by emotion(MUI) are not getting applied. Facing issue only in latest Chrome (v129) working for other browsers and even for Chrome (version <=128).

I have attached two screenshots, In Screenshot 1, I have taken an example of class(emotion) applied to svg element is getting reflected in styles hence styles are getting applied where as in Screenshot 2 same class is not getting reflected in styles hence it is not working and it is happenig for other HTML elements such as fieldset.

Case: Working (Chrome <= v128, Safari, Firefox, Brave) https://drive.google.com/file/d/1ZbFVakFu_2lOFIGiIOmX7UocT0tZaZjc/view?usp=drive_link

Case: Not Working (Only in Chrome v129) https://drive.google.com/file/d/1DfeoHLEdBB27QDGnKtya7HQivVDC6rm1/view?usp=drive_link Can anyone help with the possible solution?

Relavant Tech Stack Next.js: v13 MUI: v5.14

OS Specifications OS: macOS Sequoia (v15.0)

I've tried across multiple browsers and Chrome<=v128, working correctly for me but not working only in Chrome v129 as expected as I mentioned above.


Solution

  • Following https://chromium.googlesource.com/playground/chromium-org-site/+/refs/heads/main/for-testers/command-line-flags.md and running /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --js-flags=--no-maglev-optimistic-peeled-loops fixes the bug for me.

    from https://issues.chromium.org/issues/367758074

    Update: Fixed on Chrome new release (129.0.6668.71)