FlowFuse / node-red-dashboard

https://dashboard.flowfuse.com
Apache License 2.0
204 stars 49 forks source link

Removing ui-control node instance crash #1079

Open 78wesley opened 4 months ago

78wesley commented 4 months ago

Current Behavior

When I remove the ui-control node and click on deploy the instance crash.

The error log that I got is this:

7/10/2024 4:37:17 PM  []        10 Jul 14:37:17 - [red] Uncaught Exception:
7/10/2024 4:37:17 PM  [error]   TypeError: Cannot read properties of null (reading 'send')
    at disconnect (/data/node_modules/@flowfuse/node-red-dashboard/nodes/widgets/ui_control.js:172:31)
    at Socket.emit (node:events:531:35)
    at Socket.emit (node:domain:488:12)
    at Socket.emitReserved (/data/node_modules/socket.io/dist/typed-events.js:56:22)
    at Socket._onclose (/data/node_modules/socket.io/dist/socket.js:561:14)
    at Client.onclose (/data/node_modules/socket.io/dist/client.js:247:20)
    at Socket.emit (node:events:531:35)
    at Socket.emit (node:domain:488:12)
    at Socket.onClose (/data/node_modules/engine.io/build/socket.js:304:18)
    at Object.onceWrapper (node:events:633:28)

Expected Behavior

When I click on deploy it shouldn't crash.

Steps To Reproduce

  1. Place a ui-control node and select your path.
  2. Click on Deploy
  3. Remove the ui-control node
  4. Click on Deploy
  5. Crashed

Environment

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

joepavitt commented 4 months ago

Are you doing a "Full Deploy" or "Partial Deploy" here? I suspect we may have an issue with the latter, but the former would surprise me

78wesley commented 4 months ago

Are you doing a "Full Deploy" or "Partial Deploy" here? I suspect we may have an issue with the latter, but the former would surprise me

I deployed it with Modified Flows.

joepavitt commented 4 months ago

Thanks for confirming - the quick "fix" is to do a Full Deploy - but there is an underlying bug you've found with partial deploys, so thanks for reporting!