• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MagicMirror screen goes black

Scheduled Pinned Locked Moved Unsolved Troubleshooting
27 Posts 8 Posters 8.0k Views 7 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    j.e.f.f Project Sponsor Module Developer @DavyC
    last edited by Feb 16, 2019, 9:37 AM

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

    1 Reply Last reply Reply Quote 0
    • H Offline
      Hallonpaj
      last edited by Feb 16, 2019, 5:43 PM

      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
      
      
      B 1 Reply Last reply Feb 17, 2019, 2:01 PM Reply Quote 0
      • B Offline
        bhepler Module Developer @Hallonpaj
        last edited by Feb 17, 2019, 2:01 PM

        @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

        \n

        The server encountered a temporary error and could not complete your request.

        Please try again in 30 seconds.

        \n

        \n\n”’,

        H S 2 Replies Last reply Feb 18, 2019, 10:01 PM Reply Quote 0
        • H Offline
          Hallonpaj @bhepler
          last edited by Feb 18, 2019, 10:01 PM

          @bhepler Alright! Thanks for answering :)

          1 Reply Last reply Reply Quote 0
          • S Away
            sdetweil @bhepler
            last edited by Feb 19, 2019, 10:52 AM

            @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

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • D Offline
              DavyC
              last edited by Feb 20, 2019, 8:01 AM

              Will try to do that soon. I do not have a lot of time to test, so there will be some delay :-)

              C 1 Reply Last reply Feb 26, 2019, 6:34 PM Reply Quote 0
              • C Offline
                Cr4z33 @DavyC
                last edited by Feb 26, 2019, 6:34 PM

                @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: )

                1 Reply Last reply Reply Quote 0
                • S Offline
                  stuartiannaylor
                  last edited by stuartiannaylor Feb 26, 2019, 7:41 PM Feb 26, 2019, 7:35 PM

                  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

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    stuartiannaylor
                    last edited by Feb 26, 2019, 10:49 PM

                    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.

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      stuartiannaylor
                      last edited by stuartiannaylor Feb 27, 2019, 7:12 PM Feb 27, 2019, 7:09 PM

                      I gave you some bum steers on export XAUTHORITY=~/.Xauthority but prob was when I was using lightdm but for it to work omit that line.

                      I have 2 monitors running well 1 really as the Chromium one isn’t really doing anything as all is working fine.

                      xdotool.sh ended up just being

                      if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty
                      	export DISPLAY=:0 # Set by default display
                      fi
                      xdotool search --onlyvisible --class "chromium" key ctrl+F5  -v 2>&1 | logger &
                      

                      chrome-log.sh is just

                      #Grep is a bit confusing as \| ie OR not AND so you get the following of Or + inline there is the other string
                      #grep -q '8080\|ERROR' would return true if either exist (OR)
                      ( tail -f -n0 ~/.config/chromium/chrome_debug.log & ) | grep -q '8080.*ERROR\|ERROR.*8080'
                      sh xdotool.sh
                      

                      Main one for me is the PM2 one that waits for MagicMirror to say all is finished and point your browser

                      ( tail -f -n0 ~/.pm2/logs/MagicMirror-out.log & ) | grep -q 'Ready to go! Please point your browser to:'
                      sh xdotool.sh
                      

                      Better explanation can be found on https://github.com/StuartIanNaylor/MagicMirror-Install-Guide-Raspberry-0-to-3/tree/master/Magic Monitor

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        6/27
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy