Firebase messaging SDK with proper error response message in emulator
I encountered an issue while attempting to emulate the sending of push notifications with a Firestore Cloud Function. Despite having valid tokens set up, I received an error response. The error messages I received after attempting to send two push notifications individually were as follows:
"Error: Requested entity was not found."
"Error: The registration token is not a valid FCM registration token."
Ideally, I would expect to receive a 200 or 403 response along with a message indicating that the message was sent successfully, but that this is only an emulation environment. Upon deploying the latest version of my script and testing it in a production environment, I discovered that there was nothing wrong with my code.
-
James Jeffrey commented
I need phone number and the code to confirm it