Back

Could not list users: fetch failed

  • 0
  • Self Hosted
  • Functions
  • REST API
RainyDev
15 Oct, 2024, 22:29

Hi,

I'm trying to create a function for my App. But somehow I keep getting this error when trying to use the sdk in the function (NodeJS).

I used this template and updated the sdk version to 14.1.0 (https://github.com/appwrite/templates/blob/main/node/starter/src/main.js)

Why do I keep getting this error? Its the only error I can see in the execution tab.

SSL is all set up correctly (selfhosted). There is also no firewall preventing the request.

Thanks for quick help in advance!

TL;DR
Developers fixed the issue by changing the "hostnames" file on the server (not in docker) to set the API endpoint to the actual public DNS or IP address instead of 127.0.0.1. This resolved the error that was occurring while trying to list users in the Appwrite SDK.
RainyDev
15 Oct, 2024, 22:37

With go i got a better error: Could not list users: Get "https://api.XXXX/v1/users": dial tcp 127.0.1.1:443: connect: connection refused

How can I fix this? I use normal, public dns for appwrite

RainyDev
15 Oct, 2024, 22:37

Why does it try to dial in local address? 😄

hamed
15 Oct, 2024, 23:09

the api endpoint should be set to the actual public DNS or IP address, not 127.0.0.1 👀

RainyDev
15 Oct, 2024, 23:30

It is. Fixed it my changing "hostnames" file on Server (not in docker) 😄

hamed
15 Oct, 2024, 23:32

Great to hear 🙂

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more