Repository navigation
Description
Environment
SYSTEM: manufacturer: System manufacturer; model: System Product Name; virtual: false; MM: v2.37.0-develop
- OS: platform: linux; distro: Ubuntu; release: 22.04.5 LTS; arch: x64; kernel: 5.15.0-179-generic
- VERSIONS: electron: 42.1.0; used node: 24.15.0; installed node: 22.22.1; npm: 10.9.4; pm2: 5.4.3
- ENV: XDG_SESSION_TYPE: x11; MM_CONFIG_FILE: undefined
WAYLAND_DISPLAY: undefined; DISPLAY: :0.0; ELECTRON_ENABLE_GPU: undefined - RAM: total: 48076.70 MB; free: 42777.97 MB; used: 5298.73 MB
- OTHERS: uptime: 127 minutes; timeZone: America/Chicago
Which start option are you using?
node --run start:x11
Are you using PM2?
Yes
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",
order: "*",
disabled: false,
hiddenOnStartup: false,
configDeepMerge: false,
animateIn: "None",
animateOut: "None",
config: {
updateAutorestart: true,
updateInterval: 60000,
updates: [
{ 'SampleModule':'git pull'}
]
}
},
<!-- Paste relevant code here -->Steps to reproduce the issue:
set UPN confg as above
start MM via pm2
then update one of the modules active in the config.js
What did you expect to happen?
expected module to update and MM to restart (per the new restart fix)
What actually happened?
HOWEVER , when MM is started via pm2, the git commands fail
2026-05-20 14:46:48.424] [ERROR] [updatenotification] Failed to get git revisions for MMM-Wallpaper: Error: Command failed: git rev-list --ancestry-path --count ecff59a..86a0df4 master
fatal: ambiguous argument 'ecff59a..86a0df4 master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
[2026-05-20 14:46:48.819] [ERROR] [updatenotification] Failed to get git revisions for MMM-EmbedURL: Error: Command failed: git rev-list --ancestry-path --count b401282..a6215fa with_MMM-Config
fatal: ambiguous argument 'b401282..a6215fa with_MMM-Config': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
[2026-05-20 14:46:49.131] [ERROR] [updatenotification] Failed to get git revisions for MMM-Config: Error: Command failed: git rev-list --ancestry-path --count 7702261..c12fefe main
fatal: ambiguous argument '7702261..c12fefe main': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
[2026-05-20 14:46:49.740] [ERROR] [updatenotification] Failed to get git revisions for MMM-CalendarExt3: Error: Command failed: git rev-list --ancestry-path --count e93534d..8b8e4f4 main
fatal: ambiguous argument 'e93534d..8b8e4f4 main': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
[2026-05-20 14:46:50.057] [ERROR] [updatenotification] Failed to get git revisions for MMM-page-indicator: Error: Command failed: git rev-list --ancestry-path --count 4d2cbd6..c431bb9 master
fatal: ambiguous argument '4d2cbd6..c431bb9 master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
[2026-05-20 14:46:50.691] [ERROR] [updatenotification] Failed to get git revisions for SampleModule: Error: Command failed: git rev-list --ancestry-path --count 9a81558..dd05c02 master
fatal: ambiguous argument '9a81558..dd05c02 master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
so it never detects the change, and does not know to update.
i tested this twice, deleted the .pm2/logs/project_name-*.log
I was wondering what would happen when we killed and restarted, disconnected from pm2,
the args still look the same..
[2026-05-20 14:49:26.946] [LOG] [updatenotification] args= [
'/home/sam/MagicMirror.2.36.dev/node_modules/electron/dist/electron',
'js/electron.js'
]
and it came up, as x11 (on my system, as the process.env is passed on..)
and then
const options = { cwd: this.root_path, detached: true, stdio: ["ignore", out, err] };
const subprocess = Spawn(binary, args, options);
subprocess.unref(); // allow the current process to exit without waiting for the subprocess
process.exit();
do we have a race condition?, if newly spawned MM gets to open port, before current shuts down, we fail as port is in use
and I think we will have this with pm2 trying to restart the instance that died, while we have already started another instance..
the user will not be able to restart with pm2, as there is an instance running in the background.
if I stop the pm2 instance and do manual npm run start:x11
it detects, updates, and restarts as expected
Additional comments
No response
Participation
- I am willing to submit a pull request for this change.
Activity
sdetweil commentedon May 20, 2026
similar to #4137
KristjanESPERANTO commentedon May 20, 2026
Oh my, is this a never-ending chain reaction? 🤯😅
khassel commentedon May 20, 2026
seeing the git error: are you really on
develop?KristjanESPERANTO commentedon May 20, 2026
I think he is. In the system info Sam provided:
MM: v2.37.0-develop.The git errors are from the module's repo.
That should be fixable if we detect PM2 and then let PM2 respawn. I have a working draft, but it needs fine tuning and I want to write tests. That should at least solve the second problem. I still don't have a clue about the other one - but I'm just too tired right now. I've been coding all day on my day off 😵😅
sdetweil commentedon May 20, 2026
sdetweil commentedon May 20, 2026
this isn't fatal.. we have over a month... I opened issue to track.. not push anyone to do it NOW!
sdetweil commentedon May 20, 2026
copy the text of the failed command into a shell, cwd in the module folder works
same for each module failed.. the commit numbers are correct for each, the branch is correct for each..
git doesn't like something in the parms..
I wonder if we can hook a shell script in here to see what 'git' is getting
fix(updatenotification): don't spawn a child process when running und…
fix(updatenotification): don't spawn a child process when running und…
KristjanESPERANTO commentedon May 21, 2026
Just to be sure — could you show which commit you're on in your MagicMirror directory?
sdetweil commentedon May 21, 2026
sdetweil commentedon May 21, 2026
i am 2 commits behind , but unrelated
fix(updatenotification): don't spawn a child process when running und…
KristjanESPERANTO commentedon May 22, 2026
I cannot reproduce the error. Could it be that you pulled the fix but PM2 was still running the old pre-fix code in memory? Sorry if I'm wrong - I just can't explain it any other way yet! 🤔
sdetweil commentedon May 22, 2026
my pm2 was downlevel, 5.4, updated now, and did pm2 update so in memory is updated..
same problem
pm2 version is weird..
updated
KristjanESPERANTO commentedon May 23, 2026
Why does systeminfo now output
MM: v2.36.0and notMM: v2.37.0-develop?sdetweil commentedon May 23, 2026
thanks.. I missed that too!
the shell script started by pm2 was hard coded to cd ~/MagicMirror, oops.. not this folder..
so, never mind
closing
KristjanESPERANTO commentedon May 23, 2026
I'm glad we figured it out 😃
feat(systeminfo): include Git hash and branch in system information l…