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.

    WARNING! Could not validate config file

    Scheduled Pinned Locked Moved Troubleshooting
    9 Posts 2 Posters 900 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Hergo
      last edited by

      Bonjour a tous,
      Etant debutant j’ai tout de meme reussi a creer la mirroir mais je ne m’en suis pas servi pendant un moment et quand j’ai voulu le remettre en marche il ne fonctionnais plus forcement donc j’ai refait mon fichier config.js mais quand je lance npm start le message :
      WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:49
      ]
      ^

      SyntaxError: Unexpected token ]
      at Module._compile (internal/modules/cjs/loader.js:722:23)
      at Object.Module._extensions…js (internal/modules/cjs/loader.js:798:10)
      at Module.load (internal/modules/cjs/loader.js:645:32)
      at Function.Module._load (internal/modules/cjs/loader.js:560:12)
      at Module.require (internal/modules/cjs/loader.js:685:19)
      at require (internal/modules/cjs/helpers.js:16:16)
      at loadConfig (/home/pi/MagicMirror/js/app.js:67:12)
      at App.start (/home/pi/MagicMirror/js/app.js:202:3)
      at Object. (/home/pi/MagicMirror/js/electron.js:126:7)
      at Module._compile (internal/modules/cjs/loader.js:786:30)
      s’affiche et le mirroir affiche un message d’erreur lui aussi je ne comprend pas pourquoi pourtant j’ai tout verifier sur plusieur site etc et aucun probleme … HELP

      1 Reply Last reply Reply Quote 0
      • ? Offline
        A Former User
        last edited by

        Bonjour,

        Peux-tu, éventuellement, coller ton config.js ici que je puisse l’inspecter ?

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

          Merci de ta reponse voici mon config.js (bien sur j’ai cacher mes id)

          /* 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:
          // - “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”], // Set [] to allow all IP addresses
          // or add a specific IPv4 of 192.168.1.5 :
          // [“127.0.0.1”, “::ffff:127.0.0.1”, “::1”, "::ffff$
          // or IPv4 range of 192.168.3.0 --> 192.168.3.15 us$
          // [“127.0.0.1”, “::ffff:127.0.0.1”, “::1”, "::ffff$

              language: "fr",
              timeFormat: 24,
              units: "metric",
          
              modules: [
                      {
                              module: "alert",
                      },
                      {
                              module: "updatenotification",
                              position: "top_bar"
                      },
                      {
                              module: "clock",
                              position: "top_left"
                      },
                      {
                              module: "calendar",
                              header: "Jours Fériés",
                              position: "top_left",
                              config: {
                                      calendars: [
                                              {
                                                      symbol: "calendar-check",
                                                      url: "webcal://www.webcal.fi/cal.php?id=180&format=ics&wrn=1&wp=4&wf=53&color=%23FF3100&cntr=fr&lang=fr&rid=wc"
                                      ]
                              }
                      },
                      {
                              module: "MMM-DarkSkyForecast",
                              header: "Weather",
                              position: "top_right",
                              classes: "default everyone",
                              disabled: false,
                              config: {
                                      apikey: "5591aa062fc3d9a59b191108d4fa2429",
                                      latitude: "49.012830",
                                      longitude: "2.251830",      
                                      iconset: "4c",
                                      concise: false,
                                      forecastLayout: "tiled" ,
                                      language: "fr" ,
                                      label_timeFormat: "k[h]" ,
                                      hourlyForecastInterval: "0" ,
                                      maxHourliesToShow: "0" ,
                                      maxDailiesToShow: "0" ,
                                      label_high: "Max" ,
                                      label_low: "Min" 
                              }
                      },
                      {
                              module: "weatherforecast",
                              position: "top_right",
                              header: "Prévisions à",
                              config: {
                                      location: "Saint-Leu-la-Foret",
                                      locationID: "2978768",  //ID from http://bulk.openwea$
                                      appid: « XXXX »
                              }
                      },
                      {
                              module: "newsfeed",
                              position: "bottom_bar",
                              config: {
                                      feeds: [
                                              {
                                                      title: "20 Minutes",
                                                      url: "http://www.20minutes.fr/rss/actu-france.xml"
                                              }
                                      ],
                                      showSourceTitle: true,
                                      showPublishDate: true,
                                      broadcastNewsFeeds: true,
                                      broadcastNewsUpdates: true
                              }
                      },
                      { 
                              module : "MMM-NowPlayingOnSpotify" , 
                              position : "bottom_left" ,
                              config : { 
                                        showCoverArt : false , 
                                        clientID : « XXXX » , 
                                        clientSecret : « XXXX » , 
                                        accessToken : « XXXX » , 
                                        refreshToken : « XXXX » 
                              } 
                      },
                      {
                              module: 'MMM-Transilien',
                              position: 'top_left',
                              header:'Persan Beaumont vers St-Denis',
                              config:{
                                      departUIC:"87276469",
                                      arriveeUIC:"87271015",
                                      login: »XXXX », // You must add your API login and password
                                      password:"",
                                      showRemainingTime: true
                              }
                      },
          
              ]
          

          };

          /*************** DO NOT EDIT THE LINE BELOW ***************/
          if (typeof module !== “undefined”) {module.exports = config;}

          1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User
            last edited by

            @Hergo said in WARNING! Could not validate config file:

            > {
            >                     module: "calendar",
            >                     header: "Jours Fériés",
            >                     position: "top_left",
            >                     config: {
            >                             calendars: [
            >                                     {
            >                                             symbol: "calendar-check",
            >                                             url: "webcal://www.webcal.fi/cal.php?id=180&format=ics&wrn=1&wp=4&wf=53&color=%23FF3100&cntr=fr&lang=fr&rid=wc"
            >                             ]
            >                     }
            >             },
            

            il manque une parenthese. une a été ouverte mais pas fermé par la suite

            essaye avec ceci en remplacement:

                        {
                                module: "calendar",
                                header: "Jours Fériés",
                                position: "top_left",
                                config: {
                                        calendars: [
                                                {
                                                        symbol: "calendar-check",
                                                        url: "webcal://www.webcal.fi/cal.php?id=180&format=ics&wrn=1&wp=4&wf=53&color=%23FF3100&cntr=fr&lang=fr&rid=wc"
                                                }
                                        ]
                                }
                        },
            
            1 Reply Last reply Reply Quote 0
            • H Offline
              Hergo
              last edited by

              Effectivement, merci mais j’ai toujours le meme message : “please create a config file” sur l’ecran …

              1 Reply Last reply Reply Quote 0
              • ? Offline
                A Former User
                last edited by A Former User

                ok, j’ai lancer et corriger:

                [2020-07-12 13:37:39.040] [LOG]    Starting MagicMirror: v2.12.0
                [2020-07-12 13:37:39.043] [LOG]    Loading config ...
                [2020-07-12 13:37:39.053] [LOG]    Loading module helpers ...
                [2020-07-12 13:37:39.054] [LOG]    No helper found for module: alert.
                [2020-07-12 13:37:39.071] [LOG]    Initializing new module helper ...
                [2020-07-12 13:37:39.071] [LOG]    Module helper loaded: updatenotification
                [2020-07-12 13:37:39.071] [LOG]    No helper found for module: clock.
                [2020-07-12 13:37:40.434] [LOG]    Initializing new module helper ...
                [2020-07-12 13:37:40.434] [LOG]    Module helper loaded: calendar
                [2020-07-12 13:37:40.435] [LOG]    No helper found for module: MMM-DarkSkyForecast.
                [2020-07-12 13:37:40.435] [LOG]    No helper found for module: weatherforecast.
                [2020-07-12 13:37:40.575] [LOG]    Initializing new module helper ...
                [2020-07-12 13:37:40.575] [LOG]    Module helper loaded: newsfeed
                [2020-07-12 13:37:40.575] [LOG]    No helper found for module: MMM-NowPlayingOnSpotify.
                [2020-07-12 13:37:40.576] [LOG]    No helper found for module: MMM-Transilien.
                [2020-07-12 13:37:40.576] [LOG]    All module helpers loaded.
                [2020-07-12 13:37:40.613] [LOG]    Starting server on port 8080 ... 
                [2020-07-12 13:37:40.617] [LOG]    Server started ...
                [2020-07-12 13:37:40.617] [LOG]    Connecting socket for: updatenotification
                [2020-07-12 13:37:40.618] [LOG]    Connecting socket for: calendar
                [2020-07-12 13:37:40.618] [LOG]    Starting node helper for: calendar
                [2020-07-12 13:37:40.618] [LOG]    Connecting socket for: newsfeed
                [2020-07-12 13:37:40.618] [LOG]    Starting node helper for: newsfeed
                [2020-07-12 13:37:40.618] [LOG]    Sockets connected & modules started ...
                [2020-07-12 13:37:40.674] [LOG]    Launching application.
                [2020-07-12 13:37:41.548] [LOG]    Create new calendar fetcher for url: http://www.webcal.fi/cal.php?id=180&format=ics&wrn=1&wp=4&wf=53&color=%23FF3100&cntr=fr&lang=fr&rid=wc - Interval: 300000
                [2020-07-12 13:37:41.564] [LOG]    Create new news fetcher for url: http://www.20minutes.fr/rss/actu-france.xml - Interval: 300000
                [2020-07-12 13:37:41.925] [INFO]   Calendar-Fetcher: Broadcasting 13 events.
                [2020-07-12 13:37:42.321] [INFO]   Newsfeed-Fetcher: Broadcasting 20 items.
                

                config.js:

                /* 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:
                // - “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"], // Set [] to allow all IP addresses
                // or add a specific IPv4 of 192.168.1.5 :
                // [“127.0.0.1”, “::ffff:127.0.0.1”, “::1”, "::ffff$
                // or IPv4 range of 192.168.3.0 --> 192.168.3.15 us$
                // [“127.0.0.1”, “::ffff:127.0.0.1”, “::1”, "::ffff$
                language: "fr",
                    timeFormat: 24,
                    units: "metric",
                
                    modules: [
                            {
                                    module: "alert",
                            },
                            {
                                    module: "updatenotification",
                                    position: "top_bar"
                            },
                            {
                                    module: "clock",
                                    position: "top_left"
                            },
                            {
                                    module: "calendar",
                                    header: "Jours Fériés",
                                    position: "top_left",
                                    config: {
                                            calendars: [
                                                    {
                                                            symbol: "calendar-check",
                                                            url: "webcal://www.webcal.fi/cal.php?id=180&format=ics&wrn=1&wp=4&wf=53&color=%23FF3100&cntr=fr&lang=fr&rid=wc"
                                                    }
                                            ]
                                    }
                            },
                            {
                                    module: "MMM-DarkSkyForecast",
                                    header: "Weather",
                                    position: "top_right",
                                    classes: "default everyone",
                                    disabled: false,
                                    config: {
                                            apikey: "5591aa062fc3d9a59b191108d4fa2429",
                                            latitude: "49.012830",
                                            longitude: "2.251830",      
                                            iconset: "4c",
                                            concise: false,
                                            forecastLayout: "tiled" ,
                                            language: "fr" ,
                                            label_timeFormat: "k[h]" ,
                                            hourlyForecastInterval: "0" ,
                                            maxHourliesToShow: "0" ,
                                            maxDailiesToShow: "0" ,
                                            label_high: "Max" ,
                                            label_low: "Min" 
                                    }
                            },
                            {
                                    module: "weatherforecast",
                                    position: "top_right",
                                    header: "Prévisions à",
                                    config: {
                                            location: "Saint-Leu-la-Foret",
                                            locationID: "2978768",  //ID from http://bulk.openwea$
                                            appid: " XXXX "
                                    }
                            },
                            {
                                    module: "newsfeed",
                                    position: "bottom_bar",
                                    config: {
                                            feeds: [
                                                    {
                                                            title: "20 Minutes",
                                                            url: "http://www.20minutes.fr/rss/actu-france.xml"
                                                    }
                                            ],
                                            showSourceTitle: true,
                                            showPublishDate: true,
                                            broadcastNewsFeeds: true,
                                            broadcastNewsUpdates: true
                                    }
                            },
                            { 
                                    module : "MMM-NowPlayingOnSpotify" , 
                                    position : "bottom_left" ,
                                    config : { 
                                              showCoverArt : false , 
                                              clientID : " XXXX " , 
                                              clientSecret : " XXXX " , 
                                              accessToken : " XXXX " , 
                                              refreshToken : " XXXX " 
                                    } 
                            },
                            {
                                    module: 'MMM-Transilien',
                                    position: 'top_left',
                                    header:'Persan Beaumont vers St-Denis',
                                    config:{
                                            departUIC:"87276469",
                                            arriveeUIC:"87271015",
                                            login: "XXXX ", // You must add your API login and password
                                            password:"",
                                            showRemainingTime: true
                                    }
                            },
                
                    ]
                    };
                
                /*************** DO NOT EDIT THE LINE BELOW ***************/
                if (typeof module !== "undefined") {module.exports = config;}
                

                attention:
                “ n’est pas la meme chose que "
                c’est la source des erreurs
                il faut utiliser ceci "

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

                  Merci je ne sais pas ce que tu a corriger mais ca fonctionne :) merci beaucoup

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

                    Je reviens vers vous car j’ai un probleme avec le modules MMM-Transilien qui n’affiche pas de train et j’ai le message “MMM-Transilien : Error: certificate has expired” qui est afficher dans mon terminal … pourrais tu m’aider (ou je dois refaire un topic?)

                    1 Reply Last reply Reply Quote 0
                    • ? Offline
                      A Former User
                      last edited by

                      Désolé, je ne suis pas développeur de ce module, je ne peux pas aider la dessus

                      1 Reply Last reply Reply Quote 0
                      • 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