Skip to content
Back

A target with the same ID already exists.

  • 0
  • Self Hosted
  • Auth
  • Android
nachol_
26 Feb, 2025, 09:25

I do this for android notifications

TypeScript
      ID.unique(), // targetId
      token, // identifier
      this._pushNotificationsProvider
)```
after user login, I don't check previous target exists neither delete target when user logs out
but I'm using  `ID.unique()` so why does it launch this error?
TL;DR
Developers are experiencing an error stating "A target with the same ID already exists" when trying to update the user's phone from the dashboard. The issue might be related to not checking if a previous target exists or deleting the target when the user logs out. Despite using `ID.unique()`, the error persists. Solution: Implement a check to verify if the target already exists before creating a new one, and consider deleting the target when the user logs out to prevent conflicts.
Overlight Dev
26 Feb, 2025, 09:53

Same stated happening for me when I try to update the User phone from the app write dashboard (selfhosted-latest)

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