Read the statement by Michael Teeuw here.
MagicMirror screen goes black
-
Hi all,
my magic mirror uses following modules : newsfeed, MMM-DarkSkyForecast, MMM-ethereum, MMM-GoogleMapsTraffic, MMM-LICE
Following issue is occuring after a “while”. This can be 1 day, 1,5 day, more, less…
The screen becomes black. Only thing I can do is ALT-TAB, try to open a command prompt and press CTRL-C to exit the mirror.
In the beginning I thought the Mirror went into sleep, but now I found out there’s a JS stack trace.
**==== JS stack trace =========================================
Security context: 0x3913fa4d <String[21]: http://localhost:8080>
2: emit [events.js:193] [bytecode=0x3664d749 offset=200](this=0x6d485461 ,type=0x4b2dd285 <String[14]: document-start>)
7: l [https://maps.googleapis.com/maps-api-v3/api/js/35/10a/intl/nl_ALL/map.js:94] [bytecode=0x5511e735 offset=4533](this=0x3ae07be9 ,a=0x4ba1f751 ,b=0x3ae4fb91 ,c=0x4ba1f…**I have no idea on what to search to find more help on this.
It looks like an issue in the Google maps ?Any idea what can be wrong please ?
Best regards and thanks in advance,
Davy
-
@davyc I think your suspicion about Google Maps might be correct. I would start by disabling the MMM-GoogleMapsTraffic for a few days to see if the issue goes away.
Then we ca start digging in to the module to see what might be causing the issue.
If the problem doesn’t go away, then repeat disabling with the other modules one at a time until you have a working setup. The last one that you disabled is the culprit, and we can start troubleshooting from there.
-
Sorry to hijack the thread but I have the same problem. I’ve run a log and it seems that MMM-NowplayingSpotify causes the error. Do I have to disable the Spotify or can it be solved?
0|mm | Starting MagicMirror: v2.6.0 0|mm | Loading config ... 0|mm | Loading module helpers ... 0|mm | No helper found for module: MMM-pages. 0|mm | No helper found for module: clock. 0|mm | Initializing new module helper ... 0|mm | Module helper loaded: calendar 0|mm | No helper found for module: currentweather. 0|mm | No helper found for module: weatherforecast. 0|mm | Initializing new module helper ... 0|mm | Module helper loaded: MMM-News 0|mm | Initializing new module helper ... 0|mm | Module helper loaded: MMM-NowPlayingOnSpotify 0|mm | Initializing new module helper ... 0|mm | Module helper loaded: MMM-ResRobot 0|mm | All module helpers loaded. 0|mm | Starting server on port 8080 ... 0|mm | Server started ... 0|mm | Connecting socket for: calendar 0|mm | Starting node helper for: calendar 0|mm | Connecting socket for: MMM-News 0|mm | Connecting socket for: MMM-NowPlayingOnSpotify 0|mm | Connecting socket for: MMM-ResRobot 0|mm | Starting node_helper for module: MMM-ResRobot 0|mm | Sockets connected & modules started ... 0|mm | Create new calendar fetcher for url: http://calendar.manutd.com/Manchester_United.ics - Interval: 300000 0|mm | [NEWS] Initialized. 0|mm | node_helper for MMM-ResRobot received a socket notification: CONFIG - Payload: {"updateInterval":300000,"animationSpeed":2000,"fade":true,"fadePoint":0.25,"apiBase":"https://api.resrobot.se/v2/departureBoard?format=json&passlist=0","apiKey":","routes":],"skipMinutes":3,"maximumEntries":6,"truncateAfter":5,"iconTable":{"B":"fa fa-bus","S":"fa fa-subway","J":"fa fa-train","U":"fa fa-subway","F":"fa fa-ship"}} 0|mm | Fetching new departure data for module: MMM-ResRobot 0|mm | Refreshed access token because it has expired. Expired at: 16:37:45 now is: 16:37:46 0|mm | [NEWS] Articles are aggregated : 85 0|mm | Reusing 61 cached departure(s) for module: MMM-ResRobot 0|mm | Reusing 60 cached departure(s) for module: MMM-ResRobot 0|mm | [NEWS] Articles are aggregated : 82 0|mm | Reusing 59 cached departure(s) for module: MMM-ResRobot 0|mm | [NEWS] Articles are aggregated : 82 0|mm | Reusing 58 cached departure(s) for module: MMM-ResRobot 0|mm | Reusing 57 cached departure(s) for module: MMM-ResRobot 0|mm | [NEWS] Articles are aggregated : 82 0|mm | Reusing 56 cached departure(s) for module: MMM-ResRobot 0|mm | Reusing 55 cached departure(s) for module: MMM-ResRobot 0|mm | Can’t retrieve current song. Reason: 0|mm | { StatusCodeError: 502 - "\n<html><head>\n<meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n<title>502 Server Error</title>\n</head>\n<body text=#000000 bgcolor=#ffffff>\n<h1>Error: Server Error</h1>\n<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>\n<h2></h2>\n</body></html>\n" 0|mm | at new StatusCodeError (/home/pi/MagicMirror/modules/MMM-NowPlayingOnSpotify/node_modules/request-promise-core/lib/errors.js:32:15) 0|mm | at Request.plumbing.callback (/home/pi/MagicMirror/modules/MMM-NowPlayingOnSpotify/node_modules/request-promise-core/lib/plumbing.js:104:33) 0|mm | at Request.RP$callback [as _callback] (/home/pi/MagicMirror/modules/MMM-NowPlayingOnSpotify/node_modules/request-promise-core/lib/plumbing.js:46:31) 0|mm | at Request.self.callback (/home/pi/MagicMirror/modules/MMM-NowPlayingOnSpotify/node_modules/request/request.js:185:22) 0|mm | at emitTwo (events.js:126:13) 0|mm | at Request.emit (events.js:214:7) 0|mm | at Request.<anonymous> (/home/pi/MagicMirror/modules/MMM-NowPlayingOnSpotify/node_modules/request/request.js:1161:10) 0|mm | at emitOne (events.js:116:13) 0|mm | at Request.emit (events.js:211:7) 0|mm | at IncomingMessage.<anonymous> (/home/pi/MagicMirror/modules/MMM-NowPlayingOnSpotify/node_modules/request/request.js:1083:12) 0|mm | name: 'StatusCodeError', 0|mm | statusCode: 502, 0|mm | message: '502 - "\\n<html><head>\\n<meta http-equiv=\\"content-type\\" content=\\"text/html;charset=utf-8\\">\\n<title>502 Server Error</title>\\n</head>\\n<body text=#000000 bgcolor=#ffffff>\\n<h1>Error: Server Error</h1>\\n<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>\\n<h2></h2>\\n</body></html>\\n"', 0|mm | error: '\n<html><head>\n<meta http-equiv="content-type" content="text/html;charset=utf-8">\n<title>502 Server Error</title>\n</head>\n<body text=#000000 bgcolor=#ffffff>\n<h1>Error: Server Error</h1>\n<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>\n<h2></h2>\n</body></html>\n', 0|mm | options: 0|mm | { url: 'https://api.spotify.com/v1/me/player', 0|mm | headers: 0|mm | { Authorization: 'Bearer BQC9NPxBSbMaHF906yTElArejAa2yXsBIC9PfDletpZNubc70vdIuFu2pqQnxrtOPXu_9Hzkthx5HvahcSZ2Z8uxE2CiKpX5J7a78R4I-qkAtVYzFlvaB2OMCl18ZFte_Q_GEPMgbbkQ30TxEyu3IfiGkOyI' }, 0|mm | json: true, 0|mm | method: 'GET', 0|mm | callback: [Function: RP$callback], 0|mm | transform: undefined, 0|mm | simple: true, 0|mm | resolveWithFullResponse: false, 0|mm | transform2xxOnly: false }, 0|mm | response: 0|mm | IncomingMessage { 0|mm | _readableState: 0|mm | ReadableState { 0|mm | objectMode: false, 0|mm | highWaterMark: 16384, 0|mm | buffer: [Object], 0|mm | length: 0, 0|mm | pipes: null, 0|mm | pipesCount: 0, 0|mm | flowing: true, 0|mm | ended: true, 0|mm | endEmitted: true, 0|mm | reading: false, 0|mm | sync: true, 0|mm | needReadable: false, 0|mm | emittedReadable: false, 0|mm | readableListening: false, 0|mm | resumeScheduled: false, 0|mm | destroyed: false, 0|mm | defaultEncoding: 'utf8', 0|mm | awaitDrain: 0, 0|mm | readingMore: false, 0|mm | decoder: null, 0|mm | encoding: null }, 0|mm | readable: false, 0|mm | domain: null, 0|mm | _events: 0|mm | { end: [Array], 0|mm | close: [Array], 0|mm | data: [Function], 0|mm | error: [Function] }, 0|mm | _eventsCount: 4, 0|mm | _maxListeners: undefined, 0|mm | socket: 0|mm | TLSSocket { 0|mm | _tlsOptions: [Object], 0|mm | _secureEstablished: true, 0|mm | _securePending: false, 0|mm | _newSessionPending: false, 0|mm | _controlReleased: true, 0|mm | _SNICallback: null, 0|mm | servername: null, 0|mm | npnProtocol: false, 0|mm | alpnProtocol: false, 0|mm | authorized: true, 0|mm | authorizationError: null, 0|mm | encrypted: true, 0|mm | _events: [Object], 0|mm | _eventsCount: 9, 0|mm | connecting: false, 0|mm | _hadError: false, 0|mm | _handle: null, 0|mm | _parent: null, 0|mm | _host: 'api.spotify.com', 0|mm | _readableState: [Object], 0|mm | readable: false, 0|mm | domain: null, 0|mm | _maxListeners: undefined, 0|mm | _writableState: [Object], 0|mm | writable: false, 0|mm | allowHalfOpen: false, 0|mm | _bytesDispatched: 278, 0|mm | _sockname: null, 0|mm | _pendingData: null, 0|mm | _pendingEncoding: '', 0|mm | server: undefined, 0|mm | _server: null, 0|mm | ssl: null, 0|mm | _requestCert: true, 0|mm | _rejectUnauthorized: true, 0|mm | parser: null, 0|mm | _httpMessage: [Object], 0|mm | read: [Function], 0|mm | _consuming: true, 0|mm | _idleNext: null, 0|mm | _idlePrev: null, 0|mm | _idleTimeout: -1, 0|mm | [Symbol(asyncId)]: 81615, 0|mm | [Symbol(bytesRead)]: 523 }, 0|mm | connection: 0|mm | TLSSocket { 0|mm | _tlsOptions: [Object], 0|mm | _secureEstablished: true, 0|mm | _securePending: false, 0|mm | _newSessionPending: false, 0|mm | _controlReleased: true, 0|mm | _SNICallback: null, 0|mm | servername: null, 0|mm | npnProtocol: false, 0|mm | alpnProtocol: false, 0|mm | authorized: true, 0|mm | authorizationError: null, 0|mm | encrypted: true, 0|mm | _events: [Object], 0|mm | _eventsCount: 9, 0|mm | connecting: false, 0|mm | _hadError: false, 0|mm | _handle: null, 0|mm | _parent: null, 0|mm | _host: 'api.spotify.com', 0|mm | _readableState: [Object], 0|mm | readable: false, 0|mm | domain: null, 0|mm | _maxListeners: undefined, 0|mm | _writableState: [Object], 0|mm | writable: false, 0|mm | allowHalfOpen: false, 0|mm | _bytesDispatched: 278, 0|mm | _sockname: null, 0|mm | _pendingData: null, 0|mm | _pendingEncoding: '', 0|mm | server: undefined, 0|mm | _server: null, 0|mm | ssl: null, 0|mm | _requestCert: true, 0|mm | _rejectUnauthorized: true, 0|mm | parser: null, 0|mm | _httpMessage: [Object], 0|mm | read: [Function], 0|mm | _consuming: true, 0|mm | _idleNext: null, 0|mm | _idlePrev: null, 0|mm | _idleTimeout: -1, 0|mm | [Symbol(asyncId)]: 81615, 0|mm | [Symbol(bytesRead)]: 523 }, 0|mm | httpVersionMajor: 1, 0|mm | httpVersionMinor: 1, 0|mm | httpVersion: '1.1', 0|mm | complete: true, 0|mm | headers: 0|mm | { 'content-type': 'text/html; charset=UTF-8', 0|mm | 'referrer-policy': 'no-referrer', 0|mm | 'content-length': '332', 0|mm | date: 'Sat, 16 Feb 2019 16:16:01 GMT', 0|mm | 'alt-svc': 'clear', 0|mm | connection: 'close' }, 0|mm | rawHeaders: 0|mm | [ 'Content-Type', 0|mm | 'text/html; charset=UTF-8', 0|mm | 'Referrer-Policy', 0|mm | 'no-referrer', 0|mm | 'Content-Length', 0|mm | '332', 0|mm | 'Date', 0|mm | 'Sat, 16 Feb 2019 16:16:01 GMT', 0|mm | 'Alt-Svc', 0|mm | 'clear', 0|mm | 'Connection', 0|mm | 'close' ], 0|mm | trailers: {}, 0|mm | rawTrailers: [], 0|mm | upgrade: false, 0|mm | url: '', 0|mm | method: null, 0|mm | statusCode: 502, 0|mm | statusMessage: 'Bad Gateway', 0|mm | client: 0|mm | TLSSocket { 0|mm | _tlsOptions: [Object], 0|mm | _secureEstablished: true, 0|mm | _securePending: false, 0|mm | _newSessionPending: false, 0|mm | _controlReleased: true, 0|mm | _SNICallback: null, 0|mm | servername: null, 0|mm | npnProtocol: false, 0|mm | alpnProtocol: false, 0|mm | authorized: true, 0|mm | authorizationError: null, 0|mm | encrypted: true, 0|mm | _events: [Object], 0|mm | _eventsCount: 9, 0|mm | connecting: false, 0|mm | _hadError: false, 0|mm | _handle: null, 0|mm | _parent: null, 0|mm | _host: 'api.spotify.com', 0|mm | _readableState: [Object], 0|mm | readable: false, 0|mm | domain: null, 0|mm | _maxListeners: undefined, 0|mm | _writableState: [Object], 0|mm | writable: false, 0|mm | allowHalfOpen: false, 0|mm | _bytesDispatched: 278, 0|mm | _sockname: null, 0|mm | _pendingData: null, 0|mm | _pendingEncoding: '', 0|mm | server: undefined, 0|mm | _server: null, 0|mm | ssl: null, 0|mm | _requestCert: true, 0|mm | _rejectUnauthorized: true, 0|mm | parser: null, 0|mm | _httpMessage: [Object], 0|mm | read: [Function], 0|mm | _consuming: true, 0|mm | _idleNext: null, 0|mm | _idlePrev: null, 0|mm | _idleTimeout: -1, 0|mm | [Symbol(asyncId)]: 81615, 0|mm | [Symbol(bytesRead)]: 523 }, 0|mm | _consuming: true, 0|mm | _dumped: false, 0|mm | req: 0|mm | ClientRequest { 0|mm | domain: null, 0|mm | _events: [Object], 0|mm | _eventsCount: 5, 0|mm | _maxListeners: undefined, 0|mm | output: [], 0|mm | outputEncodings: [], 0|mm | outputCallbacks: [], 0|mm | outputSize: 0, 0|mm | writable: true, 0|mm | _last: true, 0|mm | upgrading: false, 0|mm | chunkedEncoding: false, 0|mm | shouldKeepAlive: false, 0|mm | useChunkedEncodingByDefault: false, 0|mm | sendDate: false, 0|mm | _removedConnection: false, 0|mm | _removedContLen: false, 0|mm | _removedTE: false, 0|mm | _contentLength: 0, 0|mm | _hasBody: true, 0|mm | _trailer: '', 0|mm | finished: true, 0|mm | _headerSent: true, 0|mm | socket: [Object], 0|mm | connection: [Object], 0|mm | _header: 'GET /v1/me/player HTTP/1.1\r\nAuthorization: Bearer BQC9NPxBSbMaHF906yTElArejAa2yXsBIC9PfDletpZNubc70vdIuFu2pqQnxrtOPXu_9Hzkthx5HvahcSZ2Z8uxE2CiKpX5J7a78R4I-qkAtVYzFlvaB2OMCl18ZFte_Q_GEPMgbbkQ30TxEyu3IfiGkOyI\r\nhost: api.spotify.com\r\naccept: application/json\r\nConnection: close\r\n\r\n', 0|mm | _onPendingData: [Function: noopPendingOutput], 0|mm | agent: [Object], 0|mm | socketPath: undefined, 0|mm | timeout: undefined, 0|mm | method: 'GET', 0|mm | path: '/v1/me/player', 0|mm | _ended: true, 0|mm | res: [Circular], 0|mm | aborted: undefined, 0|mm | timeoutCb: null, 0|mm | upgradeOrConnect: false, 0|mm | parser: null, 0|mm | maxHeadersCount: null, 0|mm | [Symbol(outHeadersKey)]: [Object] }, 0|mm | request: 0|mm | Request { 0|mm | domain: null, 0|mm | _events: [Object], 0|mm | _eventsCount: 5, 0|mm | _maxListeners: undefined, 0|mm | headers: [Object], 0|mm | method: 'GET', 0|mm | readable: true, 0|mm | writable: true, 0|mm | explicitMethod: true, 0|mm | _qs: [Object], 0|mm | _auth: [Object], 0|mm | _oauth: [Object], 0|mm | _multipart: [Object], 0|mm | _redirect: [Object], 0|mm | _tunnel: [Object], 0|mm | _rp_resolve: [Function], 0|mm | _rp_reject: [Function], 0|mm | _rp_promise: [Object], 0|mm | _rp_callbackOrig: undefined, 0|mm | callback: [Function], 0|mm | _rp_options: [Object], 0|mm | setHeader: [Function], 0|mm | hasHeader: [Function], 0|mm | getHeader: [Function], 0|mm | removeHeader: [Function], 0|mm | localAddress: undefined, 0|mm | pool: {}, 0|mm | dests: [], 0|mm | __isRequestRequest: true, 0|mm | _callback: [Function: RP$callback], 0|mm | uri: [Object], 0|mm | proxy: null, 0|mm | tunnel: true, 0|mm | setHost: true, 0|mm | originalCookieHeader: undefined, 0|mm | _disableCookies: true, 0|mm | _jar: undefined, 0|mm | port: 443, 0|mm | host: 'api.spotify.com', 0|mm | path: '/v1/me/player', 0|mm | _json: true, 0|mm | httpModule: [Object], 0|mm | agentClass: [Object], 0|mm | agent: [Object], 0|mm | _started: true, 0|mm | href: 'https://api.spotify.com/v1/me/player', 0|mm | req: [Object], 0|mm | ntick: true, 0|mm | response: [Circular], 0|mm | originalHost: 'api.spotify.com', 0|mm | originalHostHeaderName: 'host', 0|mm | responseContent: [Circular], 0|mm | _destdata: true, 0|mm | _ended: true, 0|mm | _callbackCalled: true }, 0|mm | toJSON: [Function: responseToJSON], 0|mm | caseless: Caseless { dict: [Object] }, 0|mm | read: [Function], 0|mm | body: '\n<html><head>\n<meta http-equiv="content-type" content="text/html;charset=utf-8">\n<title>502 Server Error</title>\n</head>\n<body text=#000000 bgcolor=#ffffff>\n<h1>Error: Server Error</h1>\n<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>\n<h2></h2>\n</body></html>\n' } } 0|mm | [NEWS] Articles are aggregated : 82 0|mm | Reusing 54 cached departure(s) for module: MMM-ResRobot 0|mm | [NEWS] Articles are aggregated : 83 0|mm | Reusing 53 cached departure(s) for module: MMM-ResRobot 0|mm | [NEWS] Articles are aggregated : 83 0|mm | Reusing 52 cached departure(s) for module: MMM-ResRobot 0|mm | [NEWS] Articles are aggregated : 83 0|mm | Reusing 51 cached departure(s) for module: MMM-ResRobot 0|mm | [NEWS] Articles are aggregated : 83 0|mm | Reusing 50 cached departure(s) for module: MMM-ResRobot 0|mm | [NEWS] Articles are aggregated : 83 0|mm | Reusing 49 cached departure(s) for module: MMM-ResRobot 0|mm | Reusing 48 cached departure(s) for module: MMM-ResRobot 0|mm | [NEWS] Articles are aggregated : 83 0|mm | Reusing 47 cached departure(s) for module: MMM-ResRobot 0|mm | [NEWS] Articles are aggregated : 83 0|mm | Reusing 46 cached departure(s) for module: MMM-ResRobot 0|mm | [NEWS] Articles are aggregated : 83
-
@hallonpaj said in MagicMirror screen goes black:
I don’t think so. It looks like there’s a temporary problem with Spotify. Since the problem is on their end, it most likely will be resolved soon.From your logs:
message: ‘502 - “\n\n\n502 Server Error\n\n\n
Error: Server Error
\nThe server encountered a temporary error and could not complete your request.
Please try again in 30 seconds.
\n\n\n”’, -
@bhepler Alright! Thanks for answering :)
-
@bhepler said in MagicMirror screen goes black:
It looks like there’s a temporary problem with Spotify. Since the problem is on their end, it most likely will be resolved soon.
but the module could be changed to handle that error and not crash
-
Will try to do that soon. I do not have a lot of time to test, so there will be some delay :-)
-
@davyc yes please fix it as I am getting the same issue (actually since today only although I got it running perfectly for weeks… :thinking_face: )
-
https://github.com/MichMich/MMM-WatchDog
Isn’t this supposed to cover such occasions as that and restart the server.
I only have a Pi-Zero so far so have never tested the effect with the normal Electron setup just Chromium standalone kiosk style.
So I don’t actually no if or what the mechanism to restart the browser (Electron) is.
If it doesn’t refresh via MMM-WatchDog you can always use xdotools to send keys to an Xwindow and all you need to do is a ‘ctrl+F5’ which is a refresh and drops the cache so all is effectively loaded as new.sudo apt-get install xdotool
Then with ~/MagicMirror/run-start.sh add a line and nano xdotool.sh and chmod a+x xdotool.sh
if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty export DISPLAY=:0 # Set by default display fi sh xdotool.sh & electron js/electron.js $1
With xdotool.sh being something like this
export DISPLAY=:0 export XAUTHORITY=~/.Xauthority sleep 10 xdotool search --onlyvisible --class "chromium" key ctrl+F5 -v 2>&1 | logger &
Dunno what the Electron class is but really its just Chromium in a wrapper so expecting that actually that will work.
If not you will just have to do a bit of testing to find the class or PID of electron http://manpages.ubuntu.com/manpages/trusty/man1/xdotool.1.html -
Replied again cursed by that akismi bot troll thing.
PS still setting it up but just monitor your logs.
Create a shell script with something like
tail -fn0 logfile | \ while read line ; do echo "$line" | grep "pattern" if [ $? = 0 ] then ... do something ... fi done
Maybe with a --retry to the tail command, or use -F instead of -f
Tack it onto your electron log and do the above xdotool.