Nothing showing but app is running



  • Hi,

    I have just installed MagicMirror with all the guides. Also installed PM2 and fixed the scrips. Anyway. When I am trying to start MagicMirror nothing happens. It says it is running but nothing is showing on the screen. The only thing that happens is that the CPU goes from 0-3% CPU load to 25%. So I guess the app is actually running but not showing anything.

    What could be the cause? I have tried both my 7" LCD-screen and my TV through HDMI.

    Best regards
    Fiskaren



  • Can we see the content of your mm.sh script?
    What is the response when you start the mm.sh script ? (pm2 start mm.sh).

    Are you connecting using VNC?



  • Well, I did a reinstall and now the mirror starts when executing command. It does NOT start on boot tho, so main problem gone but we got a new one…

    I guess I use VNC? SSH on Putty!

    pm2 start mm.sh response:

    //[PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2
    [PM2] PM2 Successfully daemonized
    [PM2] Starting /home/pi/mm.sh in fork_mode (1 instance)
    [PM2] Done.
    ┌──────┬──────┬────────┬───┬─────┬──────────┐
    │ Name │ mode │ status │ ↺ │ cpu │ memory   │
    ├──────┼──────┼────────┼───┼─────┼──────────┤
    │ mm   │ fork │ online │ 0 │ 0%  │ 2.3 MB   │
    └──────┴──────┴────────┴───┴─────┴──────────┘
     Use `pm2 show ` to get more details about an app
    
    

    pm2 logs mm

    [TAILING] Tailing last 15 lines for [mm] process (change the value with --lines option)
    /home/pi/.pm2/logs/mm-error-0.log last 15 lines:
    0|mm       | [5113:0308/120902.949357:FATAL:bus.cc(1197)] D-Bus connection was disconnected. Aborting.
    0|mm       | #0 0x0000011cf88c 
    0|mm       | #1 0x0000011bbc1a 
    0|mm       | #2 0x000001e9a6b6 
    0|mm       |
    
    /home/pi/.pm2/logs/mm-out-0.log last 15 lines:
    0|mm       | No helper found for module: currentweather.
    0|mm       | No helper found for module: weatherforecast.
    0|mm       | Initializing new module helper ...
    0|mm       | All module helpers loaded.
    0|mm       | Starting server op port 8080 ...
    0|mm       | Server started ...
    0|mm       | Connecting socket for: updatenotification
    0|mm       | Connecting socket for: calendar
    0|mm       | Starting node helper for: calendar
    0|mm       | Connecting socket for: newsfeed
    0|mm       | Starting module: newsfeed
    0|mm       | Sockets connected & modules started ...
    0|mm       | Launching application.
    0|mm       | Create new calendar fetcher for url: http://www.calendarlabs.com/templates/ical/US-Holidays.ics - Interval: 300000
    0|mm       | Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
    
    [STREAMING] Now streaming realtime logs for [mm] process
    
    
    

    pm2 logs mm --lines 50

    [TAILING] Tailing last 50 lines for [mm] process (change the value with --lines option)
    /home/pi/.pm2/logs/mm-error-0.log last 50 lines:
    0|mm       | [5113:0308/120902.949357:FATAL:bus.cc(1197)] D-Bus connection was disconnected. Aborting.
    0|mm       | #0 0x0000011cf88c 
    0|mm       | #1 0x0000011bbc1a 
    0|mm       | #2 0x000001e9a6b6 
    0|mm       |
    
    /home/pi/.pm2/logs/mm-out-0.log last 50 lines:
    0|mm       | Starting MagicMirror: v2.1.0
    0|mm       | Loading config ...
    0|mm       | Loading module helpers ...
    0|mm       | No helper found for module: alert.
    0|mm       | Initializing new module helper ...
    0|mm       | No helper found for module: clock.
    0|mm       | Initializing new module helper ...
    0|mm       | No helper found for module: compliments.
    0|mm       | No helper found for module: currentweather.
    0|mm       | No helper found for module: weatherforecast.
    0|mm       | Initializing new module helper ...
    0|mm       | All module helpers loaded.
    0|mm       | Starting server op port 8080 ...
    0|mm       | Server started ...
    0|mm       | Connecting socket for: updatenotification
    0|mm       | Connecting socket for: calendar
    0|mm       | Starting node helper for: calendar
    0|mm       | Connecting socket for: newsfeed
    0|mm       | Starting module: newsfeed
    0|mm       | Sockets connected & modules started ...
    0|mm       | Launching application.
    0|mm       | Create new calendar fetcher for url: http://www.calendarlabs.com/templates/ical/US-Holidays.ics - Interval: 300000
    0|mm       | Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
    0|mm       |
    0|mm       | > magicmirror@2.1.0 start /home/pi/MagicMirror
    0|mm       | > electron js/electron.js
    0|mm       |
    0|mm       | Starting MagicMirror: v2.1.0
    0|mm       | Loading config ...
    0|mm       | Loading module helpers ...
    0|mm       | No helper found for module: alert.
    0|mm       | Initializing new module helper ...
    0|mm       | No helper found for module: clock.
    0|mm       | Initializing new module helper ...
    0|mm       | No helper found for module: compliments.
    0|mm       | No helper found for module: currentweather.
    0|mm       | No helper found for module: weatherforecast.
    0|mm       | Initializing new module helper ...
    0|mm       | All module helpers loaded.
    0|mm       | Starting server op port 8080 ...
    0|mm       | Server started ...
    0|mm       | Connecting socket for: updatenotification
    0|mm       | Connecting socket for: calendar
    0|mm       | Starting node helper for: calendar
    0|mm       | Connecting socket for: newsfeed
    0|mm       | Starting module: newsfeed
    0|mm       | Sockets connected & modules started ...
    0|mm       | Launching application.
    0|mm       | Create new calendar fetcher for url: http://www.calendarlabs.com/templates/ical/US-Holidays.ics - Interval: 300000
    0|mm       | Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
    
    [STREAMING] Now streaming realtime logs for [mm] process
    
    
    


  • And I have of couse done the autostart part of the installation. Here is the code for that, if that could be intresting:

    pi@raspberrypi:~ $ pm2 startup
    [PM2] Init System found: systemd
    [PM2] You have to run this command as root. Execute the following command:
    sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
    pi@raspberrypi:~ $ sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
    [PM2] Init System found: systemd
    Platform systemd
    Template
    [Unit]
    Description=PM2 process manager
    Documentation=https://pm2.keymetrics.io/
    After=network.target
    
    [Service]
    Type=forking
    User=pi
    LimitNOFILE=infinity
    LimitNPROC=infinity
    LimitCORE=infinity
    TimeoutStartSec=8
    Environment=PATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
    Environment=PM2_HOME=/home/pi/.pm2
    PIDFile=/home/pi/.pm2/pm2.pid
    
    ExecStart=/usr/lib/node_modules/pm2/bin/pm2 resurrect
    ExecReload=/usr/lib/node_modules/pm2/bin/pm2 reload all
    ExecStop=/usr/lib/node_modules/pm2/bin/pm2 kill
    
    [Install]
    WantedBy=multi-user.target
    
    Target path
    /etc/systemd/system/pm2-pi.service
    Command list
    [ 'chmod +x /etc/systemd/system/pm2-pi.service',
      'systemctl enable pm2-pi',
      'systemctl start pm2-pi',
      'systemctl daemon-reload',
      'systemctl status pm2-pi' ]
    [PM2] Writing init configuration in /etc/systemd/system/pm2-pi.service
    [PM2] Making script booting at startup...
    >>> Executing chmod +x /etc/systemd/system/pm2-pi.service
    [DONE]
    >>> Executing systemctl enable pm2-pi
    [DONE]
    >>> Executing systemctl start pm2-pi
    [DONE]
    >>> Executing systemctl daemon-reload
    [DONE]
    >>> Executing systemctl status pm2-pi
    ● pm2-pi.service - PM2 process manager
       Loaded: loaded (/etc/systemd/system/pm2-pi.service; enabled)
       Active: active (running) since Wed 2017-03-08 12:21:50 UTC; 176ms ago
         Docs: https://pm2.keymetrics.io/
     Main PID: 1011 (PM2 v2.4.2: God)
       CGroup: /system.slice/pm2-pi.service
               ‣ 1011 PM2 v2.4.2: God Daemon (/home/pi/.pm2)
    
    Mar 08 12:21:50 raspberrypi pm2[1239]: [PM2] Resurrecting
    Mar 08 12:21:50 raspberrypi pm2[1239]: [PM2] Restoring processes located in /home/pi/.pm2/dump.pm2
    Mar 08 12:21:50 raspberrypi pm2[1239]: ┌──────────┬────┬──────┬──────┬────────┬─────────┬────────┬─────┬──────────┬──────────┐
    Mar 08 12:21:50 raspberrypi pm2[1239]: │ App name │ id │ mode │ pid  │ status │ restart │ uptime │ cpu │ mem      │ watching │
    Mar 08 12:21:50 raspberrypi pm2[1239]: ├──────────┼────┼──────┼──────┼────────┼─────────┼────────┼─────┼──────────┼──────────┤
    Mar 08 12:21:50 raspberrypi pm2[1239]: │ mm       │ 0  │ fork │ 1021 │ online │ 0       │ 7m     │ 0%  │ 2.3 MB   │ disabled │
    Mar 08 12:21:50 raspberrypi pm2[1239]: └──────────┴────┴──────┴──────┴────────┴─────────┴────────┴─────┴──────────┴──────────┘
    Mar 08 12:21:50 raspberrypi pm2[1239]: Use `pm2 show ` to get more details about an app
    Mar 08 12:21:50 raspberrypi systemd[1]: Started PM2 process manager.
    [DONE]
    +---------------------------------------+
    [PM2] Freeze a process list on reboot via:
    $ pm2 save
    
    [PM2] Remove init script via:
    $ pm2 unstartup systemd
    
    


  • Have you saved the current state of the PM2?

    Run

    pm2 start mm.sh
    pm2 save
    sudo reboot
    


  • @mortenbirkelund Actually I have. Still doesn’t work. The only way I made it finally work was to add “@pm2 start mm.sh” in "/home/pi/.config/lxsession/LXDE/autostart "

    I guess that is a OK solution?



  • @fiskaren Then i dont know what could be wrong. Perhaps someone else will see this post and can point you in the right direction.
    Your solution will start MM each time the computer is started, where pm2 will only start MM, if it was running when the reboot was initiated. But if it works for you.



  • updated today and now I have a similar issue. App is running but the screen is black. Ran apt-get update & apt-get upgrade in the hopes it would fix itself, but nope :)

    pi@jarvis:~ $ pm2 log
    [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
    /home/pi/.pm2/pm2.log last 15 lines:
    PM2        | 2017-04-02 18:19:27: PM2 PID file         : /home/pi/.pm2/pm2.pid
    PM2        | 2017-04-02 18:19:27: RPC socket file      : /home/pi/.pm2/rpc.sock
    PM2        | 2017-04-02 18:19:27: BUS socket file      : /home/pi/.pm2/pub.sock
    PM2        | 2017-04-02 18:19:27: Application log path : /home/pi/.pm2/logs
    PM2        | 2017-04-02 18:19:27: Process dump file    : /home/pi/.pm2/dump.pm2
    PM2        | 2017-04-02 18:19:27: Concurrent actions   : 2
    PM2        | 2017-04-02 18:19:27: SIGTERM timeout      : 1600
    PM2        | 2017-04-02 18:19:27: ===============================================================================
    PM2        | 2017-04-02 18:19:27: Starting execution sequence in -fork mode- for app name:mm id:0
    PM2        | 2017-04-02 18:19:27: App name:mm id:0 online
    PM2        | 2017-04-02 18:21:20: Stopping app:mm id:0
    PM2        | 2017-04-02 18:21:20: App [mm] with id [0] and pid [1474], exited with code [0] via signal [SIGINT]
    PM2        | 2017-04-02 18:21:20: pid=1474 msg=process killed
    PM2        | 2017-04-02 18:26:49: Starting execution sequence in -fork mode- for app name:mm id:0
    PM2        | 2017-04-02 18:26:49: App name:mm id:0 online
    
    /home/pi/.pm2/logs/mm-error-0.log last 15 lines:
    0|mm       | 
    0|mm       | 
    0|mm       | error: cannot open .git/FETCH_HEAD: Permission denied
    0|mm       | 
    0|mm       | 
    0|mm       | [29012:0402/175739.310033:FATAL:bus.cc(1197)] D-Bus connection was disconnected. Aborting.
    0|mm       | #0 0x0000011cf88c 
    0|mm       | #1 0x0000011bbc1a 
    0|mm       | #2 0x000001e9a6b6 
    0|mm       | 
    0|mm       | [1665:0402/181857.627309:FATAL:bus.cc(1197)] D-Bus connection was disconnected. Aborting.
    0|mm       | #0 0x0000011cf88c 
    0|mm       | #1 0x0000011bbc1a 
    0|mm       | #2 0x000001e9a6b6 
    0|mm       | 
    
    /home/pi/.pm2/logs/mm-out-0.log last 15 lines:
    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: airquality.
    0|mm       | No helper found for module: weatherforecast.
    0|mm       | No helper found for module: MMM-Hue.
    0|mm       | All module helpers loaded.
    0|mm       | Starting server on port 8666 ... 
    0|mm       | Starting server op port 8666 ... 
    0|mm       | Server started ...
    0|mm       | Connecting socket for: updatenotification
    0|mm       | Connecting socket for: calendar
    0|mm       | Starting node helper for: calendar
    0|mm       | Sockets connected & modules started ...
    0|mm       | Launching application.
    
    [STREAMING] Now streaming realtime logs for [all] processes
    
    pi@jarvis:~ $ tail -f /home/pi/.pm2/logs/mm-error-0.log
    [29012:0402/175739.310033:FATAL:bus.cc(1197)] D-Bus connection was disconnected. Aborting.
    #0 0x0000011cf88c 
    #1 0x0000011bbc1a 
    #2 0x000001e9a6b6 
    
    [1665:0402/181857.627309:FATAL:bus.cc(1197)] D-Bus connection was disconnected. Aborting.
    #0 0x0000011cf88c 
    #1 0x0000011bbc1a 
    #2 0x000001e9a6b6 
    


  • @dikkedimi said in Nothing showing but app is running:

    updated today and now I have a similar issue. App is running but the screen is black. Ran apt-get update & apt-get upgrade in the hopes it would fix itself, but nope :)

    pi@jarvis:~ $ pm2 log
    [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
    /home/pi/.pm2/pm2.log last 15 lines:
    PM2        | 2017-04-02 18:19:27: PM2 PID file         : /home/pi/.pm2/pm2.pid
    PM2        | 2017-04-02 18:19:27: RPC socket file      : /home/pi/.pm2/rpc.sock
    PM2        | 2017-04-02 18:19:27: BUS socket file      : /home/pi/.pm2/pub.sock
    PM2        | 2017-04-02 18:19:27: Application log path : /home/pi/.pm2/logs
    PM2        | 2017-04-02 18:19:27: Process dump file    : /home/pi/.pm2/dump.pm2
    PM2        | 2017-04-02 18:19:27: Concurrent actions   : 2
    PM2        | 2017-04-02 18:19:27: SIGTERM timeout      : 1600
    PM2        | 2017-04-02 18:19:27: ===============================================================================
    PM2        | 2017-04-02 18:19:27: Starting execution sequence in -fork mode- for app name:mm id:0
    PM2        | 2017-04-02 18:19:27: App name:mm id:0 online
    PM2        | 2017-04-02 18:21:20: Stopping app:mm id:0
    PM2        | 2017-04-02 18:21:20: App [mm] with id [0] and pid [1474], exited with code [0] via signal [SIGINT]
    PM2        | 2017-04-02 18:21:20: pid=1474 msg=process killed
    PM2        | 2017-04-02 18:26:49: Starting execution sequence in -fork mode- for app name:mm id:0
    PM2        | 2017-04-02 18:26:49: App name:mm id:0 online
    
    /home/pi/.pm2/logs/mm-error-0.log last 15 lines:
    0|mm       | 
    0|mm       | 
    0|mm       | error: cannot open .git/FETCH_HEAD: Permission denied
    0|mm       | 
    0|mm       | 
    0|mm       | [29012:0402/175739.310033:FATAL:bus.cc(1197)] D-Bus connection was disconnected. Aborting.
    0|mm       | #0 0x0000011cf88c 
    0|mm       | #1 0x0000011bbc1a 
    0|mm       | #2 0x000001e9a6b6 
    0|mm       | 
    0|mm       | [1665:0402/181857.627309:FATAL:bus.cc(1197)] D-Bus connection was disconnected. Aborting.
    0|mm       | #0 0x0000011cf88c 
    0|mm       | #1 0x0000011bbc1a 
    0|mm       | #2 0x000001e9a6b6 
    0|mm       | 
    
    /home/pi/.pm2/logs/mm-out-0.log last 15 lines:
    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: airquality.
    0|mm       | No helper found for module: weatherforecast.
    0|mm       | No helper found for module: MMM-Hue.
    0|mm       | All module helpers loaded.
    0|mm       | Starting server on port 8666 ... 
    0|mm       | Starting server op port 8666 ... 
    0|mm       | Server started ...
    0|mm       | Connecting socket for: updatenotification
    0|mm       | Connecting socket for: calendar
    0|mm       | Starting node helper for: calendar
    0|mm       | Sockets connected & modules started ...
    0|mm       | Launching application.
    
    [STREAMING] Now streaming realtime logs for [all] processes
    
    pi@jarvis:~ $ tail -f /home/pi/.pm2/logs/mm-error-0.log
    [29012:0402/175739.310033:FATAL:bus.cc(1197)] D-Bus connection was disconnected. Aborting.
    #0 0x0000011cf88c 
    #1 0x0000011bbc1a 
    #2 0x000001e9a6b6 
    
    [1665:0402/181857.627309:FATAL:bus.cc(1197)] D-Bus connection was disconnected. Aborting.
    #0 0x0000011cf88c 
    #1 0x0000011bbc1a 
    #2 0x000001e9a6b6 
    

    I have the same problem as you. I run the server on a pi zero and the the display is on a pi3 on the same network. It loads fine without any erros on the pi zero but when I go to the website I only get a black screen.



  • @d3r @fiskaren having this issue for a school project right now. Did you two ever have any sucess fixing it?


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.