MagicMirrorOrg / MagicMirrorOrg/MagicMirror

[Bug] Electron version included with MM v2.37.0 has a node-fetch polling bug

Open Beginner friendly
#4,199 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug ready (coming with next release)
Dominant language
JavaScript
Stars
23.9k
Forks
4.6k
Avg merge
17h 31m
Merged PRs (30d)
25

Description

Environment

MagicMirror² version: 2.37.0
Node version: 22.23.1
npm version: 10.9.8
Platform: RPi 3b running Raspbian 11 bullseye

Which start option are you using?

node --run start:x11

Are you using PM2?

Yes

Module

None

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
var config = {
        port: 8080,
        address: "0.0.0.0",
        ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "10.0.0.0/8"], // Set [] to allow all IP addresses
                                                               // or add a specific IPv4 of 192.168.1.5 :
                                                               // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                                                               // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                                                               // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],

        language: "en",
        timeFormat: 12,
        units: "imperial",

        modules: [
[...]
                {
                        module: "MMM-GoogleCalendar",
                        header: "Family calendar",
                        position: "top_left",
                        config: {
                                calendars: [
                                        {
                                                symbol: "male",
                                                calendarID: "redacted",
                                                color: "#ff8e99"
                                        },
                                        {
                                                symbol: "female",
                                                calendarID: "redacted",
                                                color: "#ffc0cb"
                                        },
                                        {
                                                symbol: "hockey-puck",
                                                calendarID: "redacted",
                                                color: "#bcddff"
                                        },
                                        {
                                                symbol: "people-group",
                                                calendarID: "redacted",
                                                color: "#8eff99"
                                        },
                                        {
                                                url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
                                        }//,
                                ],
                                coloredSymbolOnly: true,
                                colored: true,
                                maximumNumberOfDays: 365,
                                hidePrivate: true,
                                showEnd: false,
                                getRelative: 0
                        }
                },
[...]
        ]

};

/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}
whatever https://github.com/randomBrainstormer/MMM-GoogleCalendar is using to fetch calendars (node-fetch)

Steps to reproduce the issue:
Install https://github.com/randomBrainstormer/MMM-GoogleCalendar
Configure to show your authenticated calendars
View error in log

What did you expect to happen?

Calendars to download properly

What actually happened?

Error:

0|mm  | [2026-07-08 14:23:51.273] [ERROR] [MMM-GoogleCalendar] MMM-GoogleCalendar Error. Could not fetch calendar:  redacted Error: Error
0|mm  | Message: Invalid response body while trying to fetch https://www.googleapis.com/calendar/v3/calendars/redacted/events?timeMin=2026-07-08T19%3A23%3A49.239Z&timeMax=2027-07-08T19%3A23%3A49.239Z&maxResults=10&singleEvents=true&orderBy=startTime: Premature close
0|mm  | Stack: Error: Invalid response body while trying to fetch https://www.googleapis.com/calendar/v3/calendars/redacted/events?timeMin=2026-07-08T19%3A23%3A49.239Z&timeMax=2027-07-08T19%3A23%3A49.239Z&maxResults=10&singleEvents=true&orderBy=startTime: Premature close
0|mm  |     at Gaxios._request (/home/parnic/MagicMirror/modules/MMM-GoogleCalendar/node_modules/gaxios/build/src/gaxios.js:149:19)
0|mm  |     at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
0|mm  |     at async OAuth2Client.requestAsync (/home/parnic/MagicMirror/modules/MMM-GoogleCalendar/node_modules/google-auth-library/build/src/auth/oauth2client.js:429:18)
Additional comments

This is caused by a regression in node v22.23.0 and v24.17.0, fixed in v22.23.1 and v24.18.0: https://github.com/nodejs/node/issues/63989
The version of Electron bundled with MM 2.37.0 is v42.5.2 which uses node v24.17.0. Updating to Electron v42.6.0 or v43.1.0 corrects the issue.

I know you guys almost never do out-of-band releases, but this breaks any module dependent on the in-built node-fetch keep-alive behavior.

The workaround is to edit your MM package.json to set the electron optional dep to "electron": "^42.6.0", run npm install, and restart MM to let it pull down the newer version of Electron.

It looks like latest develop as of this writing is still using a bad version of Electron (v43.0.0 per 503c17137130606e61cffaa4504ff1e2cad61910)

Participation
  • I am willing to submit a pull request for this change.

Contributor guide

Open the contributing guide

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.

Research direction

Start in package.json, where the Electron optional dependency is configured, and compare the current version with the develop reference mentioned in the issue. Update Electron to a version containing the Node.js fix, run npm install, and verify MagicMirror starts and the calendar-fetching error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript, node.js
Domain
build-system, desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.