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

Disabling zniffer kills the app #3729

Closed
3 tasks done
zackbcom opened this issue May 30, 2024 · 3 comments
Closed
3 tasks done

Disabling zniffer kills the app #3729

zackbcom opened this issue May 30, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@zackbcom
Copy link
Contributor

zackbcom commented May 30, 2024

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.13.0

ZwaveJS version

12.9.1

Describe the bug

enabling zniffer and then disabling it will cause the docker container to die.

zwave  | 2024-05-30 03:37:37.483 WARN STORE: scenes.json not found
zwave  | 2024-05-30 03:37:37.505 INFO LOGGER: Cleaning up log files...
zwave  | 2024-05-30 03:37:37.522 INFO APP: Listening on port 8091 protocol HTTP
zwave  | 2024-05-30 03:37:37.543 INFO ZNIFFERMANAGER: Zniffer is DISABLED
zwave  | 2024-05-30 03:37:37.545 INFO MQTT: MQTT is disabled
zwave  | 2024-05-30 03:37:37.554 INFO BACKUP: Backup job started with cron: 0 0 * * *. Next run: 5/31/2024, 12:00:00 AM
zwave  | 2024-05-30 03:37:37.555 INFO BACKUP: Backup job started with cron: 0 0 * * *. Next run: 5/31/2024, 12:00:00 AM
zwave  | 2024-05-30 03:37:37.566 INFO Z-WAVE: Connecting to /dev/zwave
zwave  | Logging to file:
zwave  |        /usr/src/app/store/logs/zwavejs_2024-05-30.log
zwave  | 2024-05-30 03:37:39.382 DEBUG SOCKET: New connection oXpeYRIRzo5Z8rS4AAAC
zwave  | 2024-05-30 03:37:39.383 INFO Z-WAVE: Setting user callbacks
zwave  | 2024-05-30 03:37:39.387 DEBUG SOCKET: New connection T-oFYwslkfKBvFNGAAAD
zwave  | 2024-05-30 03:37:39.428 DEBUG SOCKET: Event INITED emitted to oXpeYRIRzo5Z8rS4AAAC
zwave  | 
zwave  | /usr/src/app/server/lib/ZnifferManager.js:23
zwave  |         return this.zniffer.active;
zwave  |                             ^
zwave  | TypeError: Cannot read properties of undefined (reading 'active')
zwave  |     at ZnifferManager.get started [as started] (/usr/src/app/server/lib/ZnifferManager.js:23:29)
zwave  |     at ZnifferManager.status (/usr/src/app/server/lib/ZnifferManager.js:115:27)
zwave  |     at Socket.<anonymous> (/usr/src/app/server/app.js:509:41)
zwave  |     at Socket.emit (node:events:529:35)
zwave  |     at Socket.emitUntyped (/usr/src/app/node_modules/socket.io/dist/typed-events.js:69:22)
zwave  |     at /usr/src/app/node_modules/socket.io/dist/socket.js:704:39
zwave  |     at processTicksAndRejections (node:internal/process/task_queues:77:11)

To Reproduce

enable zniffer in configs.
fill out keys and serial port.

then disable.
reload page

Expected behavior

should disable

Additional context

probable fix:

return this.zniffer.active

	get started() {
		return this?.zniffer?.active
	}

No response

@zackbcom zackbcom added the bug Something isn't working label May 30, 2024
@robertsLando
Copy link
Member

I think this happens only when zniffer is not connected for some reason, thanks for your issue. Fixed

@proycon
Copy link

proycon commented May 30, 2024

Thanks for the quick fix. I think I'm also running into this currently on the zwavejs/zwave-js-ui:latest image from docker hub (I have zniffer disabled). The image is probably still one version behind. I'll await the new image.

@zackbcom
Copy link
Contributor Author

All working now, thanks for the fix.

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

3 participants