Skip to content
Back

Appwrite Push Notifications: "Unknown error" when sending to valid (anonymous) topic subscriber

  • 0
  • Web
  • Sites
  • Auth
  • Messaging
  • Cloud
BossDaily
31 Mar, 2026, 19:28

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:

TypeScript
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:
TypeScript
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:
TypeScript
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!

TL;DR
Issue: "Unknown error" received when sending Appwrite push notifications to valid topic subscribers; no errors on frontend or server. Resolution: - Check push target ID and topic subscriptions. - Verify Firebase config and VAPID key. - Ensure notification permissions are granted on the browser. Additional Information: - Appwrite project setup includes messaging and push notification topics. - No errors in browser console or network tab. - No errors in Astro server logs. - Appwrite version: 21.5.0, Firebase version: 12.11.0. - Frontend: Astro + React, using Appwrite JS SDK and Firebase. -
BossDaily
31 Mar, 2026, 19:35

Just to reiterate appwrite console says they are valid targets

BossDaily
31 Mar, 2026, 19:36

Is there another menu where I can view more detailed logs?

BossDaily
31 Mar, 2026, 19:36

All of these targets are on different browsers and devices

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