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.

    Calendar not updating

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    95 Posts 4 Posters 78.6k Views 6 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
      matt216 @sdetweil
      last edited by

      @sdetweil ok it’s a big one…

      pi@magicmirror:~/MagicMirror $ npm start
      
      > magicmirror@2.26.0 start
      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      
      [01.01.2024 20:09.38.801] [LOG]   Starting MagicMirror: v2.26.0
      [01.01.2024 20:09.38.814] [LOG]   Loading config ...
      [01.01.2024 20:09.38.823] [DEBUG] config template file not exists, no envsubst
      [01.01.2024 20:09.38.834] [LOG]   Loading module helpers ...
      [01.01.2024 20:09.38.840] [LOG]   No helper found for module: alert.
      [01.01.2024 20:09.38.947] [LOG]   Initializing new module helper ...
      [01.01.2024 20:09.38.949] [LOG]   Module helper loaded: updatenotification
      [01.01.2024 20:09.38.951] [LOG]   No helper found for module: clock.
      [01.01.2024 20:09.39.477] [LOG]   Initializing new module helper ...
      [01.01.2024 20:09.39.480] [LOG]   Module helper loaded: calendar
      [01.01.2024 20:09.40.633] [LOG]   Initializing new module helper ...
      [01.01.2024 20:09.40.636] [LOG]   Module helper loaded: MMM-UKNationalRail
      [01.01.2024 20:09.41.573] [LOG]   Module helper loaded: MMM-Sonos
      [01.01.2024 20:09.41.575] [LOG]   No helper found for module: weather.
      [01.01.2024 20:09.41.585] [LOG]   Initializing new module helper ...
      [01.01.2024 20:09.41.587] [LOG]   Module helper loaded: MMM-MoonPhase
      [01.01.2024 20:09.42.084] [LOG]   Initializing new module helper ...
      [01.01.2024 20:09.42.085] [LOG]   Module helper loaded: newsfeed
      [01.01.2024 20:09.42.088] [LOG]   No helper found for module: MMM-WiFiPassword.
      [01.01.2024 20:09.43.354] [LOG]   Initializing new module helper ...
      [01.01.2024 20:09.43.355] [LOG]   Module helper loaded: MMM-MyCommute
      [01.01.2024 20:09.43.357] [LOG]   No helper found for module: MMM-EyeCandy.
      [01.01.2024 20:09.43.469] [LOG]   Initializing new module helper ...
      [01.01.2024 20:09.43.469] [LOG]   Module helper loaded: mmm-hue-lights
      [01.01.2024 20:09.44.432] [LOG]   Initializing new module helper ...
      [01.01.2024 20:09.44.433] [LOG]   Module helper loaded: MMM-HASS
      [01.01.2024 20:09.44.439] [LOG]   Initializing new module helper ...
      [01.01.2024 20:09.44.440] [LOG]   Check MagicMirror² version for node helper 'MMM-ip' - Minimum version: 2.15.0 - Current version: 2.26.0
      [01.01.2024 20:09.44.443] [LOG]   Version is ok!
      [01.01.2024 20:09.44.444] [LOG]   Module helper loaded: MMM-ip
      [01.01.2024 20:09.44.445] [LOG]   All module helpers loaded.
      [01.01.2024 20:09.44.466] [LOG]   Starting server on port 8080 ... 
      [01.01.2024 20:09.44.489] [WARN]  You're using a full whitelist configuration to allow for all IPs
      [01.01.2024 20:09.44.518] [ERROR] Whoops! There was an uncaught exception...
      [01.01.2024 20:09.44.521] [ERROR] Error: listen EADDRINUSE: address already in use 0.0.0.0:8080
          at Server.setupListenHandle [as _listen2] (node:net:1751:16)
          at listenInCluster (node:net:1799:12)
          at doListen (node:net:1948:7)
          at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
        code: 'EADDRINUSE',
        errno: -98,
        syscall: 'listen',
        address: '0.0.0.0',
        port: 8080
      }
      [01.01.2024 20:09.44.522] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [01.01.2024 20:09.44.523] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      
      
      Warning: vkCreateInstance: Found no drivers!
      Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
          at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
          at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)
          at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
          at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
          at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)
      
      
      
      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @matt216
        last edited by sdetweil

        @matt216 pm2 stop all

        then npm start again

        no idea on the Vulcan driver issue…

        what os are u running on what hardware…

        uname -a
        lsb_release -a

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M 1 Reply Last reply Reply Quote 0
        • A avano referenced this topic on
        • M Offline
          matt216 @sdetweil
          last edited by

          @sdetweil

          pi@magicmirror:~ $ uname -a
          Linux magicmirror 6.1.21-v7+ #1642 SMP Mon Apr  3 17:20:52 BST 2023 armv7l GNU/Linux
          pi@magicmirror:~ $ lsb_release -a
          No LSB modules are available.
          Distributor ID:	Raspbian
          Description:	Raspbian GNU/Linux 11 (bullseye)
          Release:	11
          Codename:	bullseye
          

          Stopped and re-started npm… the npm start seems to generate a rolling log output (with some sensitive info), so I’ve selected what I think is relevant to the calendar for my reply. There are no errors/warning this time :)

          [02.01.2024 09:15.55.833] [LOG]   Module helper loaded: calendar
          ...
          [02.01.2024 09:15.58.013] [LOG]   Connecting socket for: calendar
          [02.01.2024 09:15.58.014] [LOG]   Starting node helper for: calendar
          ...
          [02.01.2024 09:16.02.605] [LOG]   Create new calendarfetcher for url: https://my.cal.url - Interval: 120000
          ...
          [02.01.2024 09:16.27.480] [INFO]  Calendar-Fetcher: Broadcasting 380 events from https://my.cal.url.
          [02.01.2024 09:16.47.441] [LOG]   Use existing calendarfetcher for url: https://my.cal.url
          [02.01.2024 09:16.47.442] [INFO]  Calendar-Fetcher: Broadcasting 380 events from https://my.cal.url.
          ...
          [02.01.2024 09:17.12.085] [INFO]  Calendar-Fetcher: Broadcasting 380 events from https://my.cal.url.
          

          Mostly looks ok, but the “use existing calendarfetcher for url:…” concerns me.

          Still, I have an event upcoming soon that should be displaying in my 5 entries that isn’t.

          Thanks

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

            I can also see in pm2 logs:

            0|MagicMir | [02.01.2024 10:11.33.120] [ERROR] Calendar Error. Could not fetch calendar:  https://my.cal.url TypeError: fetch failed
            

            I wonder why.
            Getting the calendar to show in the first place was achieved by changing my baikal calendar WebDAV authentication type to ‘basic’ and setting the same in the calendar module. I’ve confirmed this is still set.

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

              @matt216 well the type error is the problem.
              the calendar.module doesn’t recover after the error.

              can you open an issue on the mm GitHub page, with that info

              are there any errors above that?

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              M 1 Reply Last reply Reply Quote 0
              • M Offline
                matt216 @sdetweil
                last edited by matt216

                @sdetweil None that I can see.

                pi@magicmirror:~/.pm2/logs $ tail --lines=1000 MagicMirror-error.log | grep calendar
                [02.01.2024 10:29.43.758] [ERROR] Calendar Error. Could not fetch calendar:  https://my.cal.url TypeError: fetch failed
                [02.01.2024 10:31.53.769] [ERROR] Calendar Error. Could not fetch calendar:  https://my.cal.url TypeError: fetch failed
                
                

                Will open an issue. Thanks for assisting. I might have a play with a couple of the other calendar modules there are out there…

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

                  @matt216 generally there is a more specific error earlier in the log.

                  if you clear it
                  pm2 flush
                  the restart
                  pm2 restart all

                  you will have the smallest output to look at

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  M 1 Reply Last reply Reply Quote 0
                  • M Offline
                    matt216 @sdetweil
                    last edited by matt216

                    @sdetweil Can’t see any calendar errors in error.log now! :grinning_squinting_face:
                    But still my new events are not showing up when they should…

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

                      https://github.com/MagicMirrorOrg/MagicMirror/issues/3329

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

                        @matt216 thank you… i posted a an additional grep thru the log to the issue

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

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

                          @matt216 cant see any errors… well not with the grep search you do

                          can u do this

                          pm2 stop all
                          cd ~/MagicMirror
                          npm start >somefile.txt 2>&1
                          

                          wait, til UI up with no issues, or no updates

                          ctrl-q on MM screen to end

                          edit the somefile.txt

                          loo at messages after “Starting server on port”

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          M 1 Reply Last reply Reply Quote 0
                          • M Offline
                            matt216 @sdetweil
                            last edited by

                            @sdetweil

                            pi@magicmirror:~/MagicMirror $ cat somefile.txt | grep calendar
                            [02.01.2024 14:56.40.510] [LOG]   Module helper loaded: calendar
                            [02.01.2024 14:56.42.557] [LOG]   Connecting socket for: calendar
                            [02.01.2024 14:56.42.558] [LOG]   Starting node helper for: calendar
                            [02.01.2024 14:56.46.986] [LOG]   Create new calendarfetcher for url: https://my.cal.url - Interval: 120000
                            [02.01.2024 14:57.13.099] [INFO]  Calendar-Fetcher: Broadcasting 379 events from https://my.cal.url.
                            [02.01.2024 14:59.23.139] [ERROR] Calendar Error. Could not fetch calendar:  https://my.cal.url TypeError: fetch failed
                            
                            
                            M 1 Reply Last reply Reply Quote 0
                            • M Offline
                              matt216 @matt216
                              last edited by

                              @sdetweil

                              [02.01.2024 14:59.23.139] [ERROR] Calendar Error. Could not fetch calendar:  https://my.cal.url TypeError: fetch failed
                                  at Object.fetch (node:internal/deps/undici/undici:11576:11)
                                  at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
                                cause: ConnectTimeoutError: Connect Timeout Error
                                    at onConnectTimeout (node:internal/deps/undici/undici:8522:28)
                                    at node:internal/deps/undici/undici:8480:50
                                    at Immediate._onImmediate (node:internal/deps/undici/undici:8511:13)
                                    at process.processImmediate (node:internal/timers:476:21) {
                                  code: 'UND_ERR_CONNECT_TIMEOUT'
                                }
                              }
                              

                              Timeout…
                              Let me know if the full somefile.txt by email is still wanted.

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

                                @matt216 no… not needed…

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                M 1 Reply Last reply Reply Quote 0
                                • M Offline
                                  matt216 @sdetweil
                                  last edited by

                                  @sdetweil If I enter my calendar URL in to a web browser I can download the ics file fine, FYI

                                  S 2 Replies Last reply Reply Quote 0
                                  • S Do not disturb
                                    sdetweil @matt216
                                    last edited by

                                    @matt216 yes, it was a momentary delay, which caused the timeout… trying to see why the catch() block didn’t

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

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

                                      @matt216 can u try updating modules/default/calendar/calendarfetcher.js like this
                                      replace lines 58-84 with this . also added this to the issue

                                      		try {  /// new code here     // this will be the new line 58 
                                      
                                      		fetch(url, { headers: headers, agent: httpsAgent })
                                      			.then(NodeHelper.checkFetchStatus)
                                      			.then((response) => response.text())
                                      			.then((responseData) => {
                                      				let data = [];
                                      
                                      				try {
                                      					data = ical.parseICS(responseData);
                                      					Log.debug(`parsed data=${JSON.stringify(data)}`);
                                      					events = CalendarFetcherUtils.filterEvents(data, {
                                      						excludedEvents,
                                      						includePastEvents,
                                      						maximumEntries,
                                      						maximumNumberOfDays
                                      					});
                                      				} catch (error) {
                                      					fetchFailedCallback(this, error);
                                      					scheduleTimer();
                                      					return;
                                      				}
                                      				this.broadcastEvents();
                                      				scheduleTimer();
                                      			})
                                      			.catch((error) => {
                                      				fetchFailedCallback(this, error);
                                      				scheduleTimer();
                                      			});
                                      		}    // new code here =========
                                      		catch(error){
                                                           console.error( "fetch for calendar url" +url + "failed error="+error.code);
                                                          fetchFailedCallback(this, error);
                                                          scheduleTimer();
                                      		}   // end new code ===== 
                                      

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      M 1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        matt216 @sdetweil
                                        last edited by

                                        @sdetweil Doesn’t like that - mirror won’t load. Got to pick up my little boy now, so reverted back (mirror loads ok again). Will try again and look at logs.

                                        S M 2 Replies Last reply Reply Quote 0
                                        • S Do not disturb
                                          sdetweil @matt216
                                          last edited by sdetweil

                                          @matt216 u are replacing the whole block, right…

                                          replace lines 58-84 in original with that

                                          lmk

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

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

                                            @sdetweil can you tell I’m not a developer…?!

                                            Ok, I’ve replaced the whole block, then pm2 stop all, cd ~/MagicMirror, npm start…

                                            Mirror starts but still no new calendar events are showing where I would expect to be. Interestingly I can see that edits to existing events that I’ve made are showing up on the mirror, so there is some communication. Just no new events are being picked up.

                                            Thanks again,
                                            Matt

                                            M S 2 Replies 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
                                            • 3
                                            • 4
                                            • 5
                                            • 5 / 5
                                            • 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