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 blank screen

    Scheduled Pinned Locked Moved Troubleshooting
    black blank screen
    11 Posts 4 Posters 11.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.
    • D Offline
      dhirajv12
      last edited by

      Blank black screen

      Hi,
      I have the same black screen problem. I have not added any other modules. Just have renamed the config.js.sample to config.js
      The application launches with a black screen.

      In the terminal it says
      No helper found for module: clock
      no helper found for module: complements

      When i start the console
      With npm start dev following errors are found
      Uncaught reference error: moment is not defined
      At Class.getDom (clock.js:77)
      At updateDom (main.js:99)
      at Object.updateDom (main.js:470)
      at Class.updateDom (module.js:291)
      at clock.js:45

      Need help I am stuck
      Thanks

      For the black screen problem, I even did the git pull to update
      git pull https://github.com/MichMich/MagicMirror
      From https://github.com/MichMich/MagicMirror

      branch HEAD -> FETCH_HEAD
      Already up-to-date.
      

      Now where is the issue??? Stuck please help.
      If this is the problem with the config.js file please send me a working config file. I shall try and see if it works for me.

      A 1 Reply Last reply Reply Quote 0
      • A Offline
        Anhalter42 @dhirajv12
        last edited by

        @dhirajv12 Seems more like you are missing some dependency. Try reinstalling from scratch…

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          dhirajv12 @Anhalter42
          last edited by

          @Anhalter42
          i tried a fresh installation with
          curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash
          it shows
          shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
          but later it shows the Magic Mirror2 logo and proceeds…

          is there a problem?

          A 1 Reply Last reply Reply Quote 0
          • D Offline
            dhirajv12
            last edited by

            No Node.js upgrade nessecery.
            chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

            these are certain comments which I feel should be notified…

            1 Reply Last reply Reply Quote 0
            • A Offline
              Anhalter42 @dhirajv12
              last edited by

              @dhirajv12 Never seen this. Googled it. Found this.
              If it works now, I wouldn’t worry too much.

              D 1 Reply Last reply Reply Quote 0
              • D Offline
                dhirajv12 @Anhalter42
                last edited by

                @Anhalter42
                Now i did installation from scratch…
                these are the warnings
                Cloning MagicMirror Done!
                Installing dependencies …

                npm WARN stylelint-config-standard@16.0.0 requires a peer of stylelint@^7.8.0 but none was installed.
                npm ERR! code ELIFECYCLE
                npm ERR! errno 1
                npm ERR! electron@1.6.10 postinstall: node install.js
                npm ERR! Exit status 1
                npm ERR!
                npm ERR! Failed at the electron@1.6.10 postinstall script.
                npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

                ╭─────────────────────────────────────╮
                │ │
                │ Update available 4.6.1 → 5.0.0 │
                │ Run npm i -g npm to update │
                │ │
                ╰─────────────────────────────────────╯

                npm ERR! A complete log of this run can be found in:
                npm ERR! /home/pi/.npm/_logs/2017-05-31T03_13_15_771Z-debug.log
                Unable to install dependencies!

                should I send u the log file… will it be of any help…
                this must be the 10th time I am instaling from scratch …I could not get it working…

                D 1 Reply Last reply Reply Quote 0
                • D Offline
                  dhirajv12 @dhirajv12
                  last edited by

                  @Anhalter42
                  After I found that it failed at electron. I installed it with
                  sudo npm install electron:1.6.9 -g
                  after that I did cd /MagicMirror npm start.
                  MagicMirror did pop up but with a message that if did not find the config file. So there was a sample file in?magicMirror/config folder. I remaned it to config.js from config.js.sample.
                  I ran it, then the screen went black…
                  The contents of config file looks like this…

                  • 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”], // Set [] to allow all IP addresses.

                  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/help/city_list.txt
                  			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/help/city_list.txt
                  			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;}

                  A N 2 Replies Last reply Reply Quote 0
                  • A Offline
                    Anhalter42 @dhirajv12
                    last edited by

                    @dhirajv12 I’m not really familiar with these errors. To me, it seems like you have some mismatch of versions, e.g. node being too old or too new. Did you try to update as mentioned in the output?

                    1 Reply Last reply Reply Quote 0
                    • N Offline
                      nhl @dhirajv12
                      last edited by

                      @dhirajv12 Try navigating to ~/MagicMirror/vendor then running npm install

                      1 Reply Last reply Reply Quote 1
                      • H Offline
                        HerrB92
                        last edited by HerrB92

                        Regarding “electron@1.6.10 postinstall”: There is an issue during installation with the extract-zip package which in turn results in a postinstall problem with electron (visible sign: There is no path.txt file in the node_modules/electron folder. Starting MM gives you the error message ‘Electron failed to install correctly, please delete node_modules/electron and try installing again’).

                        As far as I understand, extract-zip is now version 1.6.4 and with this version, postinstall on electron fails.

                        This post helped: https://forum.magicmirror.builders/topic/2460/magicmirror-fails-to-install-during-electron-installation/2

                        I am still struggeling with the black blank screen (and I have to further look into this), but the electron installation can be fixed by issuing (as taken from the referenced post - actually a downgrade of the extract-zip package):

                        npm uninstall extract-zip
                        npm install extract-zip@1.6.0
                        npm install electron
                        

                        Note: I am a noob, yet… ;-)

                        Regards,
                        HerrB92

                        1 Reply Last reply Reply Quote 0
                        • H Offline
                          HerrB92
                          last edited by

                          So, at least for my installation I was able to sort things out. This also included as well re-installing Raspbian, but I just wanted to have a clean installation. The main culprit seem to be the node.js version which is important to be at least from the V7 branch (V8 not tested, my system shows v0.10.x before any installation steps) and an issue with the automated installation script:

                          Problem in automated installation script:
                          It tests for node.js V5.1.x and if not or only an earlier version is found, asks to install node.js from the V6 branch. Even with the latest node.js version from V6 the installation of electron fails in a postinstall step due to a problem in the extract-zip package (yes, complicated, indeed).

                          Indicator for the problem in the electron installation is a missing path.txt file which should be in the electron sub folder and the message “Electron failed to install correctly, please delete node_modules/electron and try installing again” if MM is tried to be started.

                          Even, if the electron installation is fixed as described before, you will just get a black screen: MM starts, but all areas remain empty which is optically “a black screen”. This (and actually the other problems as well) can be fixed by installing the node.js version of the V7 branch before installation.

                          Additionally, due to the problems during the installation the final steps, e.g. creating the config file and asking, if the automatic start manager PM2 should be used, are not executed.

                          Hint: You can check the node.js version by issuing:

                          node -v
                          

                          Clean installation steps:

                          1. Optional: Re-install Raspbian to get a clean system
                          2. Update Raspbian:
                          sudo apt-get update
                          sudo apt-get upgrade
                          
                          1. Reboot
                          2. Update to node.js V7.x (if you have already installed and used node.js of the V8.x branch then you may not like to execute the following lines) as described on node.js project website:
                          curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
                          sudo apt-get install -y nodejs
                          
                          1. Get and install MagicMirror (without starting it) from the PI home folder:
                          git clone https://github.com/MichMich/MagicMirror
                          cd ~/MagicMirror
                          npm install
                          
                          
                          1. Fix complaints about global scripts (may be optional, requires sudo due to the global option as special folders have to be accessed):
                          sudo npm install --global stylelint
                          sudo npm install --global coffeescript
                          
                          1. Execute post installation steps from the automatic installation script to make it perfect:
                          cp ~/MagicMirror/config/config.js.sample ~/MagicMirror/config/config.js
                          sudo mkdir /usr/share/plymouth/themes/MagicMirror
                          sudo cp ~/MagicMirror/splashscreen/splash.png /usr/share/plymouth/themes/MagicMirror/splash.png
                          sudo cp ~/MagicMirror/splashscreen/MagicMirror.plymouth /usr/share/plymouth/themes/MagicMirror/MagicMirror.plymouth
                          sudo cp ~/MagicMirror/splashscreen/MagicMirror.script /usr/share/plymouth/themes/MagicMirror/MagicMirror.script
                          
                          1. Optional: If you would like to autostart MM and to install the automatic start tool PM2:
                          sudo npm install -g pm2
                          sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi"
                          pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json
                          pm2 save
                          

                          Steps in 7&8 taken from the automatic script: https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh

                          Oh, start MM, if you a directly working on the system (no SSH/Putty connection):

                          npm start
                          

                          or while using a SSH/Putty connection:

                          DISPLAY=:0 nohup npm start &
                          

                          Regards,
                          HerrB92

                          1 Reply Last reply Reply Quote 1

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