Hi leonardop@ciandt.com,

It seems that after the latest changes (including a patch I provided) there's still a warning being triggered under some circumstances.

The error seen is:
reset() expects parameter 1 to be array, null given at FirebaseNotificationsService, line 315

The solution is trivial and I've attached a patch for it. Tested it locally and I don't see any other errors.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

japicoder created an issue. See original summary.

japicoder’s picture

Added patch

japicoder’s picture

Status: Active » Needs review
japicoder’s picture

I've found that depending on the "to" parameter, Firebase returns a different response.

According to the documentation at https://firebase.google.com/docs/cloud-messaging/send-message, if the notification is sent using an app register token, the response will be:

// Success
{ 
  "multicast_id": 108,
  "success": 1,
  "failure": 0,
  "canonical_ids": 0,
  "results": [
    { "message_id": "1:08" }
  ]
}

But if the notification is sent to a topic, the response will be:

//Success example:
{
  "message_id": "1023456"
}

//failure example:
{
  "error": "TopicsMessageRateExceeded"
}

Then, here's a new version of the patch to check for notification failures.

japicoder’s picture

Uploaded the patch with a wrong name. Here is the correct one

leopaccanaro’s picture

Status: Needs review » Reviewed & tested by the community
leopaccanaro’s picture

Status: Reviewed & tested by the community » Fixed
leopaccanaro’s picture

Status: Fixed » Closed (fixed)