Skip to content
Back

Error while send push and device register many times a new target

  • 0
  • Flutter
  • Messaging
  • Apple
  • Cloud
  • Self Hosted
SeLi
19 Jan, 2025, 22:33

Hello, I was create a auth file on flutter. This is working. But I get 2 issues. If I re login it create each time a new target with that push. I dont know how to check all targets based on user to not create for same device token a new target. And if I try to send message I get the following error on backend Failed sending to targets with error: Cannot access offset of type string on string I was add the providerId who I was get once I create the appleapn.

I hope some can help me to fix that file. 😦

Best, Sebastian

TL;DR
Issue: Developers facing problems with sending push notifications and registering devices multiple times as new targets. Solution: To prevent creating new targets for the same device token, developers can check all targets based on the user. Additionally, the error "Cannot access offset of type string on string" when sending messages can be resolved by ensuring correct formatting of the providerId related to the appleapn.
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