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.

    Autostarts but doesn't run, will run on restart

    Scheduled Pinned Locked Moved Solved Troubleshooting
    47 Posts 3 Posters 15.0k Views 3 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.
    • E Offline
      ember1205 @sdetweil
      last edited by

      @sdetweil

      Here’s a portion of the log when doing a stop and a start (without reboot):

      0|mm       | + false=false
      0|mm       | ++ grep -v '^[[:blank:]]*//' config/config.js
      0|mm       | ++ grep -i serveronly:
      0|mm       | ++ awk -F: '{print tolower($2)}'
      0|mm       | ++ sed -e 's/^[[:space:]]*//'
      0|mm       | ++ tr -d ',"'\''\r'
      0|mm       | + serveronly=local
      0|mm       | + serveronly=local
      0|mm       | ++ pgrep Xorg
      0|mm       | + xorg=755
      0|mm       | + '[' 755. == . ']'
      0|mm       | ++ uname
      0|mm       | + mac=Linux
      0|mm       | + '[' local. '!=' false. -o armv7l == armv6l ']'
      0|mm       | + '[' local. == true. ']'
      0|mm       | + '[' 755. == . -a Linux '!=' Darwin ']'
      0|mm       | + exec
      0|mm       | + read line
      0|mm       | ++ node serveronly
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:14:59.203]' '[LOG]' Starting MagicMirror: v2.13.0
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:14:59.220]' '[LOG]' Loading config ...
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:14:59.231]' '[LOG]' Loading module helpers ...
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:14:59.936]' '[LOG]' Initializing new module helper ...
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:14:59.938]' '[LOG]' Module helper loaded: MMM-ImagesPhotos
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:14:59.943]' '[LOG]' No helper found for module: alert.
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.042]' '[LOG]' Initializing new module helper ...
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.050]' '[LOG]' Module helper loaded: updatenotification
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.059]' '[LOG]' No helper found for module: clock.
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.274]' '[LOG]' Initializing new module helper ...
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.278]' '[LOG]' Module helper loaded: calendar
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.280]' '[LOG]' No helper found for module: currentweather.
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.282]' '[LOG]' No helper found for module: weatherforecast.
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.284]' '[LOG]' All module helpers loaded.
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.471]' '[LOG]' Starting server on port 8080 ...
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.496]' '[LOG]' Server started ...
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.498]' '[LOG]' Connecting socket for: MMM-ImagesPhotos
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.500]' '[LOG]' Starting node helper for: MMM-ImagesPhotos
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.502]' '[LOG]' Connecting socket for: updatenotification
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.504]' '[LOG]' Connecting socket for: calendar
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.505]' '[LOG]' Starting node helper for: calendar
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.506]' '[LOG]' Sockets connected '&' modules started ...
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo '[2022-05-10' '15:15:00.507]' '[LOG]'
      0|mm       | + read line
      0|mm       | + case "$line" in
      0|mm       | + echo Ready to 'go!' Please point your browser to: http://0.0.0.0:8080
      0|mm       | + break
      0|mm       | ++ echo Ready to 'go!' Please point your browser to: http://0.0.0.0:8080
      0|mm       | ++ awk -F: '{print $4}'
      0|mm       | + port=8080
      0|mm       | + echo 'Starting chromium browser now, have patience, it takes a minute'
      0|mm       | + '[' Linux '!=' Darwin ']'
      0|mm       | + tee
      0|mm       | ++ which chromium-browser
      0|mm       | + '[' /usr/bin/chromium-browser '!=' '' ']'
      0|mm       | + chromium-browser -noerrdialogs -kiosk -start_maximized --disable-infobars --app=http://localhost:8080 --ignore-certificate-errors-spki-list --ignore-ssl-errors --ignore-certificate-errors
      
      
      1 Reply Last reply Reply Quote 0
      • E Offline
        ember1205 @sdetweil
        last edited by

        @sdetweil

        I’m seeing a discrepancy where on boot it’s collecting xorg= blank versus xorg=755 on a stop/start after boot.

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @ember1205
          last edited by

          @ember1205 yes… I see that too…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          E 1 Reply Last reply Reply Quote 0
          • E Offline
            ember1205 @sdetweil
            last edited by

            @sdetweil

            It almost seems like the X desktop isn’t fully initialized when the pgrep command executes and it isn’t collecting info on the process as a result. The restart NEVER happens until X is fully initialized which means that it -can- collect info on the process from a restart or stop/start.

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @ember1205
              last edited by

              @ember1205 yes. I am looking for a resolution…

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              E 1 Reply Last reply Reply Quote 0
              • E Offline
                ember1205 @sdetweil
                last edited by

                @sdetweil

                I just edited the run-start.sh script and inserted a ten second sleep before the pgrep command. It’s a bit “extreme”, but should hopefully demonstrate if that’s the issue.

                WIthout the sleep, not detecting X simply moves on to a different test instead of trying again at least once before moving on.

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @ember1205
                  last edited by

                  @ember1205 yes, adding a sleep would ‘fix’ it

                  if only we knew how LONG to sleep… working on it…

                  if X is not running then we just launch serveronly and don’t look at its output

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @sdetweil
                    last edited by

                    @sdetweil try 1 second… sleep 1

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    E 1 Reply Last reply Reply Quote 0
                    • E Offline
                      ember1205 @sdetweil
                      last edited by

                      @sdetweil

                      Sleep 10 allows the browser to correctly launch. I will drop to 1 second and validate that it will work or not (if not, I will tweak and tune).

                      Even with the sleep function ensuring that it allows X to finish initializing, chromium does not start correctly unless I wipe the ~/.config/chromium directory when I shut down.

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @ember1205
                        last edited by

                        @ember1205 people are constantly fiddling with stuff, you never know what you’re gonna get anymore.

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        E 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 3 / 5
                        • First post
                          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