Cannot connect to Nextcloud

Hi, I am trying to connect to my nextcloud instance using the access token method. Unfortunately after executing the node, I always got:
Error: NextCloud Error. Status Code: undefined. Message: Error: connect ECONNREFUSED 127.0.0.1:443
at Object.nextCloudApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/NextCloud/GenericFunctions.js:40:15)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Can you please help me?

Welcome to the community @weits!

Are you sure that the “Web DAV URL” is correct?
It should look similar to this: https://whatever.com/remote.php/webdav

Thank you for welcoming me, I am impressed by possibilities which n8n brings to me.

My WebDAV URL in credentials settings is exactly this. I tried https://whatever.com/remote.php/dav/files/<username> too but with no luck.

Also I tried OAuth method, which is unavailable due to some bug in Nextcloud in Docker if I understand it right.

Do you know where could I find some logs to find out what is happening?

Thank you!

Can you please try to open this Web DAV URL with the browser and tell me what happens then.

This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client.

I use desktop sync client with the exactly same URL and it works. I think the problem is ECONNREFUSED 127.0.0.1:443 part of the error. I don’t know why it tries to connect to localhost?

Sorry I have sadly also no slightest idea why it would do that. For me, it works perfectly fine and nobody else ever reported a problem like that before. As I do not have any idea right now what is happening here and I can also not reproduce it, can I sadly not see a way how I can be of any further help here. I tried to Google that issue and looked through those answers but nothing helpful. Maybe somebody else with more Nextcloud experience has an idea.

I now understand! I forgot that I changed my /etc/hosts file when fiddling with something else to point nextcloud domain to 127.0.0.1 :-). I am sorry and I hope next time I will ask something more clever :wink: Thank you for your patience :+1:

Glad that you found the problem.