Magicmirror: New update Black Screen

Created on 1 Apr 2018  Ā·  121Comments  Ā·  Source: MichMich/MagicMirror

Just updated to the last version of MM, but when i run the script i get just a black blank screen.

Most helpful comment

i just did

npm remove electron
npm install [email protected]

and my black screen is gone

first ever install may 9, 2018

All 121 comments

…same here.

Same problem here after updating this morning, even after a clean install. I was prepping this as a science fair project for my daughter due tomorrow so the timing is absolutely horrible, lol. Is there a way for me to install the previous version?

NPM log shows the following:

Starting MagicMirror: v2.3.0
Loading config ...
Loading module helpers ...
No helper found for module: alert.
Initializing new module helper ...
Module helper loaded: updatenotification
No helper found for module: clock.
Initializing new module helper ...
Module helper loaded: calendar
No helper found for module: compliments.
No helper found for module: currentweather.
No helper found for module: weatherforecast.
Initializing new module helper ...
Module helper loaded: newsfeed
All module helpers loaded.
Starting server on port 8080 ...
Server started ...
Connecting socket for: updatenotification
Connecting socket for: calendar
Starting node helper for: calendar
Connecting socket for: newsfeed
Starting module: newsfeed
Sockets connected & modules started ...
Whoops! There was an uncaught exception...
{ Error: listen EADDRINUSE 127.0.0.1:8080
at Object.exports._errnoException (util.js:1050:11)
at exports._exceptionWithHostPort (util.js:1073:20)
at Server.setupListenHandle [as _listen2] (net.js:1263:14)
at listenInCluster (net.js:1304:12)
at doListen (net.js:1428:7)
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:10)
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '127.0.0.1',
port: 8080 }
MagicMirror will not quit, but it might be a good idea to check why this happene d. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://gi thub.com/MichMich/MagicMirror/issues
Launching application.

Dear 8 pound, 6 oz baby Jesus, save me.

It seems the port is in use: EADDRINUSE 127.0.0.1:8080 Did you try rebooting you Pi?

Yes, I've rebooted several times and even tried a fresh install of Raspbian + MagicMirror.

Was working fine last night and broke after this morning's update, much like the OP.

I did, but still no answer. Thanks!

What commands did you guys use to update?

Same problem here.
mm-error-0.log contains these lines several hundred times:

TypeError: Cannot read property 'hash' of null
at /home/pi/MagicMirror/modules/default/updatenotification/node_helper.js:68:31
at Git. (/home/pi/MagicMirror/node_modules/simple-git/src/git.js:1482:10)
at done (/home/pi/MagicMirror/node_modules/simple-git/src/git.js:1354:21)
at ChildProcess. (/home/pi/MagicMirror/node_modules/simple-git/src/git.js:1379:16)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

and then at the end:

npm ERR! Linux 4.4.43-v7+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.12.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: sh run-start.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'sh run-start.sh'.
npm ERR! Make sure you have the latest version of node.js and npm installed.

mm-out-0.log on the other hand says everything is running ok...

/home/pi/.pm2/logs/mm-out-0.log 166857/163K 100%

sh run-start.sh

Starting MagicMirror: v2.3.0
Loading config ...
Loading module helpers ...
No helper found for module: alert.
Initializing new module helper ...
Module helper loaded: updatenotification
No helper found for module: clock.
Initializing new module helper ...
Module helper loaded: calendar
Initializing new module helper ...
Module helper loaded: newsfeed
No helper found for module: MM-Remote-Control.
Initializing new module helper ...
Module helper loaded: mmm-weatherchart
Initializing new module helper ...
Module helper loaded: MMM-Tools
No helper found for module: worldclock.
No helper found for module: MMM-CurrencyExchange.
Initializing new module helper ...
Module helper loaded: MMM-NOAA
Initializing new module helper ...
Module helper loaded: MMM-ImagesPhotos
All module helpers loaded.
Starting server on port 8080 ...
Server started ...
Connecting socket for: updatenotification
Connecting socket for: calendar
Starting node helper for: calendar
Connecting socket for: newsfeed
Starting module: newsfeed
Connecting socket for: mmm-weatherchart
Starting node helper: mmm-weatherchart
Connecting socket for: MMM-Tools
Connecting socket for: MMM-NOAA
Starting module: MMM-NOAA
Connecting socket for: MMM-ImagesPhotos
Starting node helper for: MMM-ImagesPhotos
Sockets connected & modules started ...
Launching application.

Any help would be appreciated.

As per instructions on https://github.com/MichMich/MagicMirror#updating

I ran this from the MagicMirror directory:

git pull && npm install

Michael,

I used the recommended git pull && npm install.

git pull && npm install

Try disabling all non-default modules.

Hi MichMich

Given I am running a clean install, would there by any non-default modules?

@kikokazuma Not by default. - Any messages in your logs?

@MichMich pardon my noobishness, is there a log I can provide other than the NPM log I posted above? If so, what command can I run to help?

Thanks in advance!

Nope. Disabling modules did not help.

AH, sorry, no that was what I was looking for (only noticed @hermannw 's log).
@kikokazuma You log states you are already running something on port 8080. Are you sure you're not running two instances at the same time?

@hermannw Try disabling the updatenotification module.

Nope. No change. I disabled everything except the clock.

@MichMich Previously, if I ran sudo netstat -lnptu it would tell me electron was already running on that port.

Strangely, just one minute ago, I rebooted again and it seems to be working again.
Others reported similar issues: https://forum.magicmirror.builders/topic/6874/so-to-update-magicmirror-i-would

Something is/was going on.

So, just to be clear @kikokazuma, it is working for you now? If so, what version of Node are you running?

Hi MichMich, hi other Magicmirror Users,

I can confirm that after the upgrade the physical display stays black,
reinstalling electron doesnt fix the problem.

On the other hand ip:8080 in a Browser works, so it's just the mirror's browser.

Regards

Hurg

Hi,

same symptoms here as Hurg84. Applications works remotely, but die Screen stays black.
Node -v -> v6.14.1

Regards

desq

@MichMich correct. I rebooted again and it is still working for me.

If I run node -v, I get:
v9.10.1

I got node v6.14.1 like desq42

Opening from a browser doesn't work for me either.
I white-listed all IP's and the log says server is running but when I try to connect it says "Can't establish connection..."

Could someone try the following in the MagicMirror folder:

npm install [email protected]

If this works, please state your Node version as well. (node -v)

@MichMich It works with node v6.14.1

Thanks :-)

So an electron downgrade solved it for you?

Yes, I can confirm that it works fine now.

Ok, I'll release a new version with a downgraded electron.

Worked for me! node version 6.14.15

Hi Guys!

@Hurg84

It works with node v6.14.1

@MichMich

Ok, I'll release a new version with a downgraded electron.

IMHO, this doesn't make sense at all. You're updating everything except the most relevant thing, which is node itself. Can you please explain the reasoning behind this?

You mean electron? Node isn't upgraded.

Guess he's refering to solving the problem by upgrading node into a version that works with the new electron version instead of downgrading electron to a node compatible version.

I upgraded node, but that didn’t seem to solve the issue. Downgrading electron is an intermediate solution until we find a way to get the new electron version to work.

@MichMich v9.10.1 electron-downgrade is solved my problem too thx

I upgraded node, but that didn’t seem to solve the issue. Downgrading electron

Yeah, but you never actually upgraded electron fully, only to 1.7.13, when the latest is 1.8.4. Then again I have no idea how those guys do their versioning there. They have a 1.8.3 released before the 1.7.13... However, there were some bug fix mentions of windows not showing in the 1.8.4.

Nope. Tried 1.8.4 as well (using Node 9).

I try electron 1.8.4 using node 9, fails šŸ‘Ž

The developer version 2.4.0 did not have these issues...

Electron 1.8.4 has been giving a lot of developers problems. Bugs need worked out. Thus the reason 1.7.3 is still available and widely used.

Funny thing, you say it's an issue with Windows, yet I am running Windows 10, node 9.9.0, & electron 1.8.4 as well as the developer MM 2.4.0 and it fan perfectly the first time I tried.

Messed up a little now though, trying to put same tweaks I was running with last version and have a syntax error somewhere... SMH...

@desq42

same symptoms here as Hurg84. Applications works remotely, but die Screen stays black.
I can confirm that after the upgrade the physical display stays black,
On the other hand ip:8080 in a Browser works, so it's just the mirror's browser.

This is interesting. Can you guys please re-post the log messages? Just the error plus a few lines before & after the error should suffice. And make sure to:

  • disable all mods except clock, especially updatenotification
  • update your nodejs to at least 8 versions
  • update npm
  • in a separate terminal, run: journalctl --system -f -a, then start MM in another.

Hi EVA,

I'm not yet that familiar with the Mirrorsoftware yet.
Where are the logs located?

pm2 logs

less ~/.pm2/logs/mm-error-0.log
less ~/.pm2/logs/mm-out-0.log

@E3V3A It's obviously an issue with electron. The server is just a simple node (express) server which doesn't need electron to start. So if the server responds, and electron doesn't work, the issue is caused by electron. This is why I tried downgrading electron, which 'solved' the issue (for the time being).

Apparently, Electron is having a hard time running on the Pi platform. We will need to investigate a way to get a more recent version of Electron up and running. A pull request for this would be very welcome. It might be a good idea to start a new branch for this.

I'll reopen this issue so we can investigate this further.

Hi, downgrading the electron solved the problem for me as well!!

@MichMich Unless people actually start posting the errors they get, and how they got them in the first place, there is not much we can do. Just hearing that they got a black screen or it doesn't work. just isn't helping anyone.

Like @Kiina mentioned in another issue, apparently there was no errors when people (who?) were running the dev editions... Or maybe nobody ever bothered to test the dev??

Either way, when telling people to update with "git pull" etc, I guess we also need to tell them to also update all their OS, apt packages and what not, that otherwise are causing a bunch of irrelevant error reports.

The fact that MM is working for remote connection, should be a big hint how to debug this...

My guess is no one is running the dev branch.

Or -just like me- forget to run npm install after the git pull. (This is the reason why I didn’t notice the issue with Electron after we bumped the version. ā˜ŗļø)

@VH-Tech

Hi, downgrading the electron solved the problem for me as well!!

Hey! Downgrading is cheating! Don't downgrade and help us out debugging. :D :rofl:

@E3V3A well not everyone wants to try debugging and solving the issue, esp if they just want to run the mirror. But maybe the OS would be interesting. Is it really a issue with the raspberry or maybe Raspbian? Anyone tried a different OS?

Nope. It’s an issue with electron.

Well the thing it it works fine on Windows and Linux on non rpi devices. And I don't see anything general about electron being broken on rpi since other projects seem to be working just fine. So there has to be an issue with some implementations or weird combinations. Also I'm kinda sure it was working one point in time but I will look into it when I got a few more spare rpi and sd cards

Sorry, I'm late.

---mm-error-0.log after upgrade to 2.3.0---

npm ERR! Linux 4.14.31-v7+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.14.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: sh run-start.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'sh run-start.sh'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the magicmirror package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! sh run-start.sh
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs magicmirror
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls magicmirror
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/MagicMirror/npm-debug.log
(node:991) DeprecationWarning: sys is deprecated. Use util instead.
(node:1112) DeprecationWarning: sys is deprecated. Use util instead.

--END--

---mm-out-0.log after upgrade to 2.3.0---

[email protected] start /home/pi/MagicMirror
sh run-start.sh

Starting MagicMirror: v2.3.0
Loading config ...
Loading module helpers ...
No helper found for module: alert.
Initializing new module helper ...
Module helper loaded: updatenotification
No helper found for module: clock.
Initializing new module helper ...
Module helper loaded: calendar
No helper found for module: currentweather.
No helper found for module: weatherforecast.
Initializing new module helper ...
Module helper loaded: newsfeed
Initializing new module helper ...
Module helper loaded: MMM-dht22
All module helpers loaded.
Starting server on port 8080 ...
You're using a full whitelist configuration to allow for all IPs
Server started ...
Connecting socket for: updatenotification
Connecting socket for: calendar
Starting node helper for: calendar
Connecting socket for: newsfeed
Starting module: newsfeed
Connecting socket for: MMM-dht22
Starting node helper: MMM-dht22
Sockets connected & modules started ...
Launching application.
Create new calendar fetcher for url: http://xxx - Interval: 300000
Create new calendar fetcher for url: http://ifeiertage.de/nw-s.ics - Interval: 300000
Create new news fetcher for url: https://www.n-tv.de/rss - Interval: 300000

---END---

Hope this helps in any way.

Hi @MichMich I just updated MagicMirror to v2.3.1 on my RPi2.

I used the default config.js (without any custom addon) and it still blank screen.

I copy paste to replace the new config.hs with my old one. Did same with
package.json and package-lock Jon.

Then did npm rebuild.

Now it works!

On Wed, Apr 4, 2018, 5:02 AM Winston Ma notifications@github.com wrote:

Hi @MichMich https://github.com/MichMich I just updated MagicMirror to
v2.3.1 on my RPi2.

I used the default config.js (without any custom addon) and it still blank
screen.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/MichMich/MagicMirror/issues/1243#issuecomment-378547776,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AaT_6UAr2g6vEaVNBOZO6S7AlCYf3PRtks5tlJpIgaJpZM4TC2p9
.

With any of the default modules… If you made any changes to the .js files or the README.md files, AND, you would like to keep those changes… TRY THIS:

cut and paste any of the default modules from the MagicMirror directory to any other directory.
You also need to do the same for the package.json, package-lock.json, and your config.js file if there are any additional modules that have been added.

then do the ā€˜git pull $$ npm install’

when it is done, replace those files in the new MagicMirror that just got installed with the ones you saved from your old MagicMirror.

then do ā€˜npm rebuild’

It took a couple of times starting the MagicMirror to get all the changes to take…

this also fixes the currentweather module problem…

and the blank screen problem…

I just installed MagicMirror² onto a new Pi (3B+). Then I ran npm install electron@beta from within the MagicMirror folder. Electron 2 (beta) works and is much smoother than the default version. SO we might want to test with that. Hopefully Electron 2 will be out of beta before the release of MM 2.4.0.

Anyone willing to test with npm install electron@beta? (On Node 9)

@MichMich I've managed to update/upgrade anything but electron.

I keep getting the following error:

---Start---
/home/pi/MagicMirror/node_modules/electron/install.js:47
throw err
^

Error: Could not parse checksum file at line 1:
at new ChecksumParseError (/home/pi/MagicMirror/node_modules/sumchecker/build.js:71:127)
at /home/pi/MagicMirror/node_modules/sumchecker/build.js:130:20
at Array.forEach ()
at /home/pi/MagicMirror/node_modules/sumchecker/build.js:125:38
at new Promise ()
at ChecksumValidator.parseChecksumFile (/home/pi/MagicMirror/node_modules/sumchecker/build.js:121:14)
at
---End---

I tried some previous fixes from older electron version and parameters like "--unsafe-perm=true --allow-root" without any success.

After this error either Electron immediately crashes or remains a black screen and the webserver doesnt respond to external Browsers either.

Good thing is in this state running "git pull && npm install" in the Magicmirror directory followed by a reboot brings to Mirror back to life.

I'll try upgradeing electron the following days again.
I'd aprechiate helpful replies :)

Regards

Hurg

hi *, me again :)

If anyone wants to try electron too, here’s what i’ve done so far and my Mirror is still working:

Updating Note:

sudo curl -sL https://deb.nodesource.com/setup_9.x | sudo bash -
sudo apt-get install -y nodejs

Updating npm:

sudo npm install npm@latest -g

Installing Prerequisites for Electron beta:

sudo npm install grunt@latest -g
sudo npm install grunt-eslint@latest -g
sudo npm install grunt-yamllint@latest -g

If your Mirror crashes immediately after trying to install electron@beta
or remains a black screen without any sign of life even with a remote browser run:

git pull && npm install

in the Magicmirror directory followed by a reboot.

@justjim1220 I tried reverting package.json and package.json.lock, remove the whole node_modulesfolder and run npm install && npm start. But I still get black screen.

@MichMich Thanks for the info. I updated the electron to the latest beta and now it works. By the way I am still running the default node 6.XX.

Same here.. Updatet to electron@beta and it works.

would be good if also some users, who experienced the performance issues with newer electron version, would test the electron 2 beta

iOS 9 -> Black Screen
iOS 11 -> Everything is OK

Anyone else get realy high CPU Usage of electron with new Version? My raspi goes up to 75°C and loadspikes to over 300%...

What version of node do you use?

Node v9.11.1

Yes, very high CPU usage, electron is buggy, stops working a few times a day which requires a full reboot of my PC.highly noticed past few days... Computer freezes a lot!!!

@justjim1220 if u restart is the load high from beginning? After reboot my pi seems to be ok. i will keep an eye on it

Same here! Raspberry freeze after 8 hours. Using 2.2.x works for 30 days :(

@a-wenzel...

No, it seems that it runs fine after reboot. But I am constantly adding or attempting to add tweaks here and there, requiring me to reload MM. Which eventually startsto get laggy and buggy, and that's when I notice the high CPU usage. It goes back to being gone after I either reboot the PC or shut down and start back up MM.

I have an older desktop running Windows 10 and the newest MN (not dev) in my shop. I left it on over the weekend and it continued to update an run smoothly after 3 days, so after a few tweaks, I'll running it longer and see if I get any issues.

Yeah hi so today I got my physical frame ready and started to download the magic mirror while installing it the screen went black all of a sudden but when I tapped enter it went back to normal then at the end it gave me the same errno things and complained something about decencies not able to be installed. I will try a clean install of raspbian today since I already have some stuff installed from trying different types of these project app thingys and the old files with similar names might intervene with this ones installing.

  • I have no idea what I am talking about, but I read some other repo's who had electron trouble, started to use .remote at the end of their require clause that apparently fixed it for some.
    https://github.com/electron/electron/blob/master/docs/api/remote.md

  • The latest RPi Stretch apt updates make you have to install nodejs twice! (each time an increment) to get the latest v9.11.1, but they still insist in using the outdated npm* @ v5.6.0, so you have to update that manually to v5.8.0.

Any updates or success with this issue?

If we are going to be able to debug this, please consider the following.
After a fresh reboot and just after starting MM and getting a black screen.
First make sure that your $HOME/MagicMirror/installers/mm.sh reads:

cd ~/MagicMirror
DISPLAY=:0 npm start

Then login remotely and run with:
cd $HOME/MagicMirror/installers/; pm2 flush && rm ~/.pm2/logs/mm-* ; pm2 start mm.sh

Please post the output of:

uname -a
node -v && npm -v
dmesg -x -d -T
journalctl -b
sudo cat /var/log/Xorg.0.log
sudo cat /var/log/lightdm/lightdm.log
systemctl list-unit-files -t service -all
cat ~/.xsession-errors
cat ~/.pm2/logs/mm-error-0.log
cat ~/.pm2/logs/mm-out-0.log

To reduce space you can use a pastebin service like: https://defuse.ca/pastebin.htm and just post the link here.

So what is the current status of using npm install electron@beta?
(Beta what ??)

i just did

npm remove electron
npm install [email protected]

and my black screen is gone

first ever install may 9, 2018

@E3V3A I downloaded MagicMirror and then run ncu -a and npm update. This works on my RPi2

I pasted my package.json here. You just need to paste my package.json, run npm update and npm start. It should work.

FYI: My package.json uses the latest electron 2.0. Hope it works for you.

Electron 2.0 is out of Beta, so I updated the package.json to use the latest version. (https://github.com/MichMich/MagicMirror/commit/889af461c6dfe4aaf86da625d905cb5b3aa31fbc) - 2.0 works fine on my Pi's, but it does use a lot more CPU causing more heat.

The overheating of the CPU is easily solvable by activating the experimental Open GL driver. I added information about this to the wiki: https://github.com/MichMich/MagicMirror/wiki/Configuring-the-Raspberry-Pi#enable-the-open-gl-driver-to-decrease-electrons-cpu-usage

@winstonma Thanks for your provided package.json - I have really searched a couple of hrs to find any solution for the black screen issue, nothing has worked so far except your hint! Thanks!

This issue is solved. The next release will include Electron 2.

@sdetweil worked for me as well.

@MichMich

Sadly, activating OpenGL drivers generate a empty electron window, the only way to get MM working is by disabling OpenGL drivers.

This seems linked to #https://github.com/electron/electron/issues/12937

Hello MichMich, I’m trying start my MagicMirror with and when read everything on the table in ā€œstatusā€ give me ā€˜stopped’.... Do you know what happens? Thanks

Just updated to the latest mm and I get black screen after a while. Please help

some users in forum have documented problems updating the other modules, particularly MMM-PIR-sensor

I dont use mmm pir sensor

Ok, two debug things to do

  1. start mirror like this, from a terminal window
npm start dev &

watch for error messages in the terminal window

  1. in the developers window (on screen)
    select the console tab,
    scroll up to see if there are any messages, errors in red text

so this is the only error in red:

see image below:

mm

i just checked the api in openweather and it hasnt changed what else could it be?

401 sounds like the api-key for openweather wasn't specified correctly,

so I removed the weather module all together and the error has gone however I now get this error:
mm

and on my terminal I get this :

........
..........
  errno: 'EADDRINUSE',
  code: 'EADDRINUSE',
  syscall: 'listen',
  address: '::',
  port: 8080 }
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection    ?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/i    ssues
Launching application.
Whoops! There was an uncaught exception...
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at fs.readFile (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:188:46)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:440:3)
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection    ?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues

Have two copies running. Reboot

On Thu, Apr 4, 2019, 2:18 PM bachoo786 notifications@github.com wrote:

so I removed the weather module all together and the error has gone
however I now get this error:
[image: mm]
https://user-images.githubusercontent.com/6251030/55582167-b50dfa80-5716-11e9-8de1-6cea08009391.PNG

and on my terminal I get this :

........
..........
errno: 'EADDRINUSE',
code: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 8080 }
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection ?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/i ssues
Launching application.
Whoops! There was an uncaught exception...
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at fs.readFile (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:188:46)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:440:3)
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection ?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MichMich/MagicMirror/issues/1243#issuecomment-480028659,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABbcHvJvOgK3UFxRsvGstz3Jkxzz1Ozfks5vdlAdgaJpZM4TC2p9
.

So rebooted everything was working fine for few hours and now back to black screen

Pm2 list doesn't show mm anymore it seems like its disappearing from pm2 until i reboot the rpi

pm can't help with, never could get it to work for me..

black screen after a few hours.. comment out the updatenotification module in config.js.. this has caused problems for a while..

@bachoo786
sudo nano /etc/systemd/system/pm2-pi.service

check the paths... by default there are wrong for pi-user.

```[Unit]
Description=PM2 process manager
Documentation=https://pm2.keymetrics.io/
After=network.target

[Service]
Type=forking
User=pi
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
Environment=PM2_HOME=/home/pi/.pm2
PIDFile=/home/pi/.pm2/pm2.pid

ExecStart=/usr/lib/node_modules/pm2/bin/pm2 resurrect
ExecReload=/usr/lib/node_modules/pm2/bin/pm2 reload all
ExecStop=/usr/lib/node_modules/pm2/bin/pm2 kill

[Install]
WantedBy=multi-user.target
```

@a-wenzel sorry just saw this.

how shall I check the paths? and what are the correct paths?

I notice the same behavior as reported by bachoo786 above.
When launching the mirror with start npm & the mirror boots up nicely, reports the correct weather and correct news, but fails with the calendar and MMM-RMV modules.
The console reports that several modules have stopped.:

Whoops! There was an uncaught exception...
{ Error: listen EADDRINUSE 127.0.0.1:8080
    at Server.setupListenHandle [as _listen2] (net.js:1330:14)
    at listenInCluster (net.js:1378:12)
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1492:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:55:10)
  errno: 'EADDRINUSE',
  code: 'EADDRINUSE',
  syscall: 'listen',
  address: '127.0.0.1',
  port: 8080 }
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
Launching application.
Shutting down server...
Stopping module helper: updatenotification
Stopping module helper: calendar
Stopping module helper: MMM-RMV
Stopping module helper: newsfeed

However, if I list all running processes while my mirror is running I see four instances of Electron.
Is this expected????

That means another copy if mm is running already

Any idea how this could happen and how to stop this behaviour?
I just ran the "standard" setup on a fresh Raspi using this command:

bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)"

The install script will register ANOTHER pm2 to start the mirror if one already exists

@a-wenzel sorry just saw this.

how shall I check the paths? and what are the correct paths?

@bachoo786 My paste has the right paths.

@a-wenzel thanks.. so the path is the reason for the black screen issue then ?

@sdetweil
I just ran the script once.
I already formated and started from scratch 3 times, always with the same result.

Do you know where the script registers and calls PM2?
I would like to delete the call of the second instance there.

@bachoo786
I have the same path as reported by a-wenzel and run into a similar issue as you.
Please try the following commands in a terminal window:

npm start &

When you see your black screen open another terminal window.
In the terminal window run:

ps -a

How many instances of *Electron * do you see?

Pm2 will start mm at boot time if u start another u will see this kind of problem.

I don't use pm2 for this very reason.

Do pm2 list to see what is registered. Pm2 stop to shutdown some instance by name

Guys magic mirror process has disappeared from my pm2 list.

What shall I do?

see the end of the mm/installers/raspberry.sh for the steps used to create a pm2 entry

Sorry which part is that?

you will have to read the code in the batch file

When I freshly installed mm pm2 was already installed with the mm process...why is that now it has disappeared?

i do not know.. i don't own this code, i am just advising what I know.

Thank you

@sdetweil and @all
Thanks for your help :-), I identified the error now.
I was using the Windows Remote Desktop tool to connect to my Raspberry and installed the XRDP package on my Raspi for this purpose. This is working perfectly fine, but the trouble is, that a remote desktop connection does not mirror the Raspberry desktop, but created an additional one.
Since Magic Mirror was autostart enabled, I got duplicated Magic Mirror instances without seeing them.
Now XRDP is removed from my Pi and I am using the default VNC which mirrors the Raspi screen and I no longer suffer from EADDRINUSE errors that kill my modules.

Hello all,
I had the EACCESS error running MM on windows as described here fixed it by changing the port number from 8080 in config.js

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthieu994 picture matthieu994  Ā·  7Comments

sharmmoh1983 picture sharmmoh1983  Ā·  12Comments

vvzvlad picture vvzvlad  Ā·  7Comments

Korysam15 picture Korysam15  Ā·  12Comments

E3V3A picture E3V3A  Ā·  12Comments