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

Issues after update - restoring?

Scheduled Pinned Locked Moved Solved Troubleshooting
13 Posts 2 Posters 2.3k Views 2 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.
  • N Offline
    nakulbende
    last edited by Jan 22, 2020, 3:57 PM

    Hello,

    I tried @sdetweil 's script to update my MagicMirror. Priopr to that, there were some slowdowns in using ssh, but vnc was always working perfectly. After the update, ssh brings up the login request, but nothing happens after that - no bash appears. Also, is fine, but very slow. If I start MagicMirror using npm start, it shuts off after a couple of hours. It is also not starting the magicmirror service on boot.

    My question is: can I just use @sdetweil 's installation script on a fresh raspberry pi install, copy my model folder and config.jss to restore my module installation and all…

    S 1 Reply Last reply Jan 22, 2020, 4:04 PM Reply Quote 0
    • S Offline
      sdetweil @nakulbende
      last edited by Jan 22, 2020, 4:04 PM

      @nakulbende can u show me the

      ~/MagicMirror/installers/upgrade.log

      the MM app upgrade should have no effect on ssh/vnc, as we are only updating in the MM folder and below

      as for copying over… yes, but, for each module that has a package.json file, you should
      erase the node_modules folder in the module folder and then npm install again

      It is also not starting the magicmirror service on boot.

      I would reun the pm2 part of install, using the separate script

      bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)"
      

      I would like to see the output of pm2 logs --lines=100 before running that script

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      N 1 Reply Last reply Jan 22, 2020, 4:08 PM Reply Quote 0
      • N Offline
        nakulbende
        last edited by Jan 22, 2020, 4:04 PM

        Here is the log from npm start:

        > magicmirror@2.10.1 start /home/pi/MagicMirror
        > ./run-start.sh
        
        [10:59:40.101] [LOG]    Starting MagicMirror: v2.10.1
        [10:59:40.117] [LOG]    Loading config ...
        [10:59:40.153] [LOG]    Loading module helpers ...
        [10:59:40.156] [LOG]    No helper found for module: alert.
        [10:59:40.329] [LOG]    Initializing new module helper ...
        [10:59:40.332] [LOG]    Module helper loaded: updatenotification
        [10:59:40.339] [LOG]    Initializing new module helper ...
        [10:59:40.340] [LOG]    Module helper loaded: MMM-BurnIn
        [10:59:40.353] [LOG]    Initializing new module helper ...
        [10:59:40.359] [LOG]    Module helper loaded: MMM-WatchDog
        [10:59:40.559] [LOG]    Initializing new module helper ...
        [10:59:40.561] [LOG]    Module helper loaded: MMM-Remote-Control
        [10:59:40.562] [LOG]    No helper found for module: compliments.
        [10:59:40.564] [LOG]    No helper found for module: clock.
        [10:59:40.565] [LOG]    No helper found for module: calendar_monthly.
        [10:59:41.778] [LOG]    Initializing new module helper ...
        [10:59:41.780] [LOG]    Module helper loaded: calendar
        [10:59:46.210] [LOG]    Initializing new module helper ...
        [10:59:46.211] [LOG]    Module helper loaded: MMM-Buller
        [10:59:47.302] [LOG]    Initializing new module helper ...
        [10:59:47.303] [LOG]    Module helper loaded: MMM-DarkSkyForecast
        [10:59:47.305] [LOG]    No helper found for module: MMM-DailyPokemon.
        [10:59:47.320] [LOG]    Initializing new module helper ...
        [10:59:47.322] [LOG]    Module helper loaded: MMM-fitbit
        [10:59:47.388] [LOG]    Initializing new module helper ...
        [10:59:47.389] [LOG]    Module helper loaded: MMM-GoogleFit
        [10:59:47.396] [LOG]    No helper found for module: MMM-MBTA.
        [10:59:47.398] [LOG]    No helper found for module: MMM-MBTA1.
        [10:59:48.306] [LOG]    Initializing new module helper ...
        [10:59:48.307] [LOG]    Module helper loaded: MMM-MyCommute
        [10:59:48.311] [LOG]    Initializing new module helper ...
        [10:59:48.313] [LOG]    Module helper loaded: DailyXKCD
        [10:59:48.314] [LOG]    No helper found for module: MMM-pihole-stats.
        [10:59:48.315] [LOG]    All module helpers loaded.
        [10:59:48.322] [LOG]    Starting server on port 8080 ... 
        [10:59:48.362] [LOG]    Server started ...
        [10:59:48.366] [LOG]    Connecting socket for: updatenotification
        [10:59:48.368] [LOG]    Connecting socket for: MMM-BurnIn
        [10:59:48.371] [LOG]    Connecting socket for: MMM-WatchDog
        [10:59:48.376] [LOG]    Starting module helper: MMM-WatchDog
        [10:59:48.378] [LOG]    Connecting socket for: MMM-Remote-Control
        [10:59:48.380] [LOG]    Starting node helper for: MMM-Remote-Control
        [10:59:48.444] [LOG]    Connecting socket for: calendar
        [10:59:48.446] [LOG]    Starting node helper for: calendar
        [10:59:48.448] [LOG]    Connecting socket for: MMM-Buller
        [10:59:48.450] [LOG]    Connecting socket for: MMM-DarkSkyForecast
        [10:59:48.451] [LOG]    ====================== Starting node_helper for module [MMM-DarkSkyForecast]
        [10:59:48.452] [LOG]    Connecting socket for: MMM-fitbit
        [10:59:48.453] [LOG]    Starting module helper: MMM-fitbit
        [10:59:48.455] [LOG]    Connecting socket for: MMM-GoogleFit
        [10:59:48.456] [LOG]    MMM-GoogleFit helper started...
        [10:59:48.459] [LOG]    Connecting socket for: MMM-MyCommute
        [10:59:48.461] [LOG]    ====================== Starting node_helper for module [MMM-MyCommute]
        [10:59:48.463] [LOG]    Connecting socket for: DailyXKCD
        [10:59:48.465] [LOG]    Starting node helper: DailyXKCD
        [10:59:48.466] [LOG]    Sockets connected & modules started ...
        [10:59:48.695] [LOG]    Launching application.
        [10:59:55.989] [LOG]    WatchDog started. Maximum timeout: 25s.
        [10:59:56.551] [LOG]    Create new calendar fetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 300000
        [10:59:56.748] [LOG]    Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/kiij30c31pmgimj2fhja5dejh0%40group.calendar.google.com/private-9db55d67edd0ff1ebecddbb28201bb01/basic.ics - Interval: 300000
        [10:59:56.939] [LOG]    Set credential request recieved.
        [10:59:56.945] [LOG]    { client_id: 'XXXXXX',
          client_secret: 'XXXXXXXX' }
        [10:59:56.968] [LOG]    Whoops! There was an uncaught exception...
        [10:59:56.969] [ERROR]  TypeError: PythonShell.run is not a function
            at Class.setCreds (/home/pi/MagicMirror/modules/MMM-fitbit/node_helper.js:32:15)
            at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-fitbit/node_helper.js:18:9)
            at Socket.<anonymous> (/home/pi/MagicMirror/js/node_helper.js:113:11)
            at Socket.emit (events.js:182:13)
            at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
            at process._tickCallback (internal/process/next_tick.js:61:11)
        [10:59:56.974] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
        [10:59:56.977] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
        [10:59:57.067] [LOG]    Initial run request recieved.
        [10:59:57.078] [LOG]    Running getData.py
        [10:59:57.092] [LOG]    Whoops! There was an uncaught exception...
        [10:59:57.097] [ERROR]  TypeError: PythonShell is not a constructor
            at Class.getData (/home/pi/MagicMirror/modules/MMM-fitbit/node_helper.js:43:25)
            at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-fitbit/node_helper.js:22:9)
            at Socket.<anonymous> (/home/pi/MagicMirror/js/node_helper.js:113:11)
            at Socket.emit (events.js:182:13)
            at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
            at process._tickCallback (internal/process/next_tick.js:61:11)
        [10:59:57.104] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
        [10:59:57.106] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
        [10:59:57.590] [LOG]    Notification: GET_COMIC Payload: [object Object]
        [10:59:59.415] [LOG]    Task lists:
        [10:59:59.421] [LOG]    To read (MDMxODA0MzYxMjU2NTQyODg2NDg6MDow)
        [10:59:59.423] [LOG]    Ideas (MDMxODA0MzYxMjU2NTQyODg2NDg6NDQ5MzE4MjI0NjMwNDQzNDow)
        [10:59:59.427] [LOG]    Life (MDMxODA0MzYxMjU2NTQyODg2NDg6MTE4NzY4MDk1NTow)
        [10:59:59.436] [LOG]    Random thoughts (MDMxODA0MzYxMjU2NTQyODg2NDg6NDkzOTQyODczOjA)
        [10:59:59.443] [LOG]    HomeToDo (dXA5MVM4bGpmTmJHZnZmVg)
        [11:01:10.537] [LOG]    Whoops! There was an uncaught exception...
        [11:01:10.539] [ERROR]  TypeError: Cannot read property 'startOnMonday' of undefined
            at Class.getStats (/home/pi/MagicMirror/modules/MMM-GoogleFit/node_helper.js:134:22)
            at Request._callback (/home/pi/MagicMirror/modules/MMM-GoogleFit/node_helper.js:98:14)
            at Request.self.callback (/home/pi/MagicMirror/node_modules/request/request.js:185:22)
            at Request.emit (events.js:182:13)
            at Request.<anonymous> (/home/pi/MagicMirror/node_modules/request/request.js:1161:10)
            at Request.emit (events.js:182:13)
            at IncomingMessage.<anonymous> (/home/pi/MagicMirror/node_modules/request/request.js:1083:12)
            at Object.onceWrapper (events.js:273:13)
            at IncomingMessage.emit (events.js:187:15)
            at endReadableNT (_stream_readable.js:1090:12)
        [11:01:10.544] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
        [11:01:10.545] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
        
        
        S 1 Reply Last reply Jan 22, 2020, 4:06 PM Reply Quote 0
        • S Offline
          sdetweil @nakulbende
          last edited by Jan 22, 2020, 4:06 PM

          @nakulbende said in Issues after update - restoring?:

          [10:59:56.969] [ERROR] TypeError: PythonShell.run is not a function
          at Class.setCreds (/home/pi/MagicMirror/modules/MMM-fitbit/node_helper.js:32:15)

          some error with the fitbit module…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • N Offline
            nakulbende @sdetweil
            last edited by Jan 22, 2020, 4:08 PM

            
            Upgrade started - Sun Jan 19 15:52:57 EST 2020
            system is Linux magicmirror 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux
            the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
            user requested to apply changes
            doing test run = false
            
            saving custom.css
            remote name = origin
            upgrading from version 2.9.0 to 2.10.1
            fetching latest revisions
            git fetch rc=0
            current branch = master
            On branch master
            Your branch is behind 'origin/master' by 2836 commits, and can be fast-forwarded.
              (use "git pull" to update your local branch)
            
            Changes to be committed:
              (use "git reset HEAD <file>..." to unstage)
            
            	deleted:    css/custom.css
            
            Changes not staged for commit:
              (use "git add <file>..." to update what will be committed)
              (use "git checkout -- <file>..." to discard changes in working directory)
            
            	modified:   package.json
            
            Untracked files:
              (use "git add <file>..." to include in what will be committed)
            
            	0
            	core
            	css/save_custom.css
            
            there are 1 local files that are different than the master repo
            
               package.json
            
            save/restore files selection = y
            Saved working directory and index state WIP on master: 500147e Merge pull request #1776 from MichMich/develop
            test merge result rc='' , if empty, no conflicts
            executing merge, apply specified
            merge result rc= 0
             Updating 500147e..5bf90ae Fast-forward  .gitignore                                         
                6 -  .snyk                                              
               14 -  .travis.yml                                        
                8 +-  CHANGELOG.md                                       
               33 +-  README.md                                          
              210 +-  config/config.js.sample                            
                7 +-  css/custom.css                                     
               14 -  installers/dumpactivemodules.js                    
               15 +  installers/fixuppm2.sh                             
              183 +  installers/raspberry.sh                            
              560 ++-  installers/screensaveroff.sh                       
              101 +  installers/upgrade-script.sh                       
              361 ++  js/app.js                                          
                6 +  js/main.js                                         
               17 +-  .../node_helper/index.js => js/node_helper.js      
                2 +-  js/server.js                                       
                2 +-  modules/default/calendar/calendar.js               
                1 +  modules/default/calendar/calendarfetcher.js        
                7 +-  modules/default/calendar/debug.js                  
                4 +-  modules/default/compliments/compliments.js         
               39 +-  modules/default/weatherforecast/weatherforecast.js 
                4 +-  package-lock.json                                  
             4187 +++++++++++---------  package.json                                       
               17 +-  run-start.sh                                       
               64 +-  tests/e2e/modules/weather_spec.js                  
              138 +-  tests/e2e/vendor_spec.js                           
                5 +-  untrack-css.sh                                     
                2 +-  vendor/package-lock.json                           
                2 +-  28 files changed, 3652 insertions(+), 2357 deletions(-)  delete mode 100644 .snyk  delete mode 100644 css/custom.css  
            create mode 100644 installers/dumpactivemodules.js  
            create mode 100755 installers/fixuppm2.sh  
            mode change 100644 => 100755 installers/raspberry.sh  
            create mode 100755 installers/screensaveroff.sh  
            create mode 100755 installers/upgrade-script.sh  rename modules/node_modules/node_helper/index.js => js/node_helper.js (98%)  
            mode change 100644 => 100755 run-start.sh
            processor architecture is armv7l
            updating MagicMirror runtime, please wait
            
            > console-stamp@0.2.9 postinstall /home/pi/MagicMirror/node_modules/console-stamp
            > node ./msg.js
            
            Attention
                Console-stamp version 3.0.0 Release Candidate is out. Install by using the tag '@next'. NB: Breaking changes.
                For more details goto: https://www.npmjs.com/package/console-stamp/v/next
            
            
            > magicmirror@2.10.1 install /home/pi/MagicMirror
            > cd vendor && npm install
            
            npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents):
            npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
            
            audited 2191 packages in 12.474s
            
            1 package is looking for funding
              run `npm fund` for details
            
            found 0 vulnerabilities
            
            
            > magicmirror@2.10.1 postinstall /home/pi/MagicMirror
            > sh untrack-css.sh && sh installers/postinstall/postinstall.sh && npm run install-fonts
            
            MagicMirror installation successful!
            
            > magicmirror@2.10.1 install-fonts /home/pi/MagicMirror
            > cd fonts && npm install
            
            audited 1 package in 1.105s
            found 0 vulnerabilities
            
            added 6 packages from 12 contributors and audited 3684 packages in 55.242s
            
            14 packages are looking for funding
              run `npm fund` for details
            
            found 0 vulnerabilities
            
            npm install completed - Sun Jan 19 15:54:14 EST 2020 on base
            
            processing dependency changes for active modules with package.json files
            processing for module MMM-Buller please wait
            ----------------------------------
            npm WARN Invalid version: "1.0"
            npm WARN MMM-Buller No description
            npm WARN MMM-Buller No repository field.
            npm WARN MMM-Buller No README data
            npm WARN MMM-Buller No license field.
            
            up to date in 0.866s
            found 0 vulnerabilities
            
            processing complete for module MMM-Buller
            processing for module MMM-DarkSkyForecast please wait
            ----------------------------------
            audited 12091 packages in 15.608s
            found 1 low severity vulnerability
              run `npm audit fix` to fix them, or `npm audit` for details
            processing complete for module MMM-DarkSkyForecast
            processing for module MMM-DailyPokemon please wait
            ----------------------------------
            npm WARN deprecated time-grunt@2.0.0: Deprecated because Grunt is practically unmaintained. Move on to something better. This package will continue to work with Grunt v1, but it will not receive any updates.
            npm WARN notsup Unsupported engine for eslint@6.8.0: wanted: {"node":"^8.10.0 || ^10.13.0 || >=11.10.1"} (current: {"node":"9.11.2","npm":"6.13.4"})
            npm WARN notsup Not compatible with your version of node/npm: eslint@6.8.0
            npm WARN stylelint-config-standard@19.0.0 requires a peer of stylelint@>=10.1.0 but none is installed. You must install peer dependencies yourself.
            npm WARN grunt-stylelint@0.13.0 requires a peer of stylelint@^12.0.0 but none is installed. You must install peer dependencies yourself.
            npm WARN stylelint-config-recommended@3.0.0 requires a peer of stylelint@>=10.1.0 but none is installed. You must install peer dependencies yourself.
            npm WARN MMM-DailyPokemon@1.0.0 No repository field.
            
            added 225 packages from 138 contributors and audited 432 packages in 39.173s
            
            3 packages are looking for funding
              run `npm fund` for details
            
            found 0 vulnerabilities
            
            processing complete for module MMM-DailyPokemon
            processing for module MMM-Bring please wait
            ----------------------------------
            audited 6 packages in 1.008s
            found 0 vulnerabilities
            
            processing complete for module MMM-Bring
            processing for module MMM-MyCommute please wait
            ----------------------------------
            npm WARN grunt-stylelint@0.13.0 requires a peer of stylelint@^12.0.0 but none is installed. You must install peer dependencies yourself.
            npm WARN stylelint-config-recommended@3.0.0 requires a peer of stylelint@>=10.1.0 but none is installed. You must install peer dependencies yourself.
            npm WARN stylelint-config-standard@19.0.0 requires a peer of stylelint@>=10.1.0 but none is installed. You must install peer dependencies yourself.
            
            audited 3140 packages in 19.219s
            
            14 packages are looking for funding
              run `npm fund` for details
            
            found 3 vulnerabilities (1 low, 2 high)
              run `npm audit fix` to fix them, or `npm audit` for details
            processing complete for module MMM-MyCommute
            processing for module MMM-pihole-stats please wait
            ----------------------------------
            npm ERR! code EJSONPARSE
            npm ERR! file /home/pi/MagicMirror/modules/MMM-pihole-stats/package.json
            npm ERR! JSON.parse Failed to parse json
            npm ERR! JSON.parse Unexpected token ] in JSON at position 271 while parsing near '...",
            npm ERR! JSON.parse     "Pi-Hole",
            npm ERR! JSON.parse   ],
            npm ERR! JSON.parse   "author": "shey...'
            npm ERR! JSON.parse Failed to parse package.json data.
            npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
            
            npm ERR! A complete log of this run can be found in:
            npm ERR!     /home/pi/.npm/_logs/2020-01-19T20_55_54_012Z-debug.log
            processing complete for module MMM-pihole-stats
            restoring custom.css
            removing git alias
            we stashed a set of files that appear changed from the latest repo versions. you should review them
            Upgrade ended - Sun Jan 19 15:55:54 EST 2020
            S 1 Reply Last reply Jan 22, 2020, 4:15 PM Reply Quote 0
            • S Offline
              sdetweil @nakulbende
              last edited by Jan 22, 2020, 4:15 PM

              @nakulbende said in Issues after update - restoring?:

              can u post the package.json file from the MMM-pihole-stats module folder

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              N 1 Reply Last reply Jan 22, 2020, 4:16 PM Reply Quote 0
              • N Offline
                nakulbende @sdetweil
                last edited by Jan 22, 2020, 4:16 PM

                @sdetweil

                {
                  "name": "mmm-pihole-stats",
                  "version": "1.0.0",
                  "description": "Pi-Hole stats for MagicMirror2",
                  "repository": {
                    "type": "git",
                    "url": "git+https://github.com/sheyabernstein/mmm-pihole-stats.git"
                  },
                  "keywords": [
                    "MagicMirror",
                    "Pi-Hole",
                  ],
                  "author": "sheyabernstein",
                  "license": "MIT",
                  "bugs": {
                    "url": "https://github.com/sheyabernstein/mmm-pihole-stats/issues"
                  },
                  "homepage": "https://github.com/sheyabernstein/mmm-pihole-stats#readme"
                }
                
                S 1 Reply Last reply Jan 22, 2020, 4:27 PM Reply Quote 0
                • S Offline
                  sdetweil @nakulbende
                  last edited by sdetweil Jan 22, 2020, 4:34 PM Jan 22, 2020, 4:27 PM

                  @nakulbende

                  remove the trailing comma

                     "Pi-Hole",   // < -- here
                  

                  then go to the module folder and do

                   npm install
                  

                  but I don’t see pihole-stats starting in the startup… but it is listed as not disabled in config.js
                  (can u show me its config.js entry)

                  for MMM-GoogleFit module, it looks like

                  : Cannot read property ‘startOnMonday’ of undefined
                  that property is not defined in the config.js module entry

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  N 1 Reply Last reply Jan 23, 2020, 2:43 PM Reply Quote 0
                  • N Offline
                    nakulbende @sdetweil
                    last edited by sdetweil Jan 23, 2020, 2:50 PM Jan 23, 2020, 2:43 PM

                    @sdetweil Thank you so much for your time. If you are ever in Boston area, please let me buy you dinner. You have been a huge help and a great teacher.

                    I think I fixed the pihole-stats thing as you said. Here is the config.json entry

                    
                    		// Pihole stats
                    		{
                    			module: 'MMM-pihole-stats',
                    			position: 'bottom_bar',
                    			config: {
                    				apiURL: 'http://pi.hole/admin/api.php'
                    			}
                    		},
                    
                    S 1 Reply Last reply Jan 23, 2020, 2:51 PM Reply Quote 0
                    • S Offline
                      sdetweil @nakulbende
                      last edited by Jan 23, 2020, 2:51 PM

                      @nakulbende cool, thanks for the feedback… are you running ok now?

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

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