The final step of building the notification body for Firebase v1 was setting the message key inside of the retry loop.
This meant that on a retry, the message field would be recopied inside of itself leading to nested messages.
Since that is not a valid Firebase notification, it would lead to errors from Firebase like the following:
400 from server, we have sent something invalid! Error:
'{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \\"message\\" at \'message\': Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "message",
"description": "Invalid JSON payload received. Unknown name \\"message\\" at \'message\': Cannot find field."
}
]
}
]
}
}'
The final step of building the notification body for Firebase v1 was setting the
message
key inside of the retry loop. This meant that on a retry, themessage
field would be recopied inside of itself leading to nestedmessages
.Since that is not a valid Firebase notification, it would lead to errors from Firebase like the following: