nurikk / zigbee2mqtt-frontend

Zigbee2MQTT frontend
https://www.zigbee2mqtt.io/
GNU General Public License v3.0
244 stars 183 forks source link

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

Open sdotter opened 5 months ago

sdotter commented 5 months ago

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

peterforeman commented 5 months ago

Same here, after update z2m to 1.35.3.

Scope666 commented 5 months ago

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

Chrome: Version 121.0.6167.139 (Official Build) (x86_64)

image
almirus commented 5 months ago

workaround - click theme icon (sun\moon)

GigiPompieru commented 5 months ago

workaround - click theme icon (sun\moon)

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

Scope666 commented 5 months ago

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)

jehy commented 5 months ago

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.

oronaldosantos commented 5 months ago

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

Kepro commented 5 months ago

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

sdotter commented 5 months ago

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

Haha 😂 commit id?

Kepro commented 5 months ago

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

sdotter commented 5 months ago

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

Thanks! Take it easy dude!

jimmyz5150 commented 4 months ago

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

BillyFKidney commented 4 months ago

workaround - click theme icon (sun\moon)

Resolved the issue for me as well!

Prior to clicking Sun/Moon image

After clicking Sun/Moon image

linuxmaniac commented 4 months ago

same here. Workaround worked for me too.

elgansayer commented 4 months ago

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

danielfaust commented 4 months ago

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.

latinvm commented 4 months ago

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