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.

    Default Calendar & Nextcloud Calendar - CERT_HAS_EXPIRED

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    19 Posts 6 Posters 7.9k 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.
    • B Offline
      BasicUser
      last edited by

      I had to reset some stuff on my Mirror and now I cannot get my calendars to sync between my mirror and my Nextcloud calendars.

      This is the logs that I get when it tries to run a fetch.

      pi@raspberrypi:~/MagicMirror/config $ pm2 logs MagicMirror
      [TAILING] Tailing last 15 lines for [MagicMirror] process (change the value with --lines option)
      /home/pi/.pm2/logs/MagicMirror-out.log last 15 lines:
      0|MagicMir | [30.09.2021 18:17.48.972] [LOG]   Create new calendarfetcher for url: https://subdomain.domain.tld/remote.php/dav/calendars/MAINUSER/personal/?export - Interval: 100000
      0|MagicMir | [30.09.2021 18:17.49.194] [LOG]   Create new calendarfetcher for url: https://subdomain.domain.tld/remote.php/dav/calendars/SHARED CALENDAR/shared/?export - Interval: 100000
      0|MagicMir | [30.09.2021 18:17.49.202] [LOG]   Create new calendarfetcher for url: https://subdomain.domain.tld/remote.php/dav/calendars/SHARED CALENDAR/shared-events/?export - Interval: 100000
      0|MagicMir | [30.09.2021 18:17.49.208] [LOG]   Create new calendarfetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 100000
      0|MagicMir | [30.09.2021 18:17.49.348] [INFO]  Checking git for module: MMM-Remote-Control
      0|MagicMir | [30.09.2021 18:17.49.491] [INFO]  Checking git for module: MMM-EasyBack
      0|MagicMir | [30.09.2021 18:17.49.577] [INFO]  Checking git for module: MMM-Todoist
      0|MagicMir | [30.09.2021 18:17.49.653] [INFO]  Checking git for module: MMM-NowPlayingOnSpotify
      0|MagicMir | [30.09.2021 18:17.49.738] [INFO]  Checking git for module: MMM-PlexNowPlaying
      0|MagicMir | [30.09.2021 18:17.49.823] [INFO]  Checking git for module: MMM-learnlanguage
      0|MagicMir | [30.09.2021 18:17.50.225] [INFO]  Checking git for module: MMM-WordOfTheDay
      0|MagicMir | [30.09.2021 18:17.50.298] [LOG]   Refreshed access token because it has expired. Expired at: 18:17:49 now is: 18:17:50
      0|MagicMir | [30.09.2021 18:17.50.652] [INFO]  Checking git for module: MMM-MyScoreboard
      0|MagicMir | [30.09.2021 18:17.50.938] [LOG]   Refreshed access token because it has expired. Expired at: 19:17:50 now is: 18:17:50
      0|MagicMir | [30.09.2021 18:17.51.189] [INFO]  Calendar-Fetcher: Broadcasting 5 events.
      
      /home/pi/.pm2/logs/MagicMirror-error.log last 15 lines:
      0|MagicMir |   code: 'CERT_HAS_EXPIRED'
      0|MagicMir | }
      0|MagicMir | [30.09.2021 18:17.50.035] [ERROR] Calendar Error. Could not fetch calendar:  https://subdomain.domain.tld/remote.php/dav/calendars/SHARED CALENDAR/shared/?export FetchError: request to https://subdomain.domain.tld/remote.php/dav/calendars/SHARED CALENDAR/shared/?export failed, reason: certificate has expired
      0|MagicMir |     at ClientRequest.<anonymous> (/home/pi/MagicMirror/node_modules/node-fetch/lib/index.js:1461:11)
      0|MagicMir |     at ClientRequest.emit (events.js:315:20)
      0|MagicMir |     at TLSSocket.socketErrorListener (_http_client.js:426:9)
      0|MagicMir |     at TLSSocket.emit (events.js:315:20)
      0|MagicMir |     at emitErrorNT (internal/streams/destroy.js:92:8)
      0|MagicMir |     at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
      0|MagicMir |     at processTicksAndRejections (internal/process/task_queues.js:84:21)
      0|MagicMir |  {
      0|MagicMir |   type: 'system',
      0|MagicMir |   errno: 'CERT_HAS_EXPIRED',
      0|MagicMir |   code: 'CERT_HAS_EXPIRED'
      0|MagicMir | }
      
      

      I’m assuming this is on my Nextcloud and not on MM but figured I would post in here to see if anyone has been able to solve this issue before? My nextcloud is selfhosted and behind a reverse proxy.

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

        Same problem here with CALEXT2 and MM newsfeed module.

        Marcus

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

          @m_m

          It seems to be related with this;
          https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

          To fix this there might be a few options;

          1. upgrade your node version with --use-openssl-ca flag. (at least node ver 16)
          2. modify source code. Check agentOptions.rejectUnauthorized of fetch or request (anywhich in source). I think that value or equivalent option should be false (to skip unauthorized request)
          3. DANGER : process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0 This is dirty and dangerous but quick solution.
          S AssassinsA 2 Replies Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @MMRIZE
            last edited by

            2.16 dropped request and moved to node-fetch

            looks like older modules using request are still working, but fetch maybe not

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • AssassinsA Offline
              Assassins @MMRIZE
              last edited by

              @mmrize
              Get the same error you write :(

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

                @assassins Which method did you use?

                AssassinsA 1 Reply Last reply Reply Quote 0
                • AssassinsA Offline
                  Assassins @MMRIZE
                  last edited by

                  @mmrize
                  request

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

                    @assassins
                    I think it’s better to upgrade your node version to v16. (and if possible, electron to v15)
                    Anyway, at this moment, MM 2.17 is released. Try it first.

                    AssassinsA 1 Reply Last reply Reply Quote 0
                    • AssassinsA Offline
                      Assassins @MMRIZE
                      last edited by

                      @mmrize
                      Same error with 2.17.0 with both node 14 and 16

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

                        @assassins
                        Well, sorry. I have no idea anymore.

                        AssassinsA 1 Reply Last reply Reply Quote 0
                        • AssassinsA Offline
                          Assassins @MMRIZE
                          last edited by

                          @mmrize
                          But thanks for you try mate :)

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

                            @assassins a new version is posted 2.17.1 that fixes this problem

                            git pull 
                            npm install 
                            

                            to update manually

                            OR

                            use my upgrade script
                            see https://github.com/sdetweil/MagicMirror_scripts

                            with apply, if not already on 2.17,
                            use force if already on 2.17

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            AssassinsA B 2 Replies Last reply Reply Quote 0
                            • S sdetweil pinned this topic on
                            • AssassinsA Offline
                              Assassins @sdetweil
                              last edited by

                              @sdetweil
                              Thanks alot mate, i Will try to Update om monday 🙆‍♂️🙆‍♂️

                              1 Reply Last reply Reply Quote 0
                              • B Offline
                                BasicUser @sdetweil
                                last edited by

                                @sdetweil I went the git pull && npm install route but now MM will not load

                                0|MagicMirror  | Initializing new module helper ...
                                0|MagicMirror  | [01.10.2021 15:25.04.722] [LOG]   Module helper loaded: MMM-NowPlayingOnSpotify
                                0|MagicMirror  | [01.10.2021 15:25.04.724] [LOG]   No helper found for module: MMM-PlexNowPlaying.
                                0|MagicMirror  | [01.10.2021 15:25.04.729] [ERROR] App threw an error during load
                                0|MagicMirror  | [01.10.2021 15:25.04.734] [ERROR] Error: Cannot find module 'request'
                                0|MagicMirror  | Require stack:
                                0|MagicMirror  | - /home/pi/MagicMirror/modules/MMM-learnlanguage/node_helper.js
                                0|MagicMirror  | - /home/pi/MagicMirror/js/app.js
                                0|MagicMirror  | - /home/pi/MagicMirror/js/electron.js
                                0|MagicMirror  | - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
                                0|MagicMirror  | - 
                                0|MagicMirror  |     at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
                                0|MagicMirror  |     at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
                                0|MagicMirror  |     at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
                                0|MagicMirror  |     at Module._load (internal/modules/cjs/loader.js:732:27)
                                0|MagicMirror  |     at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
                                0|MagicMirror  |     at Module.require (internal/modules/cjs/loader.js:959:19)
                                0|MagicMirror  |     at require (internal/modules/cjs/helpers.js:88:18)
                                0|MagicMirror  |     at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-learnlanguage/node_helper.js:8:15)
                                0|MagicMirror  |     at Module._compile (internal/modules/cjs/loader.js:1078:30)
                                0|MagicMirror  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
                                0|MagicMirror  | [01.10.2021 15:25.04.738] [ERROR] 
                                0|MagicMirror  | Whoops! There was an uncaught exception...
                                0|MagicMirror  | [01.10.2021 15:25.04.755] [ERROR] 
                                0|MagicMirror  | Error: Cannot find module 'request'
                                0|MagicMirror  | Require stack:
                                0|MagicMirror  | - /home/pi/MagicMirror/modules/MMM-learnlanguage/node_helper.js
                                0|MagicMirror  | - /home/pi/MagicMirror/js/app.js
                                0|MagicMirror  | - /home/pi/MagicMirror/js/electron.js
                                0|MagicMirror  | - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
                                0|MagicMirror  | - 
                                0|MagicMirror  |     at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
                                0|MagicMirror  |     at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
                                0|MagicMirror  |     at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
                                0|MagicMirror  |     at Module._load (internal/modules/cjs/loader.js:732:27)
                                0|MagicMirror  |     at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
                                0|MagicMirror  |     at Module.require (internal/modules/cjs/loader.js:959:19)
                                0|MagicMirror  |     at require (internal/modules/cjs/helpers.js:88:18)
                                0|MagicMirror  |     at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-learnlanguage/node_helper.js:8:15)
                                0|MagicMirror  |     at Module._compile (internal/modules/cjs/loader.js:1078:30)
                                0|MagicMirror  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10) {
                                0|MagicMirror  |   code: 'MODULE_NOT_FOUND',
                                0|MagicMirror  |   requireStack: [
                                0|MagicMirror  |     '/home/pi/MagicMirror/modules/MMM-learnlanguage/node_helper.js',
                                0|MagicMirror  |     '/home/pi/MagicMirror/js/app.js',
                                0|MagicMirror  |     '/home/pi/MagicMirror/js/electron.js',
                                0|MagicMirror  |     '/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js',
                                0|MagicMirror  |     undefined
                                0|MagicMirror  |   ]
                                0|MagicMirror  | }
                                0|MagicMirror  | [01.10.2021 15:25.04.757] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
                                0|MagicMirror  | [01.10.2021 15:25.04.759] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
                                0|MagicMirror  | [01.10.2021 15:25.05.202] [LOG]   
                                0|MagicMirror  | Launching application.
                                
                                

                                any ideas?

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

                                  @basicuser said in Default Calendar & Nextcloud Calendar - CERT_HAS_EXPIRED:

                                  Cannot find module ‘request’

                                  sure

                                  see above

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  B 1 Reply Last reply Reply Quote 0
                                  • B Offline
                                    BasicUser @sdetweil
                                    last edited by

                                    @sdetweil I got it figured out by just running npm install request in ~/MagicMirror/

                                    Not super sure what you’re referring to when you say see above though.

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

                                      @basicuser sorry, wrong topic
                                      https://forum.magicmirror.builders/topic/15665/mmm-rtsp-stopped-working-on-2-17-help/2?_=1633110498656

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      1 Reply Last reply Reply Quote 0
                                      • L Offline
                                        LdwVII
                                        last edited by

                                        Great info in this thread, thank you!

                                        Weirdly enough, I’m still experiencing the CERT_HAS_EXPIRED error on the Calendar module, despite updating MagicMirror to 2.17.1.

                                        Had the certificate error on quite a few modules prior, the update fixed all except the Calendar one. Did I miss something or is it perhaps an entirely different error?

                                        (What kind of certificate is this anyway? I had thought an http request wouldn’t need any.)

                                        0|launchMa | [03.10.2021 09:15.33.458] [ERROR] Calendar Error. Could not fetch calendar:  http://kalender.link/ical/best FetchError: request to https://kalender.link/ical/best failed, reason: certificate has expired
                                        0|launchMa |     at ClientRequest.<anonymous> (/home/pi/MagicMirror/node_modules/node-fetch/lib/index.js:1483:11)
                                        0|launchMa |     at ClientRequest.emit (events.js:315:20)
                                        0|launchMa |     at TLSSocket.socketErrorListener (_http_client.js:469:9)
                                        0|launchMa |     at TLSSocket.emit (events.js:315:20)
                                        0|launchMa |     at emitErrorNT (internal/streams/destroy.js:106:8)
                                        0|launchMa |     at emitErrorCloseNT (internal/streams/destroy.js:74:3)
                                        0|launchMa |     at processTicksAndRejections (internal/process/task_queues.js:80:21) {
                                        0|launchMa |   type: 'system',
                                        0|launchMa |   errno: 'CERT_HAS_EXPIRED',
                                        0|launchMa |   code: 'CERT_HAS_EXPIRED'
                                        0|launchMa | }
                                        
                                        S 1 Reply Last reply Reply Quote 0
                                        • S Do not disturb
                                          sdetweil @LdwVII
                                          last edited by

                                          @ldwvii https uses encryption to protect your data while traveling across the internet.

                                          to do this, the receiving host must have registered to support that encryption.

                                          it does this by recording it’s url and encryption type with a certificate authority ( not just anybody can be an authority), they give back a file with a key, with a specific lifetime. ( so u can’t have old sites with bad security hanging around forever)

                                          well the authorities also have expiring rights.
                                          in this case the authority’s certificate expired. (it’s a chain ) … and there was a bug in electron that didn’t handle it correctly

                                          now, in your case u use an unprotected url ( no longer allowed as a standard)

                                          http://kalender.link/ical/best
                                          

                                          no ‘s’ on http and it was redirected to secure (https)… maybe the redirect sent to the wrong place…

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

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