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.

    Black screen on start up of Magic Mirror

    Scheduled Pinned Locked Moved Solved Troubleshooting
    11 Posts 3 Posters 2.1k 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.
    • B Offline
      bkrand95
      last edited by

      Hi everyone, extreme beginner here so please bear with me. I’ve been using my mirror successfully for the past 6-8 months without issues. Just today I attempted to install the NowPlayingOnSpotify module and the install, credentials set-up etc. was all pretty straight forward. Once everything was finally ready I opened MagicMirror to have a look and it was only a blank screen.

      Thinking it was the spotify module I removed that from my config file and still no luck. I even went on to remove the module itself from my module folder but also no luck. After hours of trying different things online I can’t get this figured out. Saw some things about possibly missing a node_helper.js? But I’m not sure how I know mine is missing or how to install it or even what it is. Sorry again, all new to this.

      Additionally, I’ve tried re-installing node.js as well as re-entering the Magic Mirror repository. These also did not work.

      Below is what I get when I try to start:

      pi@raspberrypi:~ $ cd MagicMirror
      pi@raspberrypi:~/MagicMirror $ npm start

      magicmirror@2.10.1 start /home/pi/MagicMirror
      ./run-start.sh

      [20:17:22.933] [LOG] Starting MagicMirror: v2.10.1
      [20:17:22.951] [LOG] Loading config …
      [20:17:22.970] [LOG] Loading module helpers …
      [20:17:22.973] [LOG] No helper found for module: alert.
      [20:17:22.976] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Cannot read property ‘split’ of undefined
      [20:17:22.979] [LOG] Loading module helpers …
      [20:17:22.981] [LOG] No helper found for module: alert.
      [20:17:22.982] [ERROR] App threw an error during load
      [20:17:22.983] [ERROR] TypeError: Cannot read property ‘split’ of undefined
      at loadModule (/home/pi/MagicMirror/js/app.js:113:25)
      at loadNextModule (/home/pi/MagicMirror/js/app.js:166:5)
      at /home/pi/MagicMirror/js/app.js:168:6
      at loadModule (/home/pi/MagicMirror/js/app.js:151:4)
      at loadNextModule (/home/pi/MagicMirror/js/app.js:166:5)
      at loadModules (/home/pi/MagicMirror/js/app.js:177:3)
      at /home/pi/MagicMirror/js/app.js:223:4
      at loadConfig (/home/pi/MagicMirror/js/app.js:82:4)
      at App.start (/home/pi/MagicMirror/js/app.js:211:3)
      at Object. (/home/pi/MagicMirror/js/electron.js:117:7)
      [20:17:22.985] [LOG] Whoops! There was an uncaught exception…
      [20:17:22.986] [ERROR] TypeError: Cannot read property ‘split’ of undefined
      at loadModule (/home/pi/MagicMirror/js/app.js:113:25)
      at loadNextModule (/home/pi/MagicMirror/js/app.js:166:5)
      at /home/pi/MagicMirror/js/app.js:168:6
      at loadModule (/home/pi/MagicMirror/js/app.js:151:4)
      at loadNextModule (/home/pi/MagicMirror/js/app.js:166:5)
      at loadModules (/home/pi/MagicMirror/js/app.js:177:3)
      at /home/pi/MagicMirror/js/app.js:223:4
      at loadConfig (/home/pi/MagicMirror/js/app.js:82:4)
      at App.start (/home/pi/MagicMirror/js/app.js:211:3)
      at Object. (/home/pi/MagicMirror/js/electron.js:117:7)
      [20:17:22.994] [LOG] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [20:17:22.996] [LOG] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      [20:17:23.264] [LOG] Launching application.
      [20:18:07.282] [LOG] Shutting down server…

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

        @bkrand95 that looks like a bad config for compliments

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @sdetweil What is telling you that it is the compliments module? Just trying to understand, thanks.

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

            @bkrand95 I added code to the compliments module to support \n (newline) in the compliment text.
            Using the split function.

            The error is split can’t work on an empty string

            So, it sounds like no compliment for the time of day

            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
              last edited by

              Or there is a problem with a config entry

              Sam

              How to add modules

              learning how to use browser developers window for css changes

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

                @sdetweil
                Below is my config file (put x’s in place of all the ID’s…). I actually have my compliments module commented out so I’m not sure how that can be an issue.

                /* Magic Mirror Config Sample
                 *
                 * By Michael Teeuw http://michaelteeuw.nl
                 * MIT Licensed.
                 *
                 * For more information how you can configurate this file
                 * See https://github.com/MichMich/MagicMirror#configuration
                 *
                 */
                
                var config = {
                	//address: "localhost", // Address to listen on, can be:
                	address: "0.0.0.0",
                	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                	                     // - another specific IPv4/6 to listen on a specific interface
                	                      // - "", "0.0.0.0", "::" to listen on any interface
                	                      // Default, when address config is left out, is "localhost"
                	port: 8080,
                	//ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.10"], // Set [] to allow all IP addresses
                	//ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
                	ipWhitelist: [],                                                       // or add a specific IPv4 of 192.168.1.5 :
                	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
                
                	language: "en",
                	timeFormat: 12,
                	units: "imperial",
                
                	modules: [
                		{
                			module: "alert",
                		},
                		{
                			//module: "updatenotification",
                			//position: "top_bar"
                		},
                		{
                			module: "clock",
                			position: "top_left"
                		},
                		{
                			module: "calendar",
                			header: "Calendar",
                			position: "top_left",
                			config: {
                				fade: false,
                				fetchInterval: 5000,
                				colored: true,
                				coloredSymbolOnly: false,
                				maximumNumberOfDays: 90,
                				calendars: [
                					{
                						symbol: "calendar-check",
                						color: "#c7ecff",
                						url: "https://calendar.google.com/calendar/xxxxxxxxxxxxxxxxxxxxxxx
                					}
                				]
                			}
                		},
                		{
                		//	module: "compliments",
                		//	position: "lower_third"
                		},
                		{
                			module: "currentweather",
                			position: "top_right",
                			config: {
                				location: "Lancaster",
                				locationID: "xxxxxxxxx",  //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
                				appid: "xxxxxxxxx",
                			}
                		},
                
                		{
                			module: "weatherforecast",
                			position: "top_right",
                			header: "Weather Forecast",
                			config: {
                				fade: false,
                				location: "Lancaster",
                				locationID: "xxxxxxxxx",  //ID from https://openweathermap.org/city
                				appid: "xxxxxxxxx"
                			}
                		},
                		{
                   			 module: "MMM-Cocktails",
                   			 position: "bottom_center", // Editable footprint - Fits anywhere.
                   			 config: {
                      				maxWidth: "400px",     // See provided .css file for full customization options
                        			header: "",
                    			}
                		},
                    	        {
                        	//module: 'MMM-Remote-Control',
                        	// uncomment the following line to show the URL of the remote control on the mirror
                        	//position: 'bottom_left'
                        		// you can hide this module afterwards from the remote control itself
                        		//config: {
                        		//    apiKey: ''
                        		//}
                   		},
                   		{
                			module: 'MMM-ModuleScheduler',
                			config: {
                				notification_schedule: [
                					// SHUTDOWN AT 07:04AM MON-FRI
                					{notification: 'REMOTE_ACTION', schedule: '04 7 * * 1-5', payload: {action: "SHUTDOWN"}},
                					// SHUTDOWN AT 11:30PM FRI & SAT
                					{notification: 'REMOTE_ACTION', schedule: '30 23 * * 5-6', payload: {action: "SHUTDOWN"}},
                					// SHUTDOWN AT 10:55PM SUN-THUR
                					{notification: 'REMOTE_ACTION', schedule: '50 22 * * SUN-THU', payload: {action: "SHUTDOWN"}}
                				]
                			}
                		},
                		{
                			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
                			}
                		},
                		{
                			disabled: true,
                			module: 'MMM-EARTH-Live',
                			position: 'bottom_center',
                			config: {
                  			  height:"270px",
                   			 width:"480px",
                   			 useHeader: false,                // true if you want a header
                   			 header: "",                      // Change in config file. useHeader must be true
                   			 animationSpeed: 1000,            // fade speed
                			}
                		},
                		{
                		  module: "MMM-NowPlayingOnSpotify",
                		  position: "top_left",
                		
                		  config: {
                		    clientID: "xxxxxxxxx",
                		    clientSecret: "xxxxxxxxx",
                		    accessToken: "xxxxxxxxx",
                		    refreshToken: "xxxxxxxxx"
                		  }
                		},
                
                	]
                
                };
                
                /*************** DO NOT EDIT THE LINE BELOW ***************/
                if (typeof module !== "undefined") {module.exports = config;}
                
                
                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @bkrand95
                  last edited by sdetweil

                  @bkrand95 if u comment out a module, you must comment out the braces too,
                  Not like this

                  {
                  //  module : "compliments"'
                  //
                  },
                  

                  That leaves an empty entry in the modules array. Thus the problem

                  You can also disable a module, by adding

                  disabled: true,
                  

                  After the module: statement without commenting anything out

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  B 1 Reply Last reply Reply Quote 2
                  • B Offline
                    bkrand95 @sdetweil
                    last edited by

                    @sdetweil Thanks for the advice, I went ahead and added the “disabled: true” line instead of commenting out the modules. I’ve seemed to have made some progress as I no longer get the black screen, but now I get the familiar message: “Please create a config file. See README for more information.” I have gotten this message before and it’s usual due to an error in my config file, although this time I really can’t find anything. Below is my current config… any errors pop out? Thanks again for all the help.

                    /* Magic Mirror Config Sample
                     *
                     * By Michael Teeuw http://michaelteeuw.nl
                     * MIT Licensed.
                     *
                     * For more information how you can configurate this file
                     * See https://github.com/MichMich/MagicMirror#configuration
                     *
                     */
                    
                    var config = {
                    	//address: "localhost", // Address to listen on, can be:
                    	address: "0.0.0.0",
                    	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                    	                     // - another specific IPv4/6 to listen on a specific interface
                    	                      // - "", "0.0.0.0", "::" to listen on any interface
                    	                      // Default, when address config is left out, is "localhost"
                    	port: 8080,
                    	//ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.10"], // Set [] to allow all IP addresses
                    	//ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
                    	ipWhitelist: [],                                                       // or add a specific IPv4 of 192.168.1.5 :
                    	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                    	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                    	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
                    
                    	language: "en",
                    	timeFormat: 12,
                    	units: "imperial",
                    
                    	modules: [
                    
                    		{
                    			disabled: true,
                    			module: "updatenotification",
                    			position: "top_bar"
                    		},
                    		{
                    			module: "clock",
                    			position: "top_left"
                    		},
                    		{
                    			module: "calendar",
                    			header: "Calendar",
                    			position: "top_left",
                    			config: {
                    				fade: false,
                    				fetchInterval: 5000,
                    				colored: true,
                    				coloredSymbolOnly: false,
                    				maximumNumberOfDays: 90,
                    				calendars: [
                    					{
                    						symbol: "calendar-check",
                    						color: "#c7ecff",
                    						url: "xxxxx"
                    					}
                    				]
                    			}
                    		},
                    		{
                    			disabled: true,
                    			module: "compliments",
                    			position: "lower_third"
                    		},
                    		{
                    			module: "currentweather",
                    			position: "top_right",
                    			config: {
                    				location: "Lancaster",
                    				locationID: "xxxxx",  //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
                    				appid: "xxxxx",
                    			}
                    		},
                    
                    		{
                    			module: "weatherforecast",
                    			position: "top_right",
                    			header: "Weather Forecast",
                    			config: {
                    				fade: false,
                    				location: "Lancaster",
                    				locationID: "xxxxx",  //ID from https://openweathermap.org/city
                    				appid: "xxxxx"
                    			}
                    		},
                    		{
                       			 module: "MMM-Cocktails",
                       			 position: "bottom_center", // Editable footprint - Fits anywhere.
                       			 config: {
                          				maxWidth: "400px",     // See provided .css file for full customization options
                            			header: "",
                        			}
                    		},
                        	        {
                    			disabled: true,
                            		module: 'MMM-Remote-Control',
                            		uncomment the following line to show the URL of the remote control on the mirror
                            		position: 'bottom_left'
                            		// you can hide this module afterwards from the remote control itself
                            		config: {
                            		    apiKey: ''
                            		}
                       		},
                       		{
                    			module: 'MMM-ModuleScheduler',
                    			config: {
                    				notification_schedule: [
                    					// SHUTDOWN AT 07:04AM MON-FRI
                    					{notification: 'REMOTE_ACTION', schedule: '04 7 * * 1-5', payload: {action: "SHUTDOWN"}},
                    					// SHUTDOWN AT 11:30PM FRI & SAT
                    					{notification: 'REMOTE_ACTION', schedule: '30 23 * * 5-6', payload: {action: "SHUTDOWN"}},
                    					// SHUTDOWN AT 10:55PM SUN-THUR
                    					{notification: 'REMOTE_ACTION', schedule: '50 22 * * SUN-THU', payload: {action: "SHUTDOWN"}}
                    				]
                    			}
                    		},
                    		{
                    			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
                    			}
                    		},
                    		{
                    			disabled: true,
                    			module: 'MMM-EARTH-Live',
                    			position: 'bottom_center',
                    			config: {
                      			  height:"270px",
                       			 width:"480px",
                       			 useHeader: false,                // true if you want a header
                       			 header: "",                      // Change in config file. useHeader must be true
                       			 animationSpeed: 1000,            // fade speed
                    			}
                    		},
                    		{
                    		  module: "MMM-NowPlayingOnSpotify",
                    		  position: "top_left",
                    		  config: {
                    		    clientID: "xxxxx",
                    		    clientSecret: "xxxxx",
                    		    accessToken: "xxxxx",
                    		    refreshToken: "xxxxx"
                    		  }
                    		},
                    	]
                    };
                    
                    O 1 Reply Last reply Reply Quote 0
                    • O Offline
                      OldSunGuy @bkrand95
                      last edited by OldSunGuy

                      @bkrand95 said in Black screen on start up of Magic Mirror:

                      module: ‘MMM-Remote-Control’,
                      uncomment the following line to show the URL of the remote control on the mirror
                      position: ‘bottom_left’

                      The line after MMM-Remote-Control should be a comment,
                      and there should be a comma after the ‘bottom_left’.

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

                        And this line will need a trailing comma

                        position: 'bottom_left'
                        

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