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

Trouble with config file, Error Create Config File

Scheduled Pinned Locked Moved Troubleshooting
12 Posts 5 Posters 11.0k Views 5 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.
  • M Offline
    Mykle1 Project Sponsor Module Developer @twosix
    last edited by May 8, 2017, 12:09 AM

    @twosix said in Trouble with config file, Error Create Config File:

    Thank you, but that didn’t work

    Uhh, I used that config and it fired up just fine

    Create a working config
    How to add modules

    T 1 Reply Last reply May 8, 2017, 1:08 AM Reply Quote 0
    • B Offline
      bhepler Module Developer @twosix
      last edited by May 8, 2017, 12:28 AM

      @twosix said in Trouble with config file, Error Create Config File:

      I get the unable to validate config error, and gives me a need to create config screen when booted. How do I fix?

      The “need to create config” error message usually means that you have not copied the example configuration file to the production file. You’ll want to copy the config.js.sample file to it’s final destination of config.js. You can use this command (assuming you haven’t changed the paths and you’re using a standard Raspberry Pi):
      cp /home/pi/MagicMirror/config/config.js.example /home/pi/MagicMirror/config/config.js

      T 1 Reply Last reply May 8, 2017, 1:17 AM Reply Quote 0
      • C Offline
        cowboysdude Module Developer
        last edited by yawns May 8, 2017, 3:25 PM May 8, 2017, 12:42 AM

        Yes you must do a cp to have a config.js to start with BUT before you make changes ALWAYS have a backup that works… ALWAYS.

        IF you’re not sure and you’re having config.js problems run it through here …

        http://esprima.org/demo/validate.html

        It will tell you where your errors are… I mean it’s nice of people to fix things but if you’re working on this at 2AM and nobody is here… you’re not getting your mirror to work until the next day ;)

        T 1 Reply Last reply May 8, 2017, 1:14 AM Reply Quote 0
        • T Offline
          twosix @Mykle1
          last edited by May 8, 2017, 1:08 AM

          @Mykle1 I did the same, I fired up the sample config and it worked fine, but then after I put my stuff in, it gave me the “WARNING? Could not validate config file. Please correct syntax errors. Starting with default configuration.”

          And then when I loads up it says, “Please create config file.”

          M 1 Reply Last reply May 8, 2017, 1:24 AM Reply Quote 0
          • T Offline
            twosix @cowboysdude
            last edited by May 8, 2017, 1:14 AM

            @cowboysdude Thank you, I ran that through my code and there appears to be no problems…I just can’t figure out what the problem is…I boot the mirror up normally by going:

            cd Magic Mirror
            npm start

            and then I get the “WARNING? Could not validate config file. Please correct syntax errors. Starting with default configuration.”

            and then when it loads the “Please create config file.”

            1 Reply Last reply Reply Quote 0
            • T Offline
              twosix @bhepler
              last edited by May 8, 2017, 1:17 AM

              @bhepler Thank you! I did this and it reset my config file, and that booted up fine, but when I put my information in, and started it:
              cd MagicMirror
              npm start

              I got the "WARNING? Could not validate config file. Please correct syntax errors. Starting with default configuration.”

              Then load it said “Please create config file.”

              1 Reply Last reply Reply Quote 1
              • M Offline
                Mykle1 Project Sponsor Module Developer @twosix
                last edited by May 8, 2017, 1:24 AM

                @twosix said in Trouble with config file, Error Create Config File:

                it worked fine, but then after I put my stuff in
                Please correct syntax errors.

                If the default config works then this should be telling you that you are not making config entries correctly. Start again from the default config, making sure it runs, then add one module at a time, making sure it still works after each entry, then backing up your config each time you successfully add a module. I don’t know what else to offer you. I fixed your first config and tested it.

                Create a working config
                How to add modules

                T 1 Reply Last reply May 8, 2017, 2:30 PM Reply Quote 1
                • T Offline
                  twosix @Mykle1
                  last edited by May 8, 2017, 2:30 PM

                  @Mykle1 Okay I did that, and figured out the problem is my calendar…is there anyway I can fix that?

                  S 1 Reply Last reply May 8, 2017, 3:31 PM Reply Quote 0
                  • S Offline
                    strawberry 3.141 Project Sponsor Module Developer @twosix
                    last edited by May 8, 2017, 3:31 PM

                    @twosix in all your examples you’re escaping the closing quote

                    {
                      symbol: "calendar-check-o ",
                      url: "webcal://p55-calendars.icloud.com/published/2/TDWYwJjbv2BpM3HLxxxxxxxxxxxxxxxxxvZM-3TNpXNgZXsi192SI7M6pxxxxxxxxxxxxxxxxxxxxxxxXZCkcApre7Kg\"
                    }
                    

                    you can see there that the next line is green which indicates that the string isn’t closed there probably. This happen because of the \ right in front of the quote character.

                    If the backslash doesn’t belong to your string remove it, if you need the backslash you have to escape the backslash by adding a second. like this:

                    {
                      symbol: "calendar-check-o ",
                      url: "webcal://p55-calendars.icloud.com/published/2/TDWYwJjbv2BpM3HLxxxxxxxxxxxxxxxxxvZM-3TNpXNgZXsi192SI7M6pxxxxxxxxxxxxxxxxxxxxxxxXZCkcApre7Kg\\"
                    }
                    

                    here you can see that the closing curly brace is no longer highlighted in green because the string is closed properly.

                    Please create a github issue if you need help, so I can keep track

                    1 Reply Last reply Reply Quote 2
                    • 1
                    • 2
                    • 2 / 2
                    2 / 2
                    • First post
                      8/12
                      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