New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New update Black Screen #1243

Closed
NicoMontanaro opened this Issue Apr 1, 2018 · 89 comments

Comments

Projects
None yet
@NicoMontanaro
Copy link

NicoMontanaro commented Apr 1, 2018

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

@desq42

This comment has been minimized.

Copy link

desq42 commented Apr 1, 2018

…same here.

@kikokazuma

This comment has been minimized.

Copy link

kikokazuma commented Apr 1, 2018

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.

@kikokazuma

This comment has been minimized.

Copy link

kikokazuma commented Apr 1, 2018

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

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 1, 2018

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

@kikokazuma

This comment has been minimized.

Copy link

kikokazuma commented Apr 1, 2018

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

@kikokazuma

This comment has been minimized.

Copy link

kikokazuma commented Apr 1, 2018

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

@NicoMontanaro

This comment has been minimized.

Copy link

NicoMontanaro commented Apr 1, 2018

I did, but still no answer. Thanks!

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 1, 2018

What commands did you guys use to update?

@hermannw

This comment has been minimized.

Copy link

hermannw commented Apr 1, 2018

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! magicmirror@2.3.0 start: sh run-start.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the magicmirror@2.3.0 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.

@kikokazuma

This comment has been minimized.

Copy link

kikokazuma commented Apr 1, 2018

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

I ran this from the MagicMirror directory:

git pull && npm install

@hermannw

This comment has been minimized.

Copy link

hermannw commented Apr 1, 2018

Michael,

I used the recommended git pull && npm install.

@NicoMontanaro

This comment has been minimized.

Copy link

NicoMontanaro commented Apr 1, 2018

git pull && npm install

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 1, 2018

Try disabling all non-default modules.

@kikokazuma

This comment has been minimized.

Copy link

kikokazuma commented Apr 1, 2018

Hi MichMich

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

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 1, 2018

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

@kikokazuma

This comment has been minimized.

Copy link

kikokazuma commented Apr 1, 2018

@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!

@hermannw

This comment has been minimized.

Copy link

hermannw commented Apr 1, 2018

Nope. Disabling modules did not help.

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 1, 2018

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?

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 1, 2018

@hermannw Try disabling the updatenotification module.

@hermannw

This comment has been minimized.

Copy link

hermannw commented Apr 1, 2018

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

@kikokazuma

This comment has been minimized.

Copy link

kikokazuma commented Apr 1, 2018

@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.

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 1, 2018

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

@Hurg84

This comment has been minimized.

Copy link

Hurg84 commented Apr 1, 2018

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

@desq42

This comment has been minimized.

Copy link

desq42 commented Apr 1, 2018

Hi,

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

Regards

desq

@kikokazuma

This comment has been minimized.

Copy link

kikokazuma commented Apr 1, 2018

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

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

@Hurg84

This comment has been minimized.

Copy link

Hurg84 commented Apr 1, 2018

I got node v6.14.1 like desq42

@hermannw

This comment has been minimized.

Copy link

hermannw commented Apr 1, 2018

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..."

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 1, 2018

Could someone try the following in the MagicMirror folder:

npm install electron@1.4.15

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

@Hurg84

This comment has been minimized.

Copy link

Hurg84 commented Apr 1, 2018

@MichMich It works with node v6.14.1

Thanks :-)

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 1, 2018

So an electron downgrade solved it for you?

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 5, 2018

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)

@Hurg84

This comment has been minimized.

Copy link

Hurg84 commented Apr 5, 2018

@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

@Hurg84

This comment has been minimized.

Copy link

Hurg84 commented Apr 5, 2018

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.

@winstonma

This comment has been minimized.

Copy link

winstonma commented Apr 6, 2018

@justjim1220 I tried reverting package.json and package.json.lock, remove the whole node_modules folder 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.

@a-wenzel

This comment has been minimized.

Copy link

a-wenzel commented Apr 6, 2018

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

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 6, 2018

I've changed the develop branch to electron 2 beta: d21d9f0

@fewieden

This comment has been minimized.

Copy link
Contributor

fewieden commented Apr 6, 2018

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

@SunnyRx

This comment has been minimized.

Copy link

SunnyRx commented Apr 9, 2018

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

@a-wenzel

This comment has been minimized.

Copy link

a-wenzel commented Apr 9, 2018

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

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Apr 9, 2018

What version of node do you use?

@a-wenzel

This comment has been minimized.

Copy link

a-wenzel commented Apr 9, 2018

Node v9.11.1

@justjim1220

This comment has been minimized.

Copy link

justjim1220 commented Apr 9, 2018

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!!!

@a-wenzel

This comment has been minimized.

Copy link

a-wenzel commented Apr 9, 2018

@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

@ezar

This comment has been minimized.

Copy link

ezar commented Apr 10, 2018

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

@justjim1220

This comment has been minimized.

Copy link

justjim1220 commented Apr 10, 2018

@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.

@justjim1220

This comment has been minimized.

Copy link

justjim1220 commented Apr 10, 2018

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.

@lartzam

This comment has been minimized.

Copy link

lartzam commented Apr 12, 2018

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.

@E3V3A

This comment has been minimized.

Copy link
Contributor

E3V3A commented Apr 13, 2018

  • 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.

@E3V3A

This comment has been minimized.

Copy link
Contributor

E3V3A commented May 9, 2018

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.

@E3V3A

This comment has been minimized.

Copy link
Contributor

E3V3A commented May 10, 2018

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

@sdetweil

This comment has been minimized.

Copy link
Contributor

sdetweil commented May 10, 2018

i just did

npm remove electron
npm install electron@1.7.9

and my black screen is gone

first ever install may 9, 2018

@winstonma

This comment has been minimized.

Copy link

winstonma commented May 11, 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.

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented May 11, 2018

Electron 2.0 is out of Beta, so I updated the package.json to use the latest version. (889af46) - 2.0 works fine on my Pi's, but it does use a lot more CPU causing more heat.

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented May 20, 2018

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

@marphi1602

This comment has been minimized.

Copy link

marphi1602 commented May 20, 2018

@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!

@MichMich

This comment has been minimized.

Copy link
Owner

MichMich commented Jun 27, 2018

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

@MichMich MichMich closed this Jun 27, 2018

@MaKloth

This comment has been minimized.

Copy link

MaKloth commented Aug 20, 2018

@sdetweil worked for me as well.

@Burnich

This comment has been minimized.

Copy link

Burnich commented Aug 21, 2018

@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 #electron/electron#12937

@yeyotron69

This comment has been minimized.

Copy link

yeyotron69 commented Dec 7, 2018

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

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