
Im currently trying to get this example to work
late final Session session;
try {
session = await account.getSession(sessionId: "current");
} on AppwriteException catch (e) {
print(e.message);
session = await account.createEmailPasswordSession(
email: "t@t.t", password: "testtest");
}
print("Session: $session");
final realtime = Realtime(client);
final realtimeSub = realtime.subscribe(
["documents"],
);
realtimeSub.stream.listen((event) {
print("Realtime event");
});
await Future.delayed(const Duration(seconds: 3));
final customer = {
"id": 123456,
"name": "John Doe",
};
final response = await database.createDocument(
databaseId: "default",
collectionId: "customers",
documentId: ID.unique(),
data: customer,
);
print("Document: $response");
final customers = await database.listDocuments(
databaseId: "default",
collectionId: "customers",
);
print("Customers: ${customers.documents}");
If the collections has create permission for the user and document security enabled then i dont receive a realtime event If the collection has the same permissions + read permissions for guests then im able to receive the realtime event
So im not sure what exactly im doing wrong. Am i creating the subscription wrong or am i missing something with the permissions?
Recommended threads
- Having errors migrating to cloud
Project will not migrate compeltely
- Appwrite realtime stopped working all of...
In our production environment, Appwrite Realtime suddenly stopped working and no updates are coming through , can you confirm if there are any known issues?
- 503 Timeout when Updating or Upserting D...
Hey I’m running into an issue when trying to update or upsert a row in Appwrite. The request hangs for a while and then throws this error: ``` AppwriteException...
