zigbee2mqtt-frontend icon indicating copy to clipboard operation
zigbee2mqtt-frontend copied to clipboard

[Bug]: frontend is without any css styling: "Could not find specified theme"

Open sdotter opened this issue 1 year ago • 17 comments

What happened?

What happened?

Running frontend from port 8099 port as configured in:

image

Results in frontend without any css styles etc: image

image

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

Latest

Adapter firmware version

6.10.3.0

Adapter

Sonoff dongle e

Setup

Add-on homeassistant docker rpi x64

Debug log

No response

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

Relevant stacktrace

No response

Did you download state.json.zip?

I will attach state.json.zip

sdotter avatar Feb 06 '24 20:02 sdotter

Same here, after update z2m to 1.35.3.

peterforeman avatar Feb 06 '24 20:02 peterforeman

Same here in Chrome on Mac, in Safari it's ok.

Chrome: Version 121.0.6167.139 (Official Build) (x86_64)

image

Scope666 avatar Feb 06 '24 20:02 Scope666

workaround - click theme icon (sun\moon)

almirus avatar Feb 06 '24 20:02 almirus

workaround - click theme icon (sun\moon)

have the same issue, after doing this workaround it seems to work fine even when reloading the page.

GigiPompieru avatar Feb 07 '24 05:02 GigiPompieru

My guess is that drops a cookie. I think the bug happens if the cookie is missing. It would explain why my Safari was still working. (already had the cookie... Chrome tends to dump them with every update)

Scope666 avatar Feb 07 '24 09:02 Scope666

Same here after update.

Theme format was changed in local storage, had to remove it and everything became fine.

Old format :

{"value": "dark"}

new format:

"dark"

That's why switching theme also helps, and other browser, which does not have this option in local storage, also works.

jehy avatar Feb 07 '24 09:02 jehy

Same Here, it happens after the update [v1.35.3-1]

oronaldosantos avatar Feb 07 '24 16:02 oronaldosantos

providing breaking change, without fallback... 😵‍💫

Kepro avatar Feb 07 '24 18:02 Kepro

providing breaking change, without fallback... 😵‍💫

Haha 😂 commit id?

sdotter avatar Feb 07 '24 18:02 sdotter

@sdotter haha very funny... https://github.com/nurikk/zigbee2mqtt-frontend/issues/1921#issuecomment-1931632605 not enough?

Kepro avatar Feb 07 '24 18:02 Kepro

@sdotter haha very funny... #1921 (comment) not enough?

Thanks! Take it easy dude!

sdotter avatar Feb 07 '24 18:02 sdotter

Thank you could not figure out why UI was messed up after hours of searching.. ugh

jimmyz5150 avatar Feb 12 '24 06:02 jimmyz5150

workaround - click theme icon (sun\moon)

Resolved the issue for me as well!

Prior to clicking Sun/Moon image

After clicking Sun/Moon image

BillyFKidney avatar Feb 13 '24 17:02 BillyFKidney

same here. Workaround worked for me too.

linuxmaniac avatar Feb 15 '24 09:02 linuxmaniac

Thanx, work around works, i guess it's not setting an initial theme.

elgansayer avatar Feb 28 '24 21:02 elgansayer

I couldn't find the sun icon because it looked like a "Donate" button to me. So press the sun/donate (golden coin) button would be the solution.

In any case, what I did was to remove the z2m-theme from localStorage and while at it I removed all localStorage entries, just in case others also got changed. Result: No, the others are still JSON strings.

What bothers me a bit is that the new localStorage entry is enclosed by quotes, while i18nextLng is also a string but not enclosed by quotes, so there seems to be an inconsistency there. Usually if you JSON.stringify a string, it gets enclosed by quotes.

So maybe it is a bug, where instead of theme = {"value": "dark"}; JSON.stringify(theme) (resulting in {"value": "dark"}) the following is used theme="dark"; JSON.stringify(theme);, resulting in "dark"), but it makes no sense to stringify that string, hence I believe it is a bug.

danielfaust avatar Feb 29 '24 08:02 danielfaust

Thanks, simply clearing "cookies" and "local storage" and logging back in fixed this.

latinvm avatar Mar 03 '24 10:03 latinvm