Appwrite Push Notifications: "Unknown error" when sending to valid (anonymous) topic subscriber
- 0
- 1
- Web
- Sites
- Auth
- Messaging
- Cloud
Hi all,
I'm running into an issue with Appwrite push notifications in my web project. When I try to manually send a notification to a user from the Appwrite web console, I get the following error:
Failed sending to target [target id] with error: Unknown error
There are no errors in the browser frontend or on the Astro website server. Everything appears to be working fine on the client side, and the notification permission flow completes successfully.
Additional context:
When a user enables notifications, they are properly added as a subscriber to the relevant topic(s) via the Appwrite SDK. The topic subscription logic completes without error, and the user’s target ID and topic mapping are stored as expected.
Project context:
- Frontend: Astro + React, using Appwrite JS SDK and Firebase for push notifications.
- Appwrite version: 21.5.0 (npm package)
- Firebase version: 12.11.0
- Notifications are initialized via a function like this:
export function initializeNotifications(options: InitializeNotificationsOptions = {}): NotificationRuntime { /* ... */ }
- The push identifier and target ID are generated and stored in localStorage.
- Topic subscriptions are managed and appear to succeed (no errors thrown).
- Example of the notification state types:
export type NotificationState =
| { kind: "idle"; level: "neutral"; title: string; }
| { kind: "subscribed"; level: "success"; title: string; }
| { kind: "failed"; level: "error"; title: string; canRetry: true; }
// ...etc
- The Appwrite project is configured with messaging enabled, and the topics are set up for push notifications.
What I've tried:
- Double-checked the push target ID and topic subscriptions.
- Verified that the Firebase config and VAPID key are correct.
- Ensured the browser has granted notification permissions.
- No errors in the browser console or network tab.
- No errors in the Astro server logs.
Question:
What could cause Appwrite to return "Unknown error" when sending a notification to a valid target, despite no errors on the frontend or server, and with users properly subscribed to topics? Are there any additional debugging steps or common misconfigurations I should check (especially with Firebase or push token registration)?
Any advice or pointers to relevant Appwrite/Firebase docs would be appreciated!
Just to reiterate appwrite console says they are valid targets
Is there another menu where I can view more detailed logs?
All of these targets are on different browsers and devices
Okay so I updated my api keys and credentials again and now I dont get an error 😁
but the notifications still are not sending
Okay if you guys are sending notifications without any errors but the browser isn't reciving it then your service worker is the problem
Recommended threads
- proccessing problems
A database schema operation is stuck in my Frankfurt project. In the matryq database, the workspaceId attribute of the coaching_activity_entries collection rema...
- User columns stuck on processing
Hi — on Appwrite Cloud (Free), Project ID 69d7dd8200098ed8560c, database mylestone-db. Attributes/columns are stuck in "processing" indefinitely across two coll...
- User column is processing
I am still encountering the processing tag after creating a column in my database. and its not a network or refresh issue, i have refreshed over and over, shutd...