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.

    v2.18.0 update gave black screen, then nothing.

    Scheduled Pinned Locked Moved Solved Troubleshooting
    73 Posts 4 Posters 38.5k Views 4 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.
    • R Offline
      Richard238 @sdetweil
      last edited by

      @sdetweil

      pi@magicmirror:~/MagicMirror $ pm2 logs --lines=50
      [TAILING] Tailing last 50 lines for [all] processes (change the value with --lines option)
      /home/pi/.pm2/pm2.log last 50 lines:
      PM2        | 2022-01-06T14:24:56: PM2 log: App [MagicMirror:0] starting in -fork mode-
      PM2        | 2022-01-06T14:24:56: PM2 log: App [MagicMirror:0] online
      PM2        | 2022-01-06T14:50:49: PM2 log: Stopping app:MagicMirror id:0
      PM2        | 2022-01-06T14:50:49: PM2 log: App [MagicMirror:0] exited with code [0] via signal [SIGINT]
      PM2        | 2022-01-06T14:50:49: PM2 log: pid=12707 msg=process killed
      PM2        | 2022-01-06T14:50:59: PM2 log: App [MagicMirror:0] starting in -fork mode-
      PM2        | 2022-01-06T14:50:59: PM2 log: App [MagicMirror:0] online
      
      /home/pi/.pm2/logs/MagicMirror-out.log last 50 lines:
      0|MagicMir | 
      0|MagicMir | > magicmirror@2.18.0 start
      0|MagicMir | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      0|MagicMir | 
      0|MagicMir | 
      0|MagicMir | > magicmirror@2.18.0 start
      0|MagicMir | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      0|MagicMir | 
      
      /home/pi/.pm2/logs/MagicMirror-error.log last 50 lines:
      0|MagicMir |     at require (node:internal/modules/cjs/helpers:94:18)
      0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:4:14)
      0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
      0|MagicMir | (node:12755) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
      0|MagicMir | (Use `electron --trace-deprecation ...` to show where the warning was created)
      0|MagicMir | A JavaScript error occurred in the main process
      0|MagicMir | Uncaught Exception:
      0|MagicMir | TypeError: Log.log is not a function
      0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:20:5)
      0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
      0|MagicMir |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
      0|MagicMir |     at Module.load (node:internal/modules/cjs/loader:988:32)
      0|MagicMir |     at Module._load (node:internal/modules/cjs/loader:829:12)
      0|MagicMir |     at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
      0|MagicMir |     at Module.require (node:internal/modules/cjs/loader:1012:19)
      0|MagicMir |     at require (node:internal/modules/cjs/helpers:94:18)
      0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:4:14)
      0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
      0|MagicMir | [12789:0106/142502.942799:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
      0|MagicMir | [12805:0106/142503.366582:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
      0|MagicMir | /home/pi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
      0|MagicMir | App threw an error during load
      0|MagicMir | TypeError: Log.log is not a function
      0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:20:5)
      0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
      0|MagicMir |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
      0|MagicMir |     at Module.load (node:internal/modules/cjs/loader:988:32)
      0|MagicMir |     at Module._load (node:internal/modules/cjs/loader:829:12)
      0|MagicMir |     at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
      0|MagicMir |     at Module.require (node:internal/modules/cjs/loader:1012:19)
      0|MagicMir |     at require (node:internal/modules/cjs/helpers:94:18)
      0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:4:14)
      0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
      0|MagicMir | (node:18699) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
      0|MagicMir | (Use `electron --trace-deprecation ...` to show where the warning was created)
      0|MagicMir | A JavaScript error occurred in the main process
      0|MagicMir | Uncaught Exception:
      0|MagicMir | TypeError: Log.log is not a function
      0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:20:5)
      0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
      0|MagicMir |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
      0|MagicMir |     at Module.load (node:internal/modules/cjs/loader:988:32)
      0|MagicMir |     at Module._load (node:internal/modules/cjs/loader:829:12)
      0|MagicMir |     at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
      0|MagicMir |     at Module.require (node:internal/modules/cjs/loader:1012:19)
      0|MagicMir |     at require (node:internal/modules/cjs/helpers:94:18)
      0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:4:14)
      0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
      0|MagicMir | [18754:0106/145107.193182:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
      0|MagicMir | [18773:0106/145107.559447:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
      
      
      pi@magicmirror:~/MagicMirror $ node -v
      v17.3.0
      pi@magicmirror:~/MagicMirror $ npm -v
      8.3.0
      
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Richard238
        last edited by

        @richard238 can u show the ~/MagicMirror/config/config.js

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @sdetweil

          config.js, minus private data.

          /* Magic Mirror Config Sample
           *
           * By Michael Teeuw http://michaelteeuw.nl
           * MIT Licensed.
           */
          
          var config = {
          	port: 8080,
          	address:"0.0.0.0",
          	ipWhitelist: [],
          	//ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.1/120",],
          
          	language: 'en',
          	timeFormat: 24,
          	units: 'metric',
          
          	modules: [
          		{
          			module: 'alert',
          		},
          		
          		
          		
          	
          		{
          			module: "updatenotification",
          			position: "top_bar"
          		},
          		{
          			module: 'clock',
          			position: 'top_left'
          		},
          		{
          			module: 'calendar',
          			header: 'Calendar',
          			position: 'top_left',
          			config: {
                              maximumEntries: 6, // Total Maximum Entries
                              maximumNumberOfDays: 365,
                              displaySymbol: true,
                              defaultSymbol: "calendar", // Fontawesome Symbol see http://fontawesome.io/cheatsheet/
                              displayRepeatingCountTitle: false,
                              defaultRepeatingCountTitle: "",
                              maxTitleLength: 30,
                              fetchInterval: 5 * 60 * 1000, // Update every 5 minutes.
                              animationSpeed: 2000,
                              fade: true,
                              showEnd: false,
                              urgency: 0,
                              timeFormat: "absolute",
                              dateFormat: "ddd Do MMMM",
                              getRelative: 0,
                              fadePoint: 0.50, // Start on 1/4th of the list.
                              hidePrivate: false,
                              calendars: [
          					{
          						symbol: 'calendar-check-o ',
          						url: 'https:/nnnnnnnnnnnnnnnnnnnnn/basic.ics'
          					}
          				],
          			}
          		},
          		{
          			module: 'calendar',
          			header: 'Binday',
          			position: 'bottom_left',
          			config: {
                              maximumEntries: 4, // Total Maximum Entries
                              maximumNumberOfDays: 365,
                              displaySymbol: true,
                              defaultSymbol: "calendar", // Fontawesome Symbol see http://fontawesome.io/cheatsheet/
                              displayRepeatingCountTitle: false,
                              defaultRepeatingCountTitle: "",
                              maxTitleLength: 30,
                              fetchInterval: 5 * 60 * 1000, // Update every 5 minutes.
                              animationSpeed: 2000,
                              fade: true,
                              showEnd: false,
                              urgency: 0,
                              timeFormat: "absolute",
                              dateFormat: "ddd Do MMMM",
                              getRelative: 0,
                              fadePoint: 0.50, // Start on 1/4th of the list.
                              hidePrivate: false,
                              calendars: [
                              {
          						symbol: 'trash-o ',
          						url: 'https:/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn/basic.ics'
          					}
          				],
                          titleReplace: {
                          //	"'s birthday": "",
                          //	"Recycling": "Bins",
                              "Red Bin": "Red & Black Bins",
                              "Green Bin": "Green & Black Bins" 
                          },
                          // Override start method.
                          start: function () {
                              Log.log("Starting module: " + this.name);
          
                              /* This code changed times to 24hr clock until April 17 system update.
                              ** Set locale.
                              **  if (config.language === 'en' && config.timeFormat == 24) {
                              **  config.language = 'en-gb';
                              **  }
                              ** moment.locale(config.language);
                              */
                              
                              
                              for (var c in this.config.calendars) {
                                  var calendar = this.config.calendars[c];
                                  calendar.url = calendar.url.replace("webcal://", "http://");
                                  this.addCalendar(calendar.url, calendar.user, calendar.pass);
                              }
          
                              this.calendarData = {};
                              this.loaded = false;
          	},
          			}
          	},                
              	
          		{
          			module: 'compliments',
          			position: 'lower_third',
                      config: {
          			anytime: [
          				"A1",
                          "A2",
                          "A3"
          			],
          			morning: [
          				"M1",
          				"M2",
          				"M3"
          			],
          			afternoon: [
          				"N1",
          				"N2",
          				"N3"
          			],
          			evening: [
          				"E1",
          				"E2",
          				"E3"
          			]
          		},
          		updateInterval: 30000,
          		remoteFile: null,
          		fadeSpeed: 4000
          			/*config: {
          				remoteFile: 'compliments.json'
          			}*/
          		},  
          		
          
                  {   
                      module: 'MMM-doomsDay',
                      position: 'top_center', // This can be any of the regions, best results in center regions
                      config: {
                      doomsDay: "2022-01-06 24:00:00", // YYYY-MM-DD HH:MM:SS, Do not alter the time, just the date
                      /*            doomsDay: "2020-12-21 24:00:00", // YYYY-MM-DD HH:MM:SS, Do not alter the time, just the date   */
                      toWhat: "today",
                          // See 'Configuration options' for more information.
                              }
                  },
          
          		{
          			module: 'currentweather',
          			header: 'Current weather for: ',			
          			position: 'top_right',
          			config: {
          				location: 'nnnnnnnnnnnnnnnn,GB',
          				locationID: 'nnnn',  //ID from http://www.openweathermap.org
          				appid: 'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn'
          			}
          		},
          
          
          		{
          			module: 'weatherforecast',
          			position: 'top_right',
          			header: 'Weather Forecast',
          			config: {
          				location: 'nnnnnn,GB',
          				locationID: 'nnnnnnn',  //ID from http://www.openweathermap.org
          				appid: 'aaannnnnnnnnn'
          			}
          		},
          
          
          
                  {
                      module: 'MMM-MysqlQuery',
                      position: 'bottom_right',
          			header: 'Greenhouse Status',            
                      config: {
                          connection: {
                              host: "192.168.1.23",
                              port: 3306,
                              user: "nnnnnnnnnnnnnnnn",
                              password: "nnnnnnnnnnnnnnnn",
                              database: "garage"
                          },
          /*              query: `select Temp-2
                                  from readings
                                  order by ID desc
                                  limit 1`,
          */
          			query: "select Added, \
          			Temp, \
          						Pressure, \
          						Humidity \
          						from gh_readings \
          						order by ID \
          						desc limit 3",
          				
          
          
          
              			intervalSeconds: 1 * 60,
                          emptyMessage: "No data!",
                          columns: [
                              { name: "Added",     title: "At", cssClass: "left", dateFormat: "time", dateLocale: "en-GB" },                     
                              { name: "Temp",     title: "Temp", cssClass: "left", suffix: "°C", nullValue: "???" },
                              { name: "Pressure",     title: "Pressure", cssClass: "left", suffix: " hPa", nullValue: "???" },
                              { name: "Humidity",     title: "Humidity", cssClass: "left", suffix: " %" },
                         ]
                      }
                  },
          */
             
                  
          
          
          
                  
          		{
          			module: 'newsfeed',
          			position: 'bottom_bar',
          			config: {
          				feeds: [
                              {
                                  title: "BBC World",
                                  url: "http://feeds.bbci.co.uk/news/world/rss.xml"
                              }, 
          		    
          		    {
                                  title: "Al Jazeera",
                                  url: "https://www.aljazeera.com/xml/rss/all.xml"
                              }, 
          		                                           
                              {
                                  title: "Sky news",
                                  url: "http://feeds.skynews.com/feeds/rss/world.xml"
                              }                    
                          ],
          				showSourceTitle: true,
          				showPublishDate: true,
                          reloadInterval:  2 * 60 * 1000, // every 5 minutes
                          updateInterval: 2 * 5000
          			}
          		}
          	]
          
          };
          
          /*************** DO NOT EDIT THE LINE BELOW ***************/
          if (typeof module !== 'undefined') {module.exports = config;}
          
          
          
          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @Richard238
            last edited by sdetweil

            @richard238 said in v2.18.0 update gave black screen, then nothing.:

            >  // Override start method.
            >                 start: function () {
            >                     Log.log("Starting module: " + this.name);
            > 
            >                     /* This code changed times to 24hr clock until April 17 system update.
            >                     ** Set locale.
            >                     **  if (config.language === 'en' && config.timeFormat == 24) {
            >                     **  config.language = 'en-gb';
            >                     **  }
            >                     ** moment.locale(config.language);
            >                     */
            >                     
            >                     
            >                     for (var c in this.config.calendars) {
            >                         var calendar = this.config.calendars[c];
            >                         calendar.url = calendar.url.replace("webcal://", "http://");
            >                         this.addCalendar(calendar.url, calendar.user, calendar.pass);
            >                     }
            > 
            >                     this.calendarData = {};
            >                     this.loaded = false;
            > 	},
            

            what is that? I’m not aware of any code in config for calendar

            for grins, can you add // in front of the Log.log statement

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @sdetweil

              what is that? I’m not aware of any code in config for calendar
              No idea, thought it had always been there. I’m not much of a coder, as I’m sure you can tell.

              // added

              pi@magicmirror:~/MagicMirror $ pm2 start MagicMirror
              [PM2] Applying action restartProcessId on app [MagicMirror](ids: [ 0 ])
              [PM2] [MagicMirror](0) ✓
              [PM2] Process successfully started
              ┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
              │ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
              ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
              │ 0  │ MagicMirror        │ fork     │ 0    │ online    │ 0%       │ 2.4mb    │
              └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
              pi@magicmirror:~/MagicMirror $ pm2 logs --lines=50
              [TAILING] Tailing last 50 lines for [all] processes (change the value with --lines option)
              /home/pi/.pm2/pm2.log last 50 lines:
              PM2        | 2022-01-06T14:24:56: PM2 log: App [MagicMirror:0] starting in -fork mode-
              PM2        | 2022-01-06T14:24:56: PM2 log: App [MagicMirror:0] online
              PM2        | 2022-01-06T14:50:49: PM2 log: Stopping app:MagicMirror id:0
              PM2        | 2022-01-06T14:50:49: PM2 log: App [MagicMirror:0] exited with code [0] via signal [SIGINT]
              PM2        | 2022-01-06T14:50:49: PM2 log: pid=12707 msg=process killed
              PM2        | 2022-01-06T14:50:59: PM2 log: App [MagicMirror:0] starting in -fork mode-
              PM2        | 2022-01-06T14:50:59: PM2 log: App [MagicMirror:0] online
              PM2        | 2022-01-06T15:51:52: PM2 log: Stopping app:MagicMirror id:0
              PM2        | 2022-01-06T15:51:53: PM2 log: App [MagicMirror:0] exited with code [0] via signal [SIGINT]
              PM2        | 2022-01-06T15:51:53: PM2 log: pid=18675 msg=process killed
              PM2        | 2022-01-06T15:52:00: PM2 log: App [MagicMirror:0] starting in -fork mode-
              PM2        | 2022-01-06T15:52:00: PM2 log: App [MagicMirror:0] online
              
              /home/pi/.pm2/logs/MagicMirror-out.log last 50 lines:
              0|MagicMir | 
              0|MagicMir | > magicmirror@2.18.0 start
              0|MagicMir | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
              0|MagicMir | 
              0|MagicMir | 
              0|MagicMir | > magicmirror@2.18.0 start
              0|MagicMir | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
              0|MagicMir | 
              0|MagicMir | 
              0|MagicMir | > magicmirror@2.18.0 start
              0|MagicMir | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
              0|MagicMir | 
              
              /home/pi/.pm2/logs/MagicMirror-error.log last 50 lines:
              0|MagicMir |     at require (node:internal/modules/cjs/helpers:94:18)
              0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:4:14)
              0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
              0|MagicMir | (node:18699) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
              0|MagicMir | (Use `electron --trace-deprecation ...` to show where the warning was created)
              0|MagicMir | A JavaScript error occurred in the main process
              0|MagicMir | Uncaught Exception:
              0|MagicMir | TypeError: Log.log is not a function
              0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:20:5)
              0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
              0|MagicMir |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
              0|MagicMir |     at Module.load (node:internal/modules/cjs/loader:988:32)
              0|MagicMir |     at Module._load (node:internal/modules/cjs/loader:829:12)
              0|MagicMir |     at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              0|MagicMir |     at Module.require (node:internal/modules/cjs/loader:1012:19)
              0|MagicMir |     at require (node:internal/modules/cjs/helpers:94:18)
              0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:4:14)
              0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
              0|MagicMir | [18754:0106/145107.193182:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
              0|MagicMir | [18773:0106/145107.559447:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
              0|MagicMir | /home/pi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
              0|MagicMir | App threw an error during load
              0|MagicMir | TypeError: Log.log is not a function
              0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:20:5)
              0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
              0|MagicMir |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
              0|MagicMir |     at Module.load (node:internal/modules/cjs/loader:988:32)
              0|MagicMir |     at Module._load (node:internal/modules/cjs/loader:829:12)
              0|MagicMir |     at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              0|MagicMir |     at Module.require (node:internal/modules/cjs/loader:1012:19)
              0|MagicMir |     at require (node:internal/modules/cjs/helpers:94:18)
              0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:4:14)
              0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
              0|MagicMir | (node:32542) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
              0|MagicMir | (Use `electron --trace-deprecation ...` to show where the warning was created)
              0|MagicMir | A JavaScript error occurred in the main process
              0|MagicMir | Uncaught Exception:
              0|MagicMir | TypeError: Log.log is not a function
              0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:20:5)
              0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
              0|MagicMir |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
              0|MagicMir |     at Module.load (node:internal/modules/cjs/loader:988:32)
              0|MagicMir |     at Module._load (node:internal/modules/cjs/loader:829:12)
              0|MagicMir |     at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
              0|MagicMir |     at Module.require (node:internal/modules/cjs/loader:1012:19)
              0|MagicMir |     at require (node:internal/modules/cjs/helpers:94:18)
              0|MagicMir |     at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:4:14)
              0|MagicMir |     at Module._compile (node:internal/modules/cjs/loader:1116:14)
              0|MagicMir | [32574:0106/155207.031878:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
              0|MagicMir | [32615:0106/155207.383004:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
              
              
              
              
              
              S 3 Replies Last reply Reply Quote 0
              • S Offline
                sdetweil @Richard238
                last edited by

                @richard238 added it to me config.js and it doesn’t matter…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  @richard238 ok, lets start back somewhere

                  save your config.js

                  copy the sample back to config.js

                  and start

                  this should work …

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    @richard238 i copied your config above to my system
                    and it starts ok…

                    my node/npm are

                    node -v
                    v16.1.0
                    npm -v
                    7.24.2

                    so, lets try that , we will use the node version of node version manager (nvm) called n

                    # install n globally
                    npm i n -g 
                    # install node version 16.1.0
                    n i 16.1.0
                    # use the setup path from node version install
                    PATH="$PATH"
                    # verify node and npm versions
                    node -v
                    npm -v
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

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

                      @sdetweil

                      run those from
                      pi@magicmirror:~/MagicMirror $

                      or

                      pi@magicmirror:~ $

                      Or, does it not matter?

                      S 2 Replies Last reply Reply Quote 0
                      • S Offline
                        sdetweil @Richard238
                        last edited by

                        @richard238 does not matter

                        not MM specific

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

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

                          @richard238 did u try the initial config.js

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

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

                            @sdetweil

                            No, took me a while to restore one back from archive, but it’s there now, ready to go.

                            
                            /* Magic Mirror Config Sample
                             *
                             * By Michael Teeuw http://michaelteeuw.nl
                             * MIT Licensed.
                             */
                            
                            var config = {
                            	port: 8080,
                            	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
                            
                            	language: 'en',
                            	timeFormat: 24,
                            	units: 'metric',
                            
                            	modules: [
                            		{
                            			module: 'alert',
                            		},
                            		{
                            			module: "updatenotification",
                            			position: "top_bar"
                            		},
                            		{
                            			module: 'clock',
                            			position: 'top_left'
                            		},
                            		{
                            			module: 'calendar',
                            			header: 'US Holidays',
                            			position: 'top_left',
                            			config: {
                            				calendars: [
                            					{
                            						symbol: 'calendar-check-o ',
                            						url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics'
                            					}
                            				]
                            			}
                            		},
                            		{
                            			module: 'compliments',
                            			position: 'lower_third'
                            		},
                            		{
                            			module: 'currentweather',
                            			position: 'top_right',
                            			config: {
                            				location: 'New York',
                            				locationID: '',  //ID from http://www.openweathermap.org
                            				appid: 'YOUR_OPENWEATHER_API_KEY'
                            			}
                            		},
                            		{
                            			module: 'weatherforecast',
                            			position: 'top_right',
                            			header: 'Weather Forecast',
                            			config: {
                            				location: 'New York',
                            				locationID: '5128581',  //ID from http://www.openweathermap.org
                            				appid: 'YOUR_OPENWEATHER_API_KEY'
                            			}
                            		},
                            		{
                            			module: 'newsfeed',
                            			position: 'bottom_bar',
                            			config: {
                            				feeds: [
                            					{
                            						title: "New York Times",
                            						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                            					}
                            				],
                            				showSourceTitle: true,
                            				showPublishDate: true
                            			}
                            		},
                            	]
                            
                            };
                            
                            /*************** DO NOT EDIT THE LINE BELOW ***************/
                            if (typeof module !== 'undefined') {module.exports = config;}
                            
                            
                            

                            My versions:

                            pi@magicmirror:~ $ node -v
                            v16.1.0
                            pi@magicmirror:~ $ npm -v
                            7.11.2
                            

                            NPM is different to yours, but OK to try?

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

                              @richard238 said in v2.18.0 update gave black screen, then nothing.:

                              @sdetweil
                              No, took me a while to restore one back from archive, but it’s there now, ready to go.

                              in the config folder is the config.js.sample file which is what I wanted you to use
                              just to eliminate other things,

                              but

                              cd ~/MagicMirror
                              npm start
                              

                              may have to clean and nom install again as node version changed…

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

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

                                @sdetweil

                                It’s still throwing the log.log error!

                                pi@magicmirror:~/MagicMirror $ npm start
                                
                                > magicmirror@2.18.0 start
                                > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
                                
                                App threw an error during load
                                TypeError: Log.log is not a function
                                    at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:20:5)
                                    at Module._compile (node:internal/modules/cjs/loader:1116:14)
                                    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
                                    at Module.load (node:internal/modules/cjs/loader:988:32)
                                    at Module._load (node:internal/modules/cjs/loader:829:12)
                                    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
                                    at Module.require (node:internal/modules/cjs/loader:1012:19)
                                    at require (node:internal/modules/cjs/helpers:94:18)
                                    at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:4:14)
                                    at Module._compile (node:internal/modules/cjs/loader:1116:14)
                                (node:6752) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead.
                                (Use `electron --trace-deprecation ...` to show where the warning was created)
                                A JavaScript error occurred in the main process
                                Uncaught Exception:
                                TypeError: Log.log is not a function
                                    at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:20:5)
                                    at Module._compile (node:internal/modules/cjs/loader:1116:14)
                                    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
                                    at Module.load (node:internal/modules/cjs/loader:988:32)
                                    at Module._load (node:internal/modules/cjs/loader:829:12)
                                    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
                                    at Module.require (node:internal/modules/cjs/loader:1012:19)
                                    at require (node:internal/modules/cjs/helpers:94:18)
                                    at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:4:14)
                                    at Module._compile (node:internal/modules/cjs/loader:1116:14)
                                [6808:0106/162138.316545:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
                                [6828:0106/162138.716857:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
                                
                                
                                
                                S 1 Reply Last reply Reply Quote 0
                                • S Offline
                                  sdetweil @Richard238
                                  last edited by

                                  @richard238 ok, fun times…

                                  so, do

                                  cd ~
                                  mv MagicMirror MagicMirror.save
                                  git clone  https://github.com/MichMich/MagicMirror.git
                                  cd MagicMirror
                                  npm install --only=prod
                                  cd config
                                  cp config.js.sample config.js
                                  cd ..
                                  

                                  then npm start

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

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

                                    @sdetweil

                                    Clean install - works perfectly! :)

                                    pi@magicmirror:~/MagicMirror $ cd config
                                    pi@magicmirror:~/MagicMirror/config $ cp config.js.sample config.js
                                    pi@magicmirror:~/MagicMirror/config $ cd ..
                                    pi@magicmirror:~/MagicMirror $ npm start
                                    
                                    > magicmirror@2.18.0 start
                                    > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
                                    
                                    [06.01.2022 16:30.01.197] [LOG]   Starting MagicMirror: v2.18.0
                                    [06.01.2022 16:30.01.222] [LOG]   Loading config ...
                                    [06.01.2022 16:30.01.238] [LOG]   Loading module helpers ...
                                    [06.01.2022 16:30.01.243] [LOG]   No helper found for module: alert.
                                    [06.01.2022 16:30.01.307] [LOG]   Initializing new module helper ...
                                    [06.01.2022 16:30.01.311] [LOG]   Module helper loaded: updatenotification
                                    [06.01.2022 16:30.01.315] [LOG]   No helper found for module: clock.
                                    [06.01.2022 16:30.01.765] [LOG]   Initializing new module helper ...
                                    [06.01.2022 16:30.01.768] [LOG]   Module helper loaded: calendar
                                    [06.01.2022 16:30.01.771] [LOG]   No helper found for module: compliments.
                                    [06.01.2022 16:30.01.773] [LOG]   No helper found for module: weather.
                                    [06.01.2022 16:30.01.843] [LOG]   Initializing new module helper ...
                                    [06.01.2022 16:30.01.845] [LOG]   Module helper loaded: newsfeed
                                    [06.01.2022 16:30.01.848] [LOG]   All module helpers loaded.
                                    [06.01.2022 16:30.02.152] [LOG]   Starting server on port 8080 ... 
                                    [06.01.2022 16:30.02.183] [LOG]   Server started ...
                                    [06.01.2022 16:30.02.185] [LOG]   Connecting socket for: updatenotification
                                    [06.01.2022 16:30.02.187] [LOG]   Starting module helper: updatenotification
                                    [06.01.2022 16:30.02.189] [LOG]   Connecting socket for: calendar
                                    [06.01.2022 16:30.02.190] [LOG]   Starting node helper for: calendar
                                    [06.01.2022 16:30.02.191] [LOG]   Connecting socket for: newsfeed
                                    [06.01.2022 16:30.02.192] [LOG]   Starting node helper for: newsfeed
                                    [06.01.2022 16:30.02.193] [LOG]   Sockets connected & modules started ...
                                    [06.01.2022 16:30.02.845] [LOG]   Launching application.
                                    [8846:0106/163005.246382:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
                                    [8886:0106/163005.631441:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
                                    [06.01.2022 16:30.12.077] [LOG]   Create new calendarfetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 300000
                                    [06.01.2022 16:30.12.157] [LOG]   Create new newsfetcher for url: https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
                                    [06.01.2022 16:30.12.258] [INFO]  Checking git for module: default
                                    [06.01.2022 16:30.13.590] [INFO]  Calendar-Fetcher: Broadcasting 10 events.
                                    [06.01.2022 16:30.13.638] [INFO]  Newsfeed-Fetcher: Broadcasting 64 items.
                                    
                                    
                                    S 1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      sdetweil @Richard238
                                      last edited by

                                      @richard238 ok!.. run this to get rid of the sandbox problem

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

                                      then

                                      cd ~/MagicMirror/modules
                                      # save the new default modules folder
                                      mv default default.new
                                      cd ..
                                      # copy all the modules from old install (incl default) preserve ownership and dates, need sudo to copy git info 
                                      sudo cp -r -p ~/MagicMirror.save/modules/* modules
                                      cd modules
                                      # remove the copied default modules
                                      rm -rf default
                                      # restore the saved default
                                      mv default.new default
                                      

                                      copy your full function config.js to MagicMirror/config
                                      and try it out

                                      cd ~/MagicMirror
                                      npm start 
                                      

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

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

                                        @sdetweil

                                        pi@magicmirror:~ $ cd ~/MagicMirror/modules
                                        pi@magicmirror:~/MagicMirror/modules $ mv default default.new
                                        pi@magicmirror:~/MagicMirror/modules $ sudo cp -r -p ~/MagicMirror.save/modules/* modules
                                        cp: target 'modules' is not a directory
                                        

                                        Tried it without the space…

                                        pi@magicmirror:~/MagicMirror/modules $ sudo cp -r -p ~/MagicMirror.save/modules/*modules
                                        cp: missing destination file operand after '/home/pi/MagicMirror.save/modules/*modules'
                                        Try 'cp --help' for more information.
                                        pi@magicmirror:~/MagicMirror/modules $ 
                                        
                                        R 1 Reply Last reply Reply Quote 0
                                        • R Offline
                                          Richard238 @Richard238
                                          last edited by

                                          @richard238

                                          I have to leave shortly Sam.

                                          Thank you for all your help with this today, I’ll try again tomorrow.

                                          Richard.

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

                                            @richard238 ok

                                            you forgot the cd …

                                            cd ..
                                            # copy all the modules from old install (incl default) preserve ownership and dates, need sudo to copy git info 
                                            sudo cp -r -p ~/MagicMirror.save/modules/* modules
                                            

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            R 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 3 / 4
                                            • 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