Snap package, after update to 2.2.2 Error: EPERM: operation not permitted, copyfile

after update to newest stable from 2022-03-29 i can't apply changes in flows
old version (677) works if i revert the 800 to 677 revision
snap refresh did not work, error message did not disappear

log entry:

2022-04-04T18:26:23Z node-red.node-red[1467]: 4 Apr 20:26:23 - [warn] Error saving flows: EPERM: operation not permitted, copyfile '/var/snap/node-red/800/flows.json' -> '/var/snap/node-red/800/.flows.json.backup'
2022-04-04T18:26:23Z node-red.node-red[1467]: 4 Apr 20:26:23 - [warn] Error: EPERM: operation not permitted, copyfile '/var/snap/node-red/800/flows.json' -> '/var/snap/node-red/800/.flows.json.backup'

mount | grep node-red

/var/lib/snapd/snaps/node-red_677.snap on /snap/node-red/677 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/node-red_800.snap on /snap/node-red/800 type squashfs (ro,nodev,relatime)
nsfs on /run/snapd/ns/node-red.mnt type nsfs (rw)

full log:

2022-04-04T18:23:14Z systemd[1]: Started Service for snap application node-red.node-red.
2022-04-04T18:23:14Z /usr/bin/snap[1467]: cmd.go:105: DEBUG: restarting into "/snap/core/current/usr/bin/snap"
2022-04-04T18:23:16Z node-red.node-red[1467]: NOW STARTING NODE-RED : /snap/node-red/800/bin/node-red -u /var/snap/node-red/800 on port 1880
2022-04-04T18:23:24Z node-red.node-red[1467]: 4 Apr 20:23:24 - [info]
2022-04-04T18:23:24Z node-red.node-red[1467]: Welcome to Node-RED
2022-04-04T18:23:24Z node-red.node-red[1467]: ===================
2022-04-04T18:23:24Z node-red.node-red[1467]: 4 Apr 20:23:24 - [info] Node-RED version: v2.2.2
2022-04-04T18:23:24Z node-red.node-red[1467]: 4 Apr 20:23:24 - [info] Node.js  version: v14.19.0
2022-04-04T18:23:24Z node-red.node-red[1467]: 4 Apr 20:23:24 - [info] Linux 4.19.66-v7+ arm LE
2022-04-04T18:23:26Z node-red.node-red[1467]: 4 Apr 20:23:26 - [info] Loading palette nodes
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [info] Dashboard version 3.1.6 started at /ui
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [warn] ------------------------------------------------------
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [warn] [node-red-node-rbe/rbe] 'rbe' already registered by module node-red
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [warn] ------------------------------------------------------
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [info] Settings file  : /var/snap/node-red/800/settings.js
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [info] Context store  : 'default' [module=memory]
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [info] User directory : /var/snap/node-red/800
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [warn] Projects disabled : editorTheme.projects.enabled=false
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [info] Flows file     : /var/snap/node-red/800/flows.json
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [info] Server now running at http://127.0.0.1:1880/
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [warn] Error loading credentials: SyntaxError: Unexpected token � in JSON at position 0
2022-04-04T18:23:34Z node-red.node-red[1467]: 4 Apr 20:23:34 - [warn] Error loading flows: Error: Failed to decrypt credentials
2022-04-04T18:23:35Z node-red.node-red[1467]: 4 Apr 20:23:35 - [info] Starting flows
2022-04-04T18:23:36Z node-red.node-red[1467]: 4 Apr 20:23:36 - [info] Started flows
2022-04-04T18:26:23Z node-red.node-red[1467]: 4 Apr 20:26:23 - [warn] Error saving flows: EPERM: operation not permitted, copyfile '/var/snap/node-red/800/flows.json' -> '/var/snap/node-red/800/.flows.json.backup'
2022-04-04T18:26:23Z node-red.node-red[1467]: 4 Apr 20:26:23 - [warn] Error: EPERM: operation not permitted, copyfile '/var/snap/node-red/800/flows.json' -> '/var/snap/node-red/800/.flows.json.backup'

snap info node-red

refresh-date: today at 19:38 CEST
channels:
  stable:    2.2.2 2022-03-29 (800) 46MB -
  candidate: 1.2.9 2022-03-29 (677) 30MB -
  beta:      ↑
  edge:      2.2.2 2022-03-29 (800) 46MB -
installed:   2.2.2            (800) 46MB -

snap version

snap      2.41
snapd     2.41
series    16
raspbian  9
kernel    4.19.66-v7+

again, autoupdate, revision 804 does not start node-red anymore.
i have to revert to older revision 800

is there something with given paths wrong? environment variables under log

2022-04-06T17:23:26Z systemd[1]: Stopped Service for snap application node-red.node-red.
2022-04-06T17:24:17Z systemd[1]: Started Service for snap application node-red.node-red.
2022-04-06T17:24:17Z /usr/bin/snap[15934]: cmd.go:105: DEBUG: restarting into "/snap/core/current/usr/bin/snap"
2022-04-06T17:24:18Z node-red.node-red[15934]: NOW STARTING NODE-RED : /snap/node-red/804/bin/node-red -u /var/snap/node-red/804 on port 1880
2022-04-06T17:24:25Z node-red.node-red[15934]: 6 Apr 19:24:25 - [info]
2022-04-06T17:24:25Z node-red.node-red[15934]: Welcome to Node-RED
2022-04-06T17:24:25Z node-red.node-red[15934]: ===================
2022-04-06T17:24:25Z node-red.node-red[15934]: 6 Apr 19:24:25 - [info] Node-RED version: v2.2.2
2022-04-06T17:24:25Z node-red.node-red[15934]: 6 Apr 19:24:25 - [info] Node.js  version: v14.19.0
2022-04-06T17:24:25Z node-red.node-red[15934]: 6 Apr 19:24:25 - [info] Linux 4.19.66-v7+ arm LE
2022-04-06T17:24:27Z node-red.node-red[15934]: 6 Apr 19:24:27 - [info] Loading palette nodes
2022-04-06T17:24:34Z node-red.node-red[15934]: 6 Apr 19:24:34 - [info] Dashboard version 3.1.6 started at /ui
2022-04-06T17:24:34Z node-red.node-red[15934]: 6 Apr 19:24:34 - [error] Failed to start server:
2022-04-06T17:24:34Z node-red.node-red[15934]: 6 Apr 19:24:34 - [error] Error: EPERM: operation not permitted, copyfile '/var/snap/node-red/804/.config.nodes.json' -> '/var/snap/node-red/804/.config.nodes.json.backup'
2022-04-06T17:49:40Z systemd[1]: Started Service for snap application node-red.node-red.
2022-04-06T17:49:40Z /usr/bin/snap[16183]: cmd.go:105: DEBUG: restarting into "/snap/core/current/usr/bin/snap"
2022-04-06T17:49:40Z node-red.node-red[16183]: NOW STARTING NODE-RED : /snap/node-red/804/bin/node-red -u /var/snap/node-red/804 on port 1880
2022-04-06T17:49:43Z node-red.node-red[16183]: 6 Apr 19:49:43 - [info]
2022-04-06T17:49:43Z node-red.node-red[16183]: Welcome to Node-RED
2022-04-06T17:49:43Z node-red.node-red[16183]: ===================
2022-04-06T17:49:43Z node-red.node-red[16183]: 6 Apr 19:49:43 - [info] Node-RED version: v2.2.2
2022-04-06T17:49:43Z node-red.node-red[16183]: 6 Apr 19:49:43 - [info] Node.js  version: v14.19.0
2022-04-06T17:49:43Z node-red.node-red[16183]: 6 Apr 19:49:43 - [info] Linux 4.19.66-v7+ arm LE
2022-04-06T17:49:44Z node-red.node-red[16183]: 6 Apr 19:49:44 - [info] Loading palette nodes
2022-04-06T17:49:50Z node-red.node-red[16183]: 6 Apr 19:49:50 - [info] Dashboard version 3.1.6 started at /ui
2022-04-06T17:49:50Z node-red.node-red[16183]: 6 Apr 19:49:50 - [error] Failed to start server:
2022-04-06T17:49:50Z node-red.node-red[16183]: 6 Apr 19:49:50 - [error] Error: EPERM: operation not permitted, copyfile '/var/snap/node-red/804/.config.nodes.json' -> '/var/snap/node-red/804/.config.nodes.json.backup'
2022-04-06T17:50:46Z systemd[1]: Started Service for snap application node-red.node-red.
2022-04-06T17:50:46Z /usr/bin/snap[16325]: cmd.go:105: DEBUG: restarting into "/snap/core/current/usr/bin/snap"
2022-04-06T17:50:46Z node-red.node-red[16325]: NOW STARTING NODE-RED : /snap/node-red/800/bin/node-red -u /var/snap/node-red/800 on port 1880
2022-04-06T17:50:50Z node-red.node-red[16325]: 6 Apr 19:50:50 - [info]
2022-04-06T17:50:50Z node-red.node-red[16325]: Welcome to Node-RED
2022-04-06T17:50:50Z node-red.node-red[16325]: ===================
2022-04-06T17:50:50Z node-red.node-red[16325]: 6 Apr 19:50:50 - [info] Node-RED version: v2.2.2
2022-04-06T17:50:50Z node-red.node-red[16325]: 6 Apr 19:50:50 - [info] Node.js  version: v14.19.0
2022-04-06T17:50:50Z node-red.node-red[16325]: 6 Apr 19:50:50 - [info] Linux 4.19.66-v7+ arm LE
2022-04-06T17:50:52Z node-red.node-red[16325]: 6 Apr 19:50:52 - [info] Loading palette nodes
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [info] Dashboard version 3.1.6 started at /ui
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [warn] ------------------------------------------------------
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [warn] [node-red-node-rbe/rbe] 'rbe' already registered by module node-red
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [warn] ------------------------------------------------------
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [info] Settings file  : /var/snap/node-red/800/settings.js
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [info] Context store  : 'default' [module=memory]
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [info] User directory : /var/snap/node-red/800
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [warn] Projects disabled : editorTheme.projects.enabled=false
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [info] Flows file     : /var/snap/node-red/800/flows.json
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [info] Server now running at http://127.0.0.1:1880/
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [warn] Error loading credentials: SyntaxError: Unexpected token � in JSON at position 0
2022-04-06T17:50:59Z node-red.node-red[16325]: 6 Apr 19:50:59 - [warn] Error loading flows: Error: Failed to decrypt credentials
# xargs -0 -L1 -a /proc/16347/environ
SNAP_INSTANCE_KEY=
SNAP_COMMON=/var/snap/node-red/common
TEMPDIR=/tmp
LD_LIBRARY_PATH=/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void:/snap/node-red/800/lib/arm-linux-gnueabihf:/snap/node-red/800/usr/lib/arm-linux-gnueabihf:/snap/node-red/800/lib:/snap/node-red/800/usr/lib:/snap/node-red/800/lib/arm-linux-gnueabihf:/snap/node-red/800/usr/lib/arm-linux-gnueabihf
SNAP_LIBRARY_PATH=/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void
HOME=/root/snap/node-red/800
PORT=1880
SNAP_USER_DATA=/root/snap/node-red/800
SNAP_REVISION=800
TMPDIR=/tmp
JOURNAL_STREAM=8:322958
SNAP_CONTEXT=jNFqKRH9kQ9nmTw258PqnV3RwlWC1Yw1gNpr0DW968Pg
SNAP_VERSION=2.2.2
SNAP_INSTANCE_NAME=node-red
PATH=/snap/node-red/800/usr/sbin:/snap/node-red/800/usr/bin:/snap/node-red/800/sbin:/snap/node-red/800/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
INVOCATION_ID=00ddae9d15c84df3a7b57dd093fe2a91
SNAP_DATA=/var/snap/node-red/800
XDG_RUNTIME_DIR=/run/user/0/snap.node-red
LANG=en_GB.UTF-8
SNAP_USER_COMMON=/root/snap/node-red/common
SNAP_ARCH=armhf
SNAP_COOKIE=jNFqKRH9kQ9nmTw258PqnV3RwlWC1Yw1gNpr0DW968Pg
SNAP_REEXEC=
SNAP_NAME=node-red
PWD=/var/snap/node-red/800
SNAP=/snap/node-red/800

I don't know whether anyone here uses the snap version, which is probably why you have had no replies. Most users of Ubuntu or other Debian based systems use the recommended Pi/Ubuntu/Debian script from Running on Raspberry Pi : Node-RED

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.