Users piffy and Don reported a critical rendering bug after updating Discourse to commit 2f398db, causing their sites to break with errors like TypeError: Cannot read properties of null (reading 'syscall') and Invalid value used as weak map key. The issue occurs specifically when certain theme components — notably “Modern Category + Group Boxes” and “Avatar Size and Shape” — are active, often resulting in blank or looping pages. Both users confirmed the problem persists across browsers and even in safe mode, ruling out plugin conflicts. Don noted the bug appears only on pages using custom theme components and found temporary relief by toggling components on/off. piffy shared test links reproducing the issue, including one where the error only appears when logged in as admin. A related error traced to missing admin/components/color-input was identified in the Air Theme piffy, but david clarified this is unrelated to the core rendering issue. After david suggested clearing the theme cache via Discourse.clear_all_theme_cache!, both Don and piffy confirmed this fixed the problem. david concluded the root cause is a theme cache invalidation bug triggered by UI-based updates, not CLI rebuilds. He submitted a fix PR #34694 to address the cache issue and force recompilation on future updates. Both users run single-container installs — Don standard, piffy on Ubuntu 20.04 with minor customizations. For now, manually clearing the theme cache is the recommended workaround for affected sites.
I have tried them with no plugins and in isolation on different themes (ie safe mode with no plugins and on an isolated theme), so I don’t think it’s specific to my instance.
Console reports lines like this:
Uncaught TypeError: Cannot read properties of null (reading ‘syscall’)
Uncaught (in promise) TypeError: Invalid value used as weak map key
message-bus.js:118 MESSAGE BUS FAIL: callback /latest caused exception TypeError: Cannot read properties of null (reading ‘syscall’)
As a temporary solution, I have forced my users onto a generic theme until it’s figured out. Please let me know if you can replicate this error.
I’m experiencing the same issue on my site. For example, when I log out, the page turns completely white with the same error. Some users also reported that they can’t log in because the page is just blank. It seems to happen randomly.
The main problem is that there’s no clear error message to indicate what’s causing it. I tried to track it down by checking my theme components. I’ve already updated most of them to gjs, but here’s the interesting part: when I deactivate and then reactivate a specific component, the site starts working again without errors. I still don’t know what’s causing this issue though… It seems that the problem only occurs on pages where a (custom) theme component is present. So at least this gives me a clue that the issue must be coming from one of the components.
this one seems harder to repo. It causes issues when I’m logged into my admin account (chrome and firefox) but not when I try on a dummy account. The bugs seem similar though between both theme component so maybe fixing one will solve the other.
I haven’t been able to reproduce the problem, but I did find one possible problem which is specific to the way UI-based upgrades work. This should take care of it: