As with previous versions, I simply followed the instructions in the release notes to update Mastodon to v4.7.0.
Each step went off without issues.
Shortly afterward, however, the monitoring system notified me that mastodon-streaming@4000.service was no longer running.
I then saw an error message in the log: TypeError: webidl.util.markAsUncloneable is not a function
Fortunately, the problem was quickly resolved.
At first, I couldn't identify the cause from the following message:
systemd[1]: Started mastodon-streaming@4000.service - mastodon-streaming on port 4000.
node[203732]: /home/mastodon/live/node_modules/undici/lib/web/cache/cachestorage.js:20
node[203732]: webidl.util.markAsUncloneable(this)
node[203732]: ^
node[203732]: TypeError: webidl.util.markAsUncloneable is not a function
node[203732]: at new CacheStorage (/home/mastodon/live/node_modules/undici/lib/web/cache/cachestorage.js:20:17)
node[203732]: at Object.<anonymous> (/home/mastodon/live/node_modules/undici/index.js:179:25)
node[203732]: at Module._compile (node:internal/modules/cjs/loader:1529:14)
node[203732]: at Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
node[203732]: at Module.load (node:internal/modules/cjs/loader:1275:32)
node[203732]: at Module._load (node:internal/modules/cjs/loader:1096:12)
node[203732]: at Module.require (node:internal/modules/cjs/loader:1298:19)
node[203732]: at require (node:internal/modules/helpers:182:18)
node[203732]: at Object.<anonymous> (/home/mastodon/live/node_modules/jsdom/lib/api.js:12:33)
node[203732]: at Module._compile (node:internal/modules/cjs/loader:1529:14)
node[203732]: Node.js v20.19.2
systemd[1]: mastodon-streaming@4000.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: mastodon-streaming@4000.service: Failed with result 'exit-code'.
After taking a look at the affected files, I understood the stack trace and realized that the missing function is part of Node.js.
So I checked the release notes again and saw that Node.js version 22 or higher is required. (I had apparently successfully ignored that requirement before with the 4.6 versions.)
After a quick check, I found that the Node.js 20 version I was using came from Debian 13 / trixie. So I consulted the Mastodon installation guide.
After setting up the repository from nodesource.com, I was able to install the new Node.js version.
The command corepack enable to set up Yarn unfortunately failed. (Internal Error: ENOENT: no such file or directory)
Thanks to a Stack Overflow post, I was able to fix the yarn setup:
corepack disable
npm install -g yarn --force
yarn -v
yarn set version stable
corepack enable
Afterward, just to be safe, i ran yarn install --immutable again.
After that, I was able to successfully restart all Mastodon services with systemctl restart mastodon-*.