Skip to content

fix(electron): map IPv6 :: wildcard to localhost#4188

Merged
KristjanESPERANTO merged 1 commit into
MagicMirrorOrg:developfrom
MikeBishop:fix/wildcard-address-binding-develop
Jun 20, 2026
Merged

fix(electron): map IPv6 :: wildcard to localhost#4188
KristjanESPERANTO merged 1 commit into
MagicMirrorOrg:developfrom
MikeBishop:fix/wildcard-address-binding-develop

Conversation

@MikeBishop

Copy link
Copy Markdown
Contributor

Problem

When config.address is set to "::" (listen on all interfaces), the Electron window tries to load http://:::8080 instead of http://localhost:8080, resulting in a blank local display.

Root cause

electron.js remaps wildcard bind addresses to "localhost" for the Electron loadURL call so the local display always connects to the server on the loopback interface. This remap already handled undefined, "", and "0.0.0.0", but "::" was missing.

Note: core.start() is not affected — at the time that check runs, config is initialised from process.env.config (empty {} in normal operation), so config.address is always undefined and the server always starts correctly.

Fix

One line: add (config.address === "::") to the existing wildcard remap in createWindow().

When config.address is set to "::" (listen on all interfaces), the
Electron window tries to load http://:::8080 instead of
http://localhost:8080, resulting in a blank local display.

The remap that converts wildcard bind addresses to "localhost" for the
Electron loadURL call already handled undefined, "", and "0.0.0.0",
but was missing "::". Add it.
@KristjanESPERANTO KristjanESPERANTO changed the title fix(electron): "::" address causes blank local display fix(electron): map IPv6 :: wildcard to localhost Jun 20, 2026
@KristjanESPERANTO KristjanESPERANTO merged commit 7c96623 into MagicMirrorOrg:develop Jun 20, 2026
12 checks passed
@KristjanESPERANTO

Copy link
Copy Markdown
Collaborator

@MikeBishop Thanks! With IPv6 becoming more widespread, this is a valuable improvement 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants