MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

Black screen (only with cursor visible) when waking mirror with MMM-PIR-Sensor after long sleep periods



  • I noticed that after long sleep cycles (mostly overnight), the monitor turns on with detected movement (PIR sensor), but MagicMirror itself is just a black screen with my mouse cursor. I have to restart MagicMirror with alt + f4 to load properly after the long sleep. Has anyone had a problem like this? The mirror detects the motion just fine, but I lose everything on the screen when it awakes. Thanks!

    https://i.imgur.com/pRrLsnw.jpg



  • @Matthew open the developers window ctrl-shift-i and select the console tab and scroll up to see any errors.

    black screen usually means some code running in the browser died



  • @sdetweil next time I get the black screen I’ll take a look!



  • @sdetweil It says that devTools was disconnected from the page. Once page is reloaded, DevTools will automatically reconnect



  • @Matthew hmm. let me think about another debug approach.


  • Module Developer

    @sdetweil I remember that I have some problem with an npm library with it (before I start to code)
    I don’t remember how I solve it

    After you can try my pir module if you want



  • @Matthew install this module
    https://github.com/sdetweil/MMM-Logging

    note that this is a modified version of this module, written by someone else… but I needed to do similar debugging a while back

    make its module entry in config.js the top of the list, like this

    modules: [
            {
                module: 'MMM-Logging',
                config: {
                           echoRemote:false,
                }
            },
    // other modules
        ]
    

    let everything else default

    this will collect all the browser logging and console logging together with timestamps…

    then start mm like this

    cd ~/MagicMirror
    npm start >somefile 2>&1
    
    

    or use pm2
    (all the logging info will be saved in the pm2 logs)



  • @sdetweil Thank you! I got the error again today, and this is what the logs said.

    magicmirror@2.12.0 start /home/pi/MagicMirror
    DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js

    [2020-08-15 17:22:12.919] [LOG] Starting MagicMirror: v2.12.0
    [2020-08-15 17:22:12.936] [LOG] Loading config …
    [2020-08-15 17:22:12.946] [LOG] Loading module helpers …
    [2020-08-15 17:22:13.105] [LOG] Initializing new module helper …
    [2020-08-15 17:22:13.108] [LOG] Module helper loaded: MMM-Logging
    [2020-08-15 17:22:13.110] [LOG] No helper found for module: alert.
    [2020-08-15 17:22:13.112] [LOG] No helper found for module: clock.
    [2020-08-15 17:22:13.113] [LOG] No helper found for module: currentweather.
    [2020-08-15 17:22:13.113] [LOG] No helper found for module: weatherforecast.
    [2020-08-15 17:22:13.918] [LOG] Initializing new module helper …
    [2020-08-15 17:22:13.919] [LOG] Module helper loaded: newsfeed
    [2020-08-15 17:22:13.925] [LOG] Initializing new module helper …
    [2020-08-15 17:22:13.926] [LOG] Module helper loaded: MMM-Wallpaper
    [2020-08-15 17:22:13.975] [LOG] Initializing new module helper …
    [2020-08-15 17:22:13.976] [LOG] Module helper loaded: MMM-MyWastePickup
    [2020-08-15 17:22:13.976] [LOG] No helper found for module: calendar_monthly.
    [2020-08-15 17:22:14.046] [LOG] Initializing new module helper …
    [2020-08-15 17:22:14.047] [LOG] Module helper loaded: MMM-MyCalendar
    [2020-08-15 17:22:14.098] [LOG] Initializing new module helper …
    [2020-08-15 17:22:14.099] [LOG] Module helper loaded: MMM-PIR-Sensor
    [2020-08-15 17:22:14.100] [LOG] All module helpers loaded.
    [2020-08-15 17:22:14.394] [LOG] Starting server on port 8080 …
    [2020-08-15 17:22:14.420] [LOG] Server started …
    [2020-08-15 17:22:14.422] [LOG] Connecting socket for: MMM-Logging
    [2020-08-15 17:22:14.433] [LOG] 2020-08-15T17:22:14 Module helper started for MMM-Logging (/home/pi/MagicMirror/modules/MMM-Logging/node_helper.js:19 Class.start)
    [2020-08-15 17:22:14.435] [LOG] Connecting socket for: newsfeed
    [2020-08-15 17:22:14.436] [LOG] Starting node helper for: newsfeed
    [2020-08-15 17:22:14.438] [LOG] Connecting socket for: MMM-Wallpaper
    [2020-08-15 17:22:14.441] [LOG] 2020-08-15T17:22:14 Starting node helper for: MMM-Wallpaper (/home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js:33 Class.start)
    [2020-08-15 17:22:14.447] [LOG] Connecting socket for: MMM-MyWastePickup
    [2020-08-15 17:22:14.449] [LOG] 2020-08-15T17:22:14 Starting node_helper for module: MMM-MyWastePickup (/home/pi/MagicMirror/modules/MMM-MyWastePickup/node_helper.js:10 Class.start)
    [2020-08-15 17:22:14.450] [LOG] Connecting socket for: MMM-MyCalendar
    [2020-08-15 17:22:14.452] [LOG] 2020-08-15T17:22:14 Starting node helper for: MMM-MyCalendar (/home/pi/MagicMirror/modules/MMM-MyCalendar/node_helper.js:19 Class.start)
    [2020-08-15 17:22:14.453] [LOG] Connecting socket for: MMM-PIR-Sensor
    [2020-08-15 17:22:14.453] [LOG] Sockets connected & modules started …
    Fontconfig warning: “/etc/fonts/fonts.conf”, line 100: unknown element “blank”
    [2020-08-15 17:22:14.665] [ERROR] Whoops! There was an uncaught exception…
    [2020-08-15 17:22:14.668] [ERROR] Error: listen EADDRINUSE: address already in use 127.0.0.1:8080
    at Server.setupListenHandle [as _listen2] (net.js:1226:14)
    at listenInCluster (net.js:1274:12)
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1413:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:65:10) {
    code: ‘EADDRINUSE’,
    errno: ‘EADDRINUSE’,
    syscall: ‘listen’,
    address: ‘127.0.0.1’,
    port: 8080
    }
    [2020-08-15 17:22:14.682] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
    [2020-08-15 17:22:14.683] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
    [2020-08-15 17:22:14.717] [LOG] Launching application.
    ATTENTION: default value of option force_s3tc_enable overridden by environment.
    [2020-08-15 17:22:43.588] [LOG] Shutting down server…



  • @Matthew >[2020-08-15 17:22:14.668] [ERROR] Error: listen EADDRINUSE: address already in use 127.0.0.1:8080
    that happened on the 15th within 2 seconds of starting…

    is that the right log?

    that says something is already running … do you normally use pm2 to launch MM?

    do pm2 status



  • This post is deleted!

Log in to reply