# Rendering 'TypeError' with theme components after update

**URL:** https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263
**Category:** Bug
**Created:** [September 2, 2025, 10:10am UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263 "2025-09-02T10:10:38Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [September 2, 2025, 10:10am UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/1 "2025-09-02T10:10:38Z")

</div>

I just updated to this : [Commits · discourse/discourse · GitHub](https://github.com/discourse/discourse/commits/2f398db9b66f19220b5a7f56721a68f41dcdeeec) 2f398db9b66f19220b5a7f56721a68f41dcdeeec

Two different theme components now completely break my site. They are the “Modern Category + Group Boxes” from [Air Theme](https://meta.discourse.org/t/air-theme/197703) and [Avatar Size and Shape](https://meta.discourse.org/t/avatar-size-and-shape/106124)

They render the site unusable (looping?). Happens on both Firefox and Chrome (desktop)

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/a/3/8a3bea2bd3549c1632eab8510dec320e99aa3714.png)

I have tried them with no plugins and in isolation on different themes (ie [safe mode](https://meta.discourse.org/t/53504?silent=true) 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.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [September 2, 2025, 10:54am UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/2 "2025-09-02T10:54:07Z")

</div>

Sorry I can’t repro so far

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [September 2, 2025, 11:41am UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/3 "2025-09-02T11:41:25Z")

</div>

> [@piffy](#):
>
> Uncaught (in promise) TypeError: Invalid value used as weak map key

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.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [September 2, 2025, 12:28pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/4 "2025-09-02T12:28:30Z")

</div>

This might help track it down:

> [@Cannot put the template in the desired outlet](https://meta.discourse.org/t/cannot-put-the-template-in-the-desired-outlet/330650/11):
>
> Thank you. This really helps with the developer experience. Which as we know has improved dramatically with.gjs over widgets. however There are lots of very odd errors you can get when using gjs components that do not make finding the issues very easy. For example, lets mess up the helper name: {{html\_safe this.bannerTextContent}} Leads to the classic: program.js:100 Uncaught (in promise) TypeError: Invalid value used as weak map key at WeakMap.set (\<anonymous\>) (this also happens…

Check the helpers!

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [September 2, 2025, 12:50pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/5 "2025-09-02T12:50:08Z")

</div>

can you share a page/site where it’s happening @Don @piffy ?

---

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [September 2, 2025, 5:18pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/6 "2025-09-02T17:18:29Z")

</div>

Here is a simple theme I set up that only has the avatar component: [Elite Fourum - E4 - efour](https://www.elitefourum.com/latest?safe_mode=no_plugins&preview_theme_id=39)

`https://www.elitefourum.com/latest?safe_mode=no_plugins&preview_theme_id=39`

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/3/7/73762b4624090c7d47f110e3c8b3ab97110f5c13.png)

I can repo the issue at this link on firefox and chrome (desktop)

* * *

Modern Category + Group Boxes : [Elite Fourum - E4 - efour](https://www.elitefourum.com/?safe_mode=no_plugins&preview_theme_id=58)

`https://www.elitefourum.com/?safe_mode=no_plugins&preview_theme_id=58`

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/4/5/44543bf57fd62dde478d3873dd258f399df90e65.png)

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.

Hope it helps!

---

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [September 2, 2025, 5:23pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/7 "2025-09-02T17:23:29Z")

</div>

the closest thing I could get to an iterpretable error message is

> client-error-handler.js:125 [THEME 39 ‘Test’] Error: Could not find module `admin/components/color-input` imported from `(require)`

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/6/2/e62e4a57da2e84d1f4b3de5f4d5275fe63835a8b.png)

the `customize-edit-category-general.js` is coming from the Air Theme:

> <https://github.com/discourse/discourse-air/blob/02694cf4c43a128451b6e1fbfe90d2e858074cfd/javascripts/discourse/initializers/customize-edit-category-general.js#L5>

in core:

> <https://github.com/discourse/discourse/blob/b07438202f85d166ea22ccc128c95928d32af6e7/app/assets/javascripts/discourse/app/components/edit-category-general.gjs#L19>

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [September 2, 2025, 5:45pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/8 "2025-09-02T17:45:35Z")

</div>

This looks like the same issue: [Forum navbar is repeating](https://meta.discourse.org/t/forum-navbar-is-repeating/381344)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [September 2, 2025, 6:14pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/9 "2025-09-02T18:14:57Z")

</div>

This will fix the `color-input` error from the air theme. But this issue is not new, so I think it’s unlikely to be the cause of these rendering errors

[https://github.com/discourse/discourse/pull/34689](https://github.com/discourse/discourse/pull/34689)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [September 2, 2025, 6:56pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/10 "2025-09-02T18:56:31Z")

</div>

@piffy please can you try updating to the latest tests-passed, just in case that `color-input` fix helps at all.

Assuming things are still broken after a rebuild, please can you try this:

```plaintext
./launcher enter app
rails c
Discourse.clear_all_theme_cache!

```

Same goes for you @don, if you have the time.

If that solves the problem, then it suggests we have an issue with the theme cache invalidation 🤔

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [September 2, 2025, 7:23pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/11 "2025-09-02T19:23:29Z")

</div>

Thanks David, it seems this do the trick for me.

> [@david](#):
>
> ```plaintext
> ./launcher enter app
> rails c
> Discourse.clear_all_theme_cache!
> 
> ```

---

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [September 2, 2025, 7:29pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/12 "2025-09-02T19:29:23Z")

</div>

Also confirming the update didn’t help but the theme cache reset worked.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [September 2, 2025, 7:31pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/13 "2025-09-02T19:31:45Z")

</div>

Ok great, thanks for confirming! We’ll try to solve this problem in the theme caching system, so that manual action isn’t required.

But in the meantime, for anyone else who runs into these issues:

```plaintext
Uncaught TypeError: Cannot read properties of null (reading ‘syscall’)

```

```plaintext
Uncaught (in promise) TypeError: Invalid value used as weak map key

```

Please take these steps on the console:

```plaintext
./launcher enter app
rails c
Discourse.clear_all_theme_cache!

```

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [September 2, 2025, 7:45pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/14 "2025-09-02T19:45:46Z")

</div>

@piffy @Don are you both running a single-container [standard install](https://meta.discourse.org/t/142537?silent=true)?

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [September 2, 2025, 7:49pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/15 "2025-09-02T19:49:44Z")

</div>

> [@david](#):
>
> running a single-container [standard install](https://meta.discourse.org/t/142537?silent=true)?

Yes, I’m on a single-container [standard install](https://meta.discourse.org/t/142537?silent=true).

---

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [September 2, 2025, 7:53pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/16 "2025-09-02T19:53:15Z")

</div>

I’m running Ubuntu 20.04.6 LTS (I see it’s no longer officially supported) on DigitalOcean, single container.

Notable deviations from [standard install](https://meta.discourse.org/t/142537?silent=true):

- [Add an offline page to display when Discourse is rebuilding or starting up](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238)
- [Move Uploads and Backups to DigitalOcean Block Storage](https://meta.discourse.org/t/move-uploads-and-backups-to-digitalocean-block-storage/89274)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [September 2, 2025, 8:02pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/17 "2025-09-02T20:02:49Z")

</div>

One more question. When it first broke, were you running a UI update or a CLI rebuild?

---

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [September 2, 2025, 8:04pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/18 "2025-09-02T20:04:13Z")

</div>

Admin UI

adding more words to overcome 20 char post limit

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [September 2, 2025, 8:06pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/19 "2025-09-02T20:06:18Z")

</div>

Yes, me too. I did the UI update first.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [September 2, 2025, 9:07pm UTC](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263/20 "2025-09-02T21:07:35Z")

</div>

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:

[https://github.com/discourse/discourse/pull/34694](https://github.com/discourse/discourse/pull/34694)

It also forces a recompilation, so sites that have already been affected by this bug will be sorted after their next update.

[Next page](https://meta.discourse.org/t/rendering-typeerror-with-theme-components-after-update/381263.md?page=2)
