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.

    MMM-GoogleMapsTraffic freezes Magic Mirror

    Scheduled Pinned Locked Moved Transport
    21 Posts 7 Posters 10.2k Views 10 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
      MacMirror
      last edited by

      For a long time a had the issue that MagicMirror freezes after a couple of hours. Finally I found out that after disabling the module GoogleMapsTrafic the error won’t occur.

      In the console the module produces 2 errors:

      js?key=xxxxxxxxxx:121 You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.
      sh @ js?key= xxxxxxxxxx:121
      Ah @ js?key= xxxxxxxxxx:119
      google.maps.Load @ js?key= xxxxxxxxxx:18
      (anonymous) @ js?key= xxxxxxxxxx:208
      (anonymous) @ js?key= xxxxxxxxxx:208
      
      MMM-GoogleMapsTraffic.js:77 Uncaught TypeError: Cannot read property 'length' of undefined
          at HTMLScriptElement.script.onload (MMM-GoogleMapsTraffic.js:77)
      script.onload @ MMM-GoogleMapsTraffic.js:77
      

      My config is quite simple and I couldn’t find a way to avoid these errors.

      {
              	module: 'MMM-GoogleMapsTraffic',
      	      	position: 'center',
              	config: {
                      	key: 'xxxxxxxxxx',
                      	lat: 52.5202362,
                      	lng: 13.3663832,
                      	height: '800px',
                      	width: '780px',
      			zoom: 12,
      			updateInterval: 300000, //5 Minuten
      			styledMapType: 'standard',
                      	disableDefaultUI: true,
      			}
      },
      

      Does anybody experiences this problem?
      Every help is highly appreciated.

      D 1 Reply Last reply Reply Quote 2
      • D Offline
        dazza120 @MacMirror
        last edited by

        @macmirror yep I too have the problem of the mirror crashing on me with this module I have no idea how to fix it either.

        1 Reply Last reply Reply Quote 0
        • M Offline
          MadScientist
          last edited by

          I suspected this module for a while already but I never bothered to get into it. Whenever somebody reported random crashes after some hours they used the MMM-GoogleMapsTraffic module. In my case it is enough to run a cronjob once a day to reload the mirror.

          1 Reply Last reply Reply Quote 0
          • E Offline
            Ernst-Jan
            last edited by

            I have te same probleem with the error MMM-GoogleMapsTraffic.js:77 Uncaught TypeError: Cannot read property ‘length’ of undefined.

            Do some one now what that means

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

              I have the same issue. When I boot up the Magic Mirror in debug mode npm start dev & but the Chrome console tab tells me this nasty thing:

              "You have included the Google Maps JavaScript API multiple times on this page." 
              "This may cause unexpected errors."
              

              However, everything looks perfectly nice on my MagicMirror.
              All modules are successfully loaded, including “MMM-GoogleMapsTraffic”.

              But on the next day, the latest my screen is entirely black.
              It’s exactly the same thing as reported in this thread.

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @drfukc
                last edited by

                @drfukc it appears the api had trouble, and the module did not handle the error

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  @sdetweil
                  yes, that’s the case, the module is running fine until it turns the monitor black (after several hours).
                  There are more people in different threads having the same issue.
                  The module author does not seem to respond.
                  My workaround is a regular cron job restarting the MagicMirror.

                  S 1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @drfukc
                    last edited by sdetweil

                    @drfukc I am away til later today. I will look at it. One of my modules gets photos from google

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 1
                    • D Offline
                      dazza120
                      last edited by

                      Yep same I use cron job but would rather not have too, also this might be where all my ram goes as well, great if someone can look at this module

                      1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil
                        last edited by

                        anybody want to try my updates

                        1. load script once, once dom created
                        2. improve process , handle lost config error

                        https://github.com/sdetweil/MMM-GoogleMapsTraffic

                        rename your existing folder out of the way
                        then, from MM/modules folder, git clone my repo, and restart MM
                        no changes to module config

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        D 1 Reply Last reply Reply Quote 1
                        • D Offline
                          dazza120 @sdetweil
                          last edited by dazza120

                          @sdetweil I’m getting this when I try to do my that

                          pi@raspberrypi:~/MagicMirror/modules $ git pull https://github.com/sdetweil/MMM-GoogleMapsTraffic
                          warning: no common commits
                          remote: Enumerating objects: 3, done.
                          remote: Counting objects: 100% (3/3), done.
                          remote: Compressing objects: 100% (3/3), done.
                          remote: Total 123 (delta 0), reused 1 (delta 0), pack-reused 120
                          Receiving objects: 100% (123/123), 231.52 KiB | 0 bytes/s, done.
                          Resolving deltas: 100% (53/53), done.
                          From https://github.com/sdetweil/MMM-GoogleMapsTraffic
                           * branch            HEAD       -> FETCH_HEAD
                          fatal: refusing to merge unrelated histories
                          
                          S 1 Reply Last reply Reply Quote 0
                          • S Do not disturb
                            sdetweil @dazza120
                            last edited by sdetweil

                            @dazza120 said in MMM-GoogleMapsTraffic freezes Magic Mirror:

                            git pull https://github.com/sdetweil/MMM-GoogleMapsTraffic

                            no… cannot do that… cannot merge mine with the original
                            what i said in my prior most

                            rename your existing folder out of the way
                            then, from MM/modules folder, git clone my repo, and restart MM
                            

                            u must git clone my repo … so you had to rename the old folder out of the way

                            from MagicMirror/modules

                            mv MMM-GoogleMapsTraffic MMM-GoogleMapsTraffic.original
                            

                            then

                            git clone https://github.com/sdetweil/MMM-GoogleMapsTraffic.git
                            

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

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

                              @sdetweil done mate testing it now

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

                                It’s taken a day or so before it went black, but something is burning the ram it hovers on 4% to 5% free memory

                                S 1 Reply Last reply Reply Quote 0
                                • S Do not disturb
                                  sdetweil @dazza120
                                  last edited by

                                  @dazza120 hm… i am using the default config with my geolocation
                                  and its runs for days and days…

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

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

                                    @sdetweil what is the update times on the maps? Are you using a Pi?

                                    S 1 Reply Last reply Reply Quote 0
                                    • S Do not disturb
                                      sdetweil @dazza120
                                      last edited by

                                      @dazza120 default update cycle is 900,000 milliseconds… so, 15 minutes

                                      I am using an odroid XU4, faster than pi…

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      D J 3 Replies Last reply Reply Quote 1
                                      • D Offline
                                        dazza120 @sdetweil
                                        last edited by

                                        @sdetweil I take it, it has more ram than the Pi too? Which could be why you’ve not experienced it

                                        1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          juantata @sdetweil
                                          last edited by

                                          This post is deleted!
                                          1 Reply Last reply Reply Quote 0
                                          • J Offline
                                            juantata @sdetweil
                                            last edited by juantata

                                            @sdetweil Hi. It gives me this error.

                                            0_1567986839982_d545ac7e-a7ad-4060-8b10-23f27fd8b310-image.png

                                            0_1567986253999_6b3c4a64-8d0a-4090-a2c6-c2e1a51ad7cb-image.png

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