FlowFuse / flowfuse

Connect, collect, transform, visualise, and interact with your Industrial Data in a single platform. Use FlowFuse to manage, scale and secure your Node-RED solutions.
https://flowfuse.com
Other
281 stars 63 forks source link

Snapshots are deploying to devices in developer mode #2276

Open robmarcer opened 1 year ago

robmarcer commented 1 year ago

Current Behavior

I can deploy a snapshot to a device which is currently in developer mode.

Expected Behavior

The snapshot should not be deployed until I take the device out of developer mode.

Steps To Reproduce

Setup a device.

Deploy a snapshot from FF to it.

Put the device in developer mode.

Open the editor interface.

Change something in the instance on FF, deploy, created a snapshot and set as target.

Refresh the browser window which has the editor interface for the device in developer mode.

The changes made are now in instance on the device.

Video of the bug - https://d.pr/v/ORqaJS

Environment

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

knolleary commented 1 year ago

Can you share the device agent logs so we can see what is happening from its point of view?

robmarcer commented 1 year ago

This covers the time period from the video I shared, you can match the times up to the clock running on my desktop.

13/06/2023 10:59:39
[info]
Node-RED version: v3.0.2
13/06/2023 10:59:39
[info]
Node.js  version: v18.15.0
13/06/2023 10:59:39
[info]
Linux 5.15.84-v7l+ arm LE
13/06/2023 10:59:41
[info]
Loading palette nodes
13/06/2023 10:59:42
[info]
Dashboard version 3.4.0 started at /ui
13/06/2023 10:59:43
[warn]
------------------------------------------------------
13/06/2023 10:59:43
[warn]
[@flowforge/nr-file-nodes/file] 'file in' already registered by module node-red
13/06/2023 10:59:43
[warn]
------------------------------------------------------
13/06/2023 10:59:43
[info]
Settings file  : /opt/flowforge-device/project/settings.js
13/06/2023 10:59:43
[info]
Context store  : 'memory' [module=memory]
13/06/2023 10:59:43
[info]
Context store  : 'persistent' [module=localfilesystem]
13/06/2023 10:59:43
[info]
User directory : /opt/flowforge-device/project
13/06/2023 10:59:43
[warn]
Projects disabled : set editorTheme.projects.enabled=true to enable
13/06/2023 10:59:43
[info]
Flows file     : /opt/flowforge-device/project/flows.json
13/06/2023 10:59:43
[info]
Server now running at http://127.0.0.1:1880/device-editor/
13/06/2023 10:59:43
[warn]
Encrypted credentials not found
13/06/2023 10:59:43
[info]
Starting flows
13/06/2023 10:59:43
[info]
Started flows
13/06/2023 10:59:43
[info]
Project Link nodes connected
13/06/2023 11:47:29
[info]
Disabling remote editor access
13/06/2023 11:47:29
[info]
Editor tunnel closed
13/06/2023 11:47:40
[info]
Disabling remote editor access
13/06/2023 11:48:34
[info]
Disabling remote editor access
13/06/2023 11:48:37
[info]
Enabling remote editor access
13/06/2023 11:48:37
[info]
Connecting editor tunner to wss://app.flowforge.com/api/v1/devices/nq431mY35d/editor/comms/ffde_nq431mY35d_RU0anmftSyxqnwSwVz9OAA
13/06/2023 11:48:37
[info]
Editor tunnel closed
13/06/2023 11:48:39
[warn]
{}
13/06/2023 11:48:39
[warn]
Invalid command message received from platform: {"command":"startEditor","deviceId":"nq431mY35d","teamId":"KqkG4PEG34","correlationData":"354dbed1-1362-4f5f-ae99-790f460cd0ae","createdAt":1686653316972,"expiresAt":1686653321972,"payload":{"token":"ffde_nq431mY35d_RU0anmftSyxqnwSwVz9OAA"},"responseTopic":"ff/v1/KqkG4PEG34/d/nq431mY35d/response"}
13/06/2023 11:48:46
[info]
Enabling remote editor access
13/06/2023 11:48:46
[info]
Connecting editor tunner to wss://app.flowforge.com/api/v1/devices/nq431mY35d/editor/comms/ffde_nq431mY35d_DEMC8IZSgBAVoMauRZboRg
13/06/2023 11:49:54
[info]
New snapshot available
13/06/2023 11:49:54
[info]
Stopping current snapshot
13/06/2023 11:49:54
[info]
Stopping Node-RED
13/06/2023 11:49:55
[info]
Stopping flows
13/06/2023 11:49:55
[info]
Project Link nodes connection closed
13/06/2023 11:49:55
[info]
Stopped flows
13/06/2023 11:49:55
[info]
Stopped Node-RED
13/06/2023 11:49:55
[info]
Instance: 324143a5-3487-468c-ac44-2bee588741c4
13/06/2023 11:49:55
[info]
Snapshot: E79v0PbvVP
13/06/2023 11:49:55
[info]
Settings: c0ca4d2b2aa27c63cd0ca9e553563843e4bffeb6246f563bc2eb015d0db93995
13/06/2023 11:49:55
[info]
Updating configuration files
13/06/2023 11:49:55
[info]
Installing dependencies
13/06/2023 11:50:01
[info]
Starting Node-RED
13/06/2023 11:50:03
[info]
Welcome to Node-RED
===================
13/06/2023 11:50:03
[info]
Node-RED version: v3.0.2
13/06/2023 11:50:03
[info]
Node.js  version: v18.15.0
13/06/2023 11:50:03
[info]
Linux 5.15.84-v7l+ arm LE
13/06/2023 11:50:05
[info]
Loading palette nodes
13/06/2023 11:50:06
[info]
Dashboard version 3.4.0 started at /ui
13/06/2023 11:50:06
[warn]
------------------------------------------------------
13/06/2023 11:50:06
[warn]
[@flowforge/nr-file-nodes/file] 'file in' already registered by module node-red
13/06/2023 11:50:06
[warn]
------------------------------------------------------
13/06/2023 11:50:06
[info]
Settings file  : /opt/flowforge-device/project/settings.js
13/06/2023 11:50:06
[info]
Context store  : 'memory' [module=memory]
13/06/2023 11:50:06
[info]
Context store  : 'persistent' [module=localfilesystem]
13/06/2023 11:50:06
[info]
User directory : /opt/flowforge-device/project
13/06/2023 11:50:06
[warn]
Projects disabled : set editorTheme.projects.enabled=true to enable
13/06/2023 11:50:06
[info]
Flows file     : /opt/flowforge-device/project/flows.json
13/06/2023 11:50:06
[info]
Server now running at http://127.0.0.1:1880/device-editor/
13/06/2023 11:50:06
[warn]
Encrypted credentials not found
13/06/2023 11:50:06
[info]
Starting flows
13/06/2023 11:50:07
[info]
Started flows
13/06/2023 11:50:07
[info]
Project Link nodes connected