Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control Panel Device List Expansion Button Does Not Work #3807

Closed
3 tasks done
polskikrol opened this issue Jul 11, 2024 · 15 comments
Closed
3 tasks done

Control Panel Device List Expansion Button Does Not Work #3807

polskikrol opened this issue Jul 11, 2024 · 15 comments
Labels
bug Something isn't working

Comments

@polskikrol
Copy link

Checklist

  • I am not using Home Assistant. Or: a developer has told me to come here.
  • I have checked the troubleshooting section and my problem is not described there.
  • I have read the changelog and my problem is not mentioned there.

Deploy method

Docker

Z-Wave JS UI version

9.14.6.0443565

ZwaveJS version

12.12.4

Describe the bug

This broke a few versions ago, and thought it would have been fixed quickly with other user reports. So, I navigate via http://IP:8091/#/control-panel and have my list of zwave devices. In past versions, I would click on the device options expansion button and then see things for tweaking settings, upgrading firmware, etc. This does not work anymore. Please see the attached image as it is worth a thousand words.

Screenshot 2024-07-11 at 10 29 40

To Reproduce

Using newer versions of Brave and Firefox and see the same behaviour. This is on a MacOS.

Expected behavior

The button should work and provide other options.

Additional context

No response

@polskikrol polskikrol added the bug Something isn't working label Jul 11, 2024
@thecobra666
Copy link

Same here.

@robertsLando
Copy link
Member

Tested on both Chrome and Firefox on my PC (Ubuntu 22) and it's working. I would need some more context here in order to help you, could you try to check browser console and tell me if there are errors there?

@AlCalzone
Copy link
Member

Works fine for me on Ubuntu 22.04 with Firefox 128 and Chrome 126. Also works fine on Windows 11 with Firefox 128, Chrome 126 and Edge 126.

@thecobra666
Copy link

Docker container on raspberry pi 4. Using latest google chrome. Also have it in a private session.

I'm seeing this error and goes up very fast (also keeps going) but this looks like to not be related?

260index-uljSDiHk.js:6 RangeError: Invalid time zone specified: Europe/Brussel
at Date.toLocaleString ()
at Object.getDateTimeString (index-uljSDiHk.js:80:5227)
at Object. (index-uljSDiHk.js:12:4777)
at r. (index-uljSDiHk.js:12:6743)
at fn (StatisticsArrows-55cZd_mG.js:2:1030)
at Object.i [as activator] (index-uljSDiHk.js:6:19570)
at mt (index-uljSDiHk.js:47:8815)
at m.genActivator (index-uljSDiHk.js:18:68499)
at m.render (index-uljSDiHk.js:15:220583)
at Kg.t._render (index-uljSDiHk.js:6:22130)
Yl @ index-uljSDiHk.js:6
index-uljSDiHk.js:6 RangeError: Invalid time zone specified: Europe/Brussel
at Date.toLocaleString ()
at Object.getDateTimeString (index-uljSDiHk.js:80:5227)
at Object. (index-uljSDiHk.js:12:4777)
at r. (index-uljSDiHk.js:12:6743)
at ExpandedNode-Rbrgsow1.js:4:7425
at m.Og [as _l] (index-uljSDiHk.js:6:16356)
at m.y (ExpandedNode-Rbrgsow1.js:4:7281)
at Kg.t._render (index-uljSDiHk.js:6:22130)
at m.s (index-uljSDiHk.js:6:32156)
at t.get (index-uljSDiHk.js:6:28348)

@AlCalzone
Copy link
Member

AlCalzone commented Jul 15, 2024

Europe/Brussel

The correct timezone string is Europe/Brussels, so maybe that is related. pretty sure this is related. Try correcting the timezone in your container settings or whereever you specify it.

@thecobra666
Copy link

Europe/Brussel

The correct timezone string is Europe/Brussels, so maybe that is related. pretty sure this is related. Try correcting the timezone in your container settings or whereever you specify it.

Correct, fixed now. Never saw this. Thanks

@robertsLando
Copy link
Member

I think this got broken when I fixed the timezone on UI some versions ago. Seems the timezone selected in container was not set correctly on the UI, this is why it was working before :)

Thanks @AlCalzone

@polskikrol
Copy link
Author

polskikrol commented Jul 15, 2024

How did you fix this? I originally had 'America/NewYork' and this had worked for months, but stopped working with some release. I am passing the timezone via my docker compose file...

  • TZ='US/Eastern'

However, receive the error in the browser using developer tools for both that I have tested...
RangeError: invalid time zone in DateTimeFormtat(): 'America/New_York'
RangeError: invalid time zone in DateTimeFormtat(): 'US/Eastern'

@polskikrol
Copy link
Author

polskikrol commented Jul 15, 2024

Ok, so this is odd.... it didnt like the single quotes?

    environment:
      - SESSION_SECRET='REDACTED'
      - ZWAVEJS_EXTERNAL_CONFIG='/usr/src/app/store/.config-db'
      - TZ='US/Eastern'

Was changed to...

	environment:
      - SESSION_SECRET='REDACTED'
      - ZWAVEJS_EXTERNAL_CONFIG='/usr/src/app/store/.config-db'
      - TZ=US/Eastern

I dont see this issue with any of my other docker containers. I usually use single quotes for strings, and double quotes for strings referencing variables in my docker compose files.

@robertsLando
Copy link
Member

maybe the / is the problem with that string?

@Laurentjg
Copy link

I can confirm the same behavior and fixed it as in my docker compose file there was an error:
- TZ=Europe/Amserdam
now replaced by
- TZ=Europe/Amsterdam

@AlCalzone
Copy link
Member

@robertsLando maybe verify that the setting is valid before using it?

robertsLando added a commit that referenced this issue Jul 16, 2024
@robertsLando
Copy link
Member

Done :)

@polskikrol
Copy link
Author

Done :)

My understanding is that in the newer docker compose format and binaries (using dotenv), the single quotes are supported. I was getting this issue when using single quotes in my docker compose, but when I removed those it worked. Reviewed the new code in the recent update, and didnt notice if the var is being sanitized before possible use. For example, I also set the vars for SESSION-SECRET and ZWAVEJS_EXTERNAL_CONFIG with single quotes, and there are no issues with these. For example, printenv would show SESSION-SECRET='somepassword' and I am able to login with somepassword instead of 'somepassword' as would be the literal string. So.... just want to be 100% sure we dont need to consider sanity parsing (kindof like using trim on variables for extraneous spaces) to handle quoted variables.

@robertsLando
Copy link
Member

@polskikrol there is no sanity check on env vars, from what I know with yaml format strings can be both with or without quotes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants