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

Crash with invalid HA credentials #770

Closed
drencken opened this issue Nov 22, 2022 · 1 comment · Fixed by #756
Closed

Crash with invalid HA credentials #770

drencken opened this issue Nov 22, 2022 · 1 comment · Fixed by #756
Labels
bug Something isn't working

Comments

@drencken
Copy link

Describe the bug

When entering a token that is invalid for HA, node-red crashes and also can't be restarted. This makes it basically impossible to fix the authentication issue in Node-red itself.

To Reproduce

  1. Enter a HA mode with an invalid token and deploy.
  2. Observe that Node-Red disconnects from the browser because it crashes.
  3. Attempt to restart Node-Red manually from the command line.
  4. Observe that it crashes and won't start.

Expected behavior

An error message in Node-Red itself with an option to change the token as needed.

Screenshots

node-red output before the crash (IP address is redacted)

22 Nov 20:50:05 - [info] Starting flows
22 Nov 20:50:05 - [error] [poll-state:ef818ac7e5350794] Error: Entity Id is required
22 Nov 20:50:05 - [info] Started flows
22 Nov 20:50:05 - [info] [server:Home Assistant] Connecting to http://192.168.x.x:8123
22 Nov 20:50:05 - [red] Uncaught Exception:
22 Nov 20:50:05 - [error] Error: Invalid access token for websocket
at /root/.node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:112:29
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Websocket.connect (/root/.node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:82:23)

Example Flow

No response

This package's version (not the Home Assistant add-on version)

0.47.0

Is Node-RED running in Docker?

No

Node-RED version

3.0.2

Node.js version

18.12.1

Additional context

No response

@zachowj zachowj added the bug Something isn't working label Nov 25, 2022
@drencken
Copy link
Author

I tried installing older version and it seems to work fine still in 0.44.0 but then exhibits this problem starting with 0.45.0

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

Successfully merging a pull request may close this issue.

2 participants