Appwrite Push Notifications: "Unknown error" when sending to valid (anonymous) topic subscriber
- 0
- 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
Recommended threads
- Custom email templates not working
Hey there, I've tried to add custom email templates to my appwrite auth's emails (password reset, email verification, session emails). I added my own html/css a...
- Realtime fails to connect/reconnect
I have been having trouble with my appwrite realtime connection for a few days now. Before the code that was working fine now is giving failed to connect errors
- How to stop my project from being frozen...
So we encountered an error in production because our appwrite project had been frozen due to inactivity. Is there any way of automating checking in and activity