Skip to content
Back

Android push notifications

  • 0
  • Android
  • Messaging
  • Cloud
nachol_
28 Dec, 2024, 13:37

I get this error on appwrite console

Failed sending to targets with error: Utopia\Messaging\Helpers\JWT::encode(): Argument #2 ($key) must be of type string, null given, called in /usr/src/code/vendor/utopia-php/messaging/src/Utopia/Messaging/Adapter/Push/FCM.php on line 61

  1. Push notifications provider works
  2. I see on Auth user target is successfully registered
TL;DR
Developers need to make sure they uploaded a valid `Service account JSON` file without corruption. Error may occur when sending push messages from the cloud or appwrite console. The error message indicates an issue with the encryption key. Possible Solution: Ensure that the encryption key is set as a string and not null in the FCM.php file.
nachol_
28 Dec, 2024, 13:40

I get this error sending a push message from cloud console

Darshan Pandya
28 Dec, 2024, 13:49

Did you upload the Service account JSON file? Make sure its a valid json file and is not corrupted.

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