Read the statement by Michael Teeuw here.
MM shuts down after an hour
-
@sdetweil said in MM shuts down after an hour:
@Lazershrimp you are not checking for package.json, except to apply the fix
the fix is to
npm install xxxx
where xxx is the missing library as found in the log error messagesThis I don’t understand. You write in “fix for black screen in 2.16 and later” that some MM modules used libraries, which are now removed.
By navigating to the module folder and running “ls package.json”, I am checking whether the module contains this file or not, yes? If it does not, the fix is to install it by typing “npm init -y”
But since my modules all seem to contain the package.json, I’m guessing that this is not what causes my problem.
Or am I wrong?
-
@Lazershrimp you are wrong
if you have a black screen
you look at the messages put out from npm start
if you see
cannot find module xxxx
then this mm module has the problem
the fix is to install the missing library (called module in the message,) IN the mm module folder
NOW as part of the fix process we want the file put in the right place NOT in the MagicMirror folder.
to DO THAT , the mm module MUST supply a package.json file
this is where the ls command comes in to the fix process
it it already exists, cool, do the npm install for the missing library
if it does NOT exist, create it it with the npm init -y command
AND then do the npm install for the missing library.but, the 1st step is to identify the missing library from the message output.
if that is NOT the problem, then the rest of the instructions don’t matterthere are.multiple libraries that could cause the problem, that’s why I have to read the messages to determine which ones are needed
-
@sdetweil I am having trouble following you, but that would most likely be due to my poor understanding of programming and its terminology.
You say
@sdetweil said in MM shuts down after an hour:
look at the messages put out from npm start
if you see
cannot find module xxxx
then this mm module has the problem… I don’t even understand what you mean by “messages put out from npm start”. Is that the “start screen” for MM, the one that appears if you have a say an error in your config file?
However, I’m thinking that’s not the issue here. As I mentioned, I did follow your guide “fix for black screen in 2.16 …”, and the output was normal. Also, I don’t always get black screens, sometimes it’s a login screen.
The screensaveroff script didn’t help either. MM still shuts down after a while. It’s not always after an hour, seems to vary. Earlier today it had shut down after 39 mins, now it’s been running for over 40 mins.
Again, I’m sorry for my bad skills at this. Any help would be much appreciated!
-
@Lazershrimp I only have one more question
does it shutdown if MagicMirror is not running?
-
@sdetweil said in MM shuts down after an hour:
I only have one more question
does it shutdown if MagicMirror is not running?Thanks for your patience, Sam.
Haven’t actually tried not running the MM, since it autostarts. And I don’t have a mouse/keyboard attached to the mirror setup. Good question though.
But - I think I might actually have figured out what the problem is! I pulled out a long ethernet cable to hardwire the Pi to internet. And - it’s been running for three hours straight now. Thinking that this might actually be a hardware issue.
If it still runs tomorrow morning, I will call this a faulty Wifi circuit issue. Strange though, that it would coincide with the software update.
What do you you think? Could a dodgy Wifi crash the MM app?
-
@Lazershrimp dodgie wifi creates dodgie data, which crashes all kind of apps
-
MM has been running flawlessly for >24h now, with assistance of a LAN cable. I consider the issue solved. Have ordered a wifi usb dongle as a more permanent solution. I consider this issue solved.
-
@Lazershrimp awesome detective work!!