Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] updatenotification: only the first pending module update is applied when `updates` is configured

Open
#4,311 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
69/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, node.js
Domain
backend

Research direction

Start with defaultmodules/updatenotification/update_helper.js, especially processModule() and how pending updates are started through Promise.all. Trace how the update state changes after one command completes, including the updateAutorestart path. Done means every configured module with an available update is processed and the reported behavior no longer skips later modules.

Written by the indexing model from the issue text.

Description

bug ready (coming with next release)
Environment

MagicMirror² version: v2.38.0 (git 5d7fd70), also present on current develop
Node version: 24.22.0
npm version: 11.21.1
Platform: Docker (karsten13/magicmirror:latest, server mode), Debian 13, x64

System Information
  • MM: version: v2.38.0; git: 5d7fd70; branch: HEAD
  • SYSTEM: manufacturer: QEMU; model: Docker Container; virtual: false
  • OS: platform: linux; distro: Debian GNU/Linux; release: 13; arch: x64; kernel: 6.12.113+deb13-amd64
  • VERSIONS: electron: undefined; used node: 24.22.0; installed node: 24.22.0; npm: 11.21.1; pm2:
Which start option are you using?

node --run server

Are you using PM2?

No

Module

updatenotification

Have you tried disabling other modules?
  • Yes
  • No
Have you searched if someone else has already reported the issue on the forum or in the issues?
  • Yes
What did you do?
Configuration
{
  module: "updatenotification",
  position: "top_center",
  config: {
    updates: [
      { "MMM-ModuleA": "git pull" },
      { "MMM-ModuleB": "git pull" },
      { "MMM-ModuleC": "git pull" }
    ]
  }
}

Steps to reproduce the issue:

  1. Configure updatenotification with an updates entry for several modules (updateAutorestart left at its default false).
  2. Make sure at least two of these modules have new commits upstream.
  3. Wait for the next update check.
What did you expect to happen?

All modules with a pending update and a configured update command are updated,
one after another.

What actually happened?

All pending updates are detected, but only the first module is updated.
The others are skipped without any log message, in this check and in every
later check, until MagicMirror is restarted.

[2026-10-21 19:50:18.994] [INFO]  [updatenotification] Update found for module: MMM-Webuntis
[2026-10-21 19:50:18.994] [INFO]  [updatenotification] Update found for module: MMM-LibraryMonitor
[2026-10-21 19:50:18.995] [INFO]  [updatenotification] Update found for module: MMM-HomeConnect2
[2026-10-21 19:50:18.995] [INFO]  [updatenotification] Update found for module: MMM-Photoprism2
[2026-10-21 19:50:18.995] [INFO]  [updatenotification] Update found for module: MMM-CalDAV-Tasks
[2026-10-21 19:50:18.995] [INFO]  [updatenotification] Updating MMM-Webuntis...
[2026-10-21 19:50:21.036] [INFO]  [updatenotification] Update logs of MMM-Webuntis: Updating 3d0d8e5..bdea7c7
[2026-10-21 19:50:21.037] [INFO]  [updatenotification] Update done, don't forget to restart MagicMirror!

MMM-LibraryMonitor, MMM-HomeConnect2, MMM-Photoprism2 and MMM-CalDAV-Tasks were never updated.

Additional comments

Cause, as far as I can tell (defaultmodules/updatenotification/update_helper.js on develop):

processModule() returns early when this.updating is true, and sets it to true
before running the first update command. It is never set back to false, so after
the first update every other module is skipped for the rest of the process lifetime.
moduleState.inProgress is never reset either.

All modules are started at the same time through Promise.all, so only the first
one gets through.

A possible fix: run the pending updates one after another, reset updating and
inProgress in a finally block, and with updateAutorestart: true restart once
after all updates are done instead of after the first one.

Participation
  • I am willing to submit a pull request for this change.
Dominant language
JavaScript
Stars
24.1k
Forks
4.6k
Avg merge
5h 36m
Merged PRs (30d)
18

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MagicMirrorOrg/MagicMirror

All issues in MagicMirrorOrg/MagicMirror

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.