Closed AlexNathan345 closed 3 weeks ago
I'm not experienced with Self-Signed SSL certification. What kind of error or symptom did the module spit out?
This is the error message I get in the MagicMirror2 log:
23.02.2024 09:11.41.391] [ERROR] FetchError: request to https://XX.XXX.XXX.XX:444/remote.php/dav failed, reason: self-signed certificate
at ClientRequest.
I also tried connecting with http:// but this doesn't work either...
The MM2 config is:
{
module: "MMM-CalDAV", // This module works in background, so position
is not needed.
config: {
timeRangeStart: -30, // Get events from 30 days before
timeRangeEnd: 60, // Get events from 60 days from today
servers: [
{ envPrefix: "NEXTCLOUD_",
accountType: 'caldav',
authMethod: 'Basic',
serverUrl: "https://XX.XXX.XXX.XX:444/remote.php/dav",
},
],
}
},
{
module: "calendar",
header: "My upcoming events",
position: "top_left",
config: {
servers: [
{
symbol: "calendar",
url: "http://XX.XXX.XXX.XX:8080/CALDAV/NEXTCLOUD_My_calendar.ics",
auth: { // REQUIRED
user: 'username1', // DEFINED in .env file.
pass: 'password1',
method: 'basic'
},
},
],
}
},
When you try https://USERNAME:PASSWORD@XX.XXX.XXX.XX:444/remote.php/dav
in your browser, what happens?
I get this: This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client.
The error was caused by node-fetch
, a dependency of tsdav
, which this module depends on. So, I cannot do anything at this moment. Maybe node-fetch
seems unable to handle some irregular https certification.
I'll report this error to the node-fetch
developers, but I cannot guarantee that it will be fixed soon. Sorry.
Thanks very much for looking into this. At least now I know that the error isn't in my config. I might try other certificates at some point but don't really need them for NextCloud as it isn't opened up to the internet. But thanks again.
Hmmm.. If I have NextCloud, I could look inside more, but atm I have not enough time to install and play with it. When I have some time, I'll research more.
All good, don't worry too much.
I'll close this issue because I can't help anything. If you have any additional topic, I'll reopen it again.
Unfortunately, I'm unable to to use this module with my NextCloud installation as my SSL certificates are self-signed.
Is there a way to allow for self-signed certificates or disabling the check? Or a step-by-step guide on how to set this up successfully with NextCloud?
Thanks very much for your help!