Read the statement by Michael Teeuw here.
Black Screen "Electron" after updating MM
-
Hello,
by doing an einth update my Magic Mirror is again in black screen “Electron”, how to do an Electron rebuild ?
-
@RIKKO14 how did u update?
is this a pir module needing rebuild?
-
@sdetweil Quite often I have a logo at the top of my Magic Mirror

and I had for several days on te top of my MM the MMM-Jast to update and MMM-NowPlayingOnSpotify and MMM-DHT-Sensor had not worked. So first I updapte my MM and second uninstall MMM-Jast, MMM-NowPlayingOnSpotify and MMM-DHT-Sensorcd ~/MagicMirror rm -rf modules/module_to_deleteand reinstall them
This is where Electron appeared… -
@RIKKO14 ok,seen this before… MOST times this works
stop MagicMirror
cd ~ rm -rf .config/Electronnote the dot in front of config
restart MagicMirror
-
@sdetweil
I use PM2,
how to do ? -
-
@sdetweil
I do this :

but nothing… -
@RIKKO14 correct… in linux most commands return nothing if successful…
so that is good… you asked to erase a folder
and it did thatnow restart MagicMirror
pm2 start MagicMirror
-
@sdetweil Nothing has changed

-
@RIKKO14 fun… try this
we need to edit a js file
cd ~/MagicMirror/js nano electron.jsscroll down to
let address = (config.address === void 0) | (config.address === "") ? (config.address = "localhost") : config.address;add a bank line after
on the blank line, copy/paste these lines
mainWindow.webContents.on("new-window", function(event, url) { event.preventDefault(); // This will open a new Electron window to load the url. shell.openExternal(url); });so it looks like this when you are done
let address = (config.address === void 0) | (config.address === "") ? (config.address = "localhost") : config.address; mainWindow.webContents.on("new-window", function(event, url) { event.preventDefault(); // This will open a new Electron window to load the url. shell.openExternal(url); }); mainWindow.loadURL(`${prefix}${address}:${config.port}`);ctrl-o to save the file
ctrl-x to exit nano
cd …then
pm2 restart MagicMirror
-
@sdetweil after doing this :
cd ~.MagicMirror/js nano electron.jsI have this :

So I can’t scroll anywhere…
-
@RIKKO14 sorry typo, try again
-
I tryed 2 times with space and with not space before
mainWindow.webContents.on (...)
https://zupimages.net/viewer.php?id=22/34/77nw.jpg
but style the same…

-
@RIKKO14 can’t see the image. u can just upload here, 3 icon from right in editor
tabs don’t matter
-
@RIKKO14 do u have a real display on pi?
or using vnc all the time? -
I use VNC to tape the commands but I have the same screen on my Pi MagicMirror
-
@RIKKO14 can u open the advert tab and see what it is? there shouldn’t be any advert showing from MM content
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login