Read the statement by Michael Teeuw here.
Default Calendar & Nextcloud Calendar - CERT_HAS_EXPIRED
-
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.
-
Same problem here with CALEXT2 and MM newsfeed module.
-
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;
- upgrade your node version with
--use-openssl-ca
flag. (at least node ver 16) - modify source code. Check
agentOptions.rejectUnauthorized
offetch
orrequest
(anywhich in source). I think that value or equivalent option should befalse
(to skip unauthorized request) - DANGER :
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0
This is dirty and dangerous but quick solution.
- upgrade your node version with
-
2.16 dropped request and moved to node-fetch
looks like older modules using request are still working, but fetch maybe not
-
@mmrize
Get the same error you write :( -
@assassins Which method did you use?
-
@mmrize
request -
@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. -
@mmrize
Same error with 2.17.0 with both node 14 and 16 -
@assassins
Well, sorry. I have no idea anymore.