Themes from themes collection not applied on startup on Chrome

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

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

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

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.

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

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