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

Zwavejs not starting after docker upgrade and reboot. #3860

Closed
jaimevisser opened this issue Aug 23, 2024 · 9 comments
Closed

Zwavejs not starting after docker upgrade and reboot. #3860

jaimevisser opened this issue Aug 23, 2024 · 9 comments
Assignees
Labels
question Further information is requested

Comments

@jaimevisser
Copy link

Did an apt-get upgrade to update my ubuntu machine running HA + zwave-js-ui and finished with a reboot to boot into the new kernel.
image

There's nothing in both the docker logs and zwavejs logs after the reboot. I tried shutting down the container and moving the content of the store mount to a different location (in effect a first boot) and the error persists. Updating to zwavejs 9.17.0 also does not fix the problem.

Docker: Docker version 27.1.2, build d01f264
Ubuntu: Ubuntu 22.04.4 LTS

Relevant compose section (hostname redacted):

  zwavejs2mqtt:
    container_name: zwavejs2mqtt
    image: zwavejs/zwave-js-ui:9.12.0
    restart: unless-stopped
    tty: true
    privileged: true
    stop_signal: SIGINT
    environment:
      - SESSION_SECRET=QE4P2LOKxGrytZTRCXo8
    volumes:
      - ./zwavejs2mqtt:/usr/src/app/store
      - /dev:/dev
    ports:
      - '3000:3000' # port for zwave-js websocket server
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.zwave.entrypoints=websecure"
      - "traefik.http.routers.zwave.rule=Host(`zwave.***.**`)"
      - "traefik.http.routers.zwave.middlewares=auth@file"
      - "traefik.http.services.zwave.loadbalancer.server.port=8091"
@jaimevisser jaimevisser added the question Further information is requested label Aug 23, 2024
@jaimevisser
Copy link
Author

Addition: after another full shutdown/reboot my zwave devices are back up in HA. The zwave-js-ui still gives the same error and doesn't render at all.

@robertsLando
Copy link
Member

Sorry for late reply but I was on vacation, could you try to open Chrome Dev tools and see the response on network requests please?

@jaimevisser
Copy link
Author

No problem! Might it be related to this?
image

@robertsLando
Copy link
Member

That api doesn't have any authorization so if the return code is 401 means you have something between zui and frontend, are you using a proxy?

@jaimevisser
Copy link
Author

Yeah, traefik with basic auth. I'll try bypassing that for a bit to see if that solves the issue.

@jaimevisser
Copy link
Author

Yep, that was the issue. Still weird other apps work fine with auth enabled but zwavejs doesn't. I'll have to do some more testing to see what's going on. Thanks for pointing me in the right direction!

@robertsLando
Copy link
Member

Maybe this issue could help? #3427

@jaimevisser
Copy link
Author

Yep, hard refresh did the trick.

@ajacques
Copy link

#3825 is more relevant given the response code is 401.

Updating to zwavejs 9.17.0 also does not fix the problem.

What version were you on prior to upgrading? If it's 9.16.2 or lower, then your JS didn't have #3825 and you need to hard reload to get the JS in your service worker cache to handle the 401 correctly. I've noticed the SW cache is a bit flaky, but it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants