Skip to content
Back

Issue with users.list on Appwrite self-hosted 1.6.1

  • 0
  • Self Hosted
  • React Native
  • Auth
lurxylux
31 Aug, 2025, 20:32

Hi all,

I am self-hosting an Appwrite instance with the version 1.6.1 on a remote server and am running a web-app written in React in a container on the same host. My web-app is using node-appwrite version 13.0.0.

On one page, I need to be able to render information about all users so I use a Server Page to call Users.list to get all users to then pass that over to the Client Page.

That means, my page.tsx I have this code:

TypeScript

    const prefs = await getAllUserPreferences();

    return <ClientPage userPreferences={prefs} />
}

where the method getAllUserPreferences() looks like this:

TypeScript
// src/lib/server/appwrite.js
"use server";
import { Account, Client, Query, Teams, Users } from "node-appwrite";

export async function getAllUserPreferences() {
  const client = new Client()
    .setEndpoint(process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT)
    .setProject(process.env.NEXT_PUBLIC_APPWRITE_PROJECT)
    .setKey(process.env.NEXT_APPWRITE_KEY);
  ;
  const users = new Users(client);

  let filteredUserList = []
  let userList = await users.list([Query.limit(100)])

  for (const user of userList.users) {
    const prefs= users.getPrefs(user_id)
    filteredUserList.push({ $id: user.$id, name: user.name, preferences: prefs, email: user.email });
  }

  return filteredUserList;
}

Usually this works without any issues. If a new user registers though, this new user is not included in the return from users.list(). E.g., today a new user registered himself on my Web App and when I now open this page, I only get the information for every other user but not the new one.

The strange thing with this issue is that I only get it on the live Web App. If I build my project locally and run it, I always get all users. Also, after I update my App and upload it to live, it works as well.

I also checked if there is some caching that is interfering but I was able to exclude that as a reason.

Does anybody have an idea what causes this?

TL;DR
Developers are encountering an issue with users.list on their self-hosted Appwrite 1.6.1 instance, where newly registered users are not fetched on the live web app but are included when running it locally. The problem seems to occur intermittently. The cause is unclear, but it might be related to caching.
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