# Themes from themes collection not applied on startup on Chrome

**URL:** <https://discourse.nodered.org/t/themes-from-themes-collection-not-applied-on-startup-on-chrome/59383>\
**Category:** General\
**Created:** [4 March 2022 21:55 UTC](https://discourse.nodered.org/t/themes-from-themes-collection-not-applied-on-startup-on-chrome/59383 "2022-03-04T21:55:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 March 2022 21:55 UTC](https://discourse.nodered.org/t/themes-from-themes-collection-not-applied-on-startup-on-chrome/59383/1 "2022-03-04T21:55:42Z")

</div>

I have a rather annoying symptom when using `@node-red-contrib-themes/midnight-red` (latest - 2.2.0) with Chrome (on Ubuntu). [Edit: In fact this applies to other themes in the collection too] If I stop and restart node red and then open Chrome on the editor then the dark theme is not applied, it seems to stick with the default theme. In the developer console I see

```auto
Refused to apply style from 'http://localhost:1880/theme/css/theme.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
:1880/#flow/bdd7be38.d3b55:1 Refused to apply style from 'http://localhost:1880/theme/css/theme-customizations.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

```

If I close and re-open the browser then again the style is still not applied. However, if I reload the page the style is applied and if I then close and reopen the browser it continues to be applied. I have to restart node-red to make it fail again.

I do not see the problem with Firefox, but also, if I restart node-red, open it in firefox, close FF and then open Chrome I do not see the problem.

This used to be ok, it started happening a little while ago, but I didn't pay enough attention at the time so I don't know what it coincided with. It took me a little while to work out how to reproduce it.

In settings.js I have

```auto
    editorTheme: {
	page: {},
	theme: "midnight-red",
	codeEditor: {
            lib: "monaco"
        },
        projects: {
            enabled: false
        }
    }

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [5 March 2022 11:24 UTC](https://discourse.nodered.org/t/themes-from-themes-collection-not-applied-on-startup-on-chrome/59383/2 "2022-03-05T11:24:18Z")

</div>

> [@Colin](#):
>
> `http://localhost:1880/theme/css/theme.min.css`

The plot thickens.  
If I restart node-red and then attempt to open that page in a browser I get  
`Cannot GET /theme/css/theme.min.css`  
If I then open the editor, refresh the editor page, and then fetch the css page again I see the correct file.

I believe this explains the symptom I am seeing, the difference between browsers maybe being differences in the timing of attempting to fetch that page.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 March 2022 14:44 UTC](https://discourse.nodered.org/t/themes-from-themes-collection-not-applied-on-startup-on-chrome/59383/3 "2022-03-08T14:44:36Z")

</div>

I see that in fact this is not related to a particular theme, so I have posted an issue against node red. [Theme not applied on startup on Chrome, Cannot GET /theme/css/theme.min.css · Issue #3482 · node-red/node-red · GitHub](https://github.com/node-red/node-red/issues/3482)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 May 2022 14:45 UTC](https://discourse.nodered.org/t/themes-from-themes-collection-not-applied-on-startup-on-chrome/59383/4 "2022-05-07T14:45:15Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
