Push notifications stuck in "Pending"

P-Rudenko-SN
ServiceNow Employee
ServiceNow Employee

Hi all,

We have configured a Push Notifications for a custom Android app. After triggering a specific event, the notification stuck in system log with "Pending" type.

Here are more details:

  1. The user can login to APP on mobile devices, and got registered in   sys_push_notif_app_install table.
  2. The event triggers a push notification and it is successfully written to System Log.
  3. In system log I can see the message itself, where the registered device token is also mentioned.
  4. Now the message remains "Pending" for specific period of time, after what turns to "failure"

We have a Push Application configured in ServiceNow, that contains Goolge API key and "REST API" value for both Push and Feedback.

I can also see 2 error messages in System Log:

app="Push app name" origin="push.feedback" Invalid Feedback REST Message: no thrown error

app="Push app name" origin="push.feedback" elapsed=8 exception encountered getting feedback: java.lang.RuntimeException: feedback job does not have a valid Feedback REST Message: com.glide.push.feedback.FeedbackClientRest.getFeedback(FeedbackClientRest.java:52)

Any ideas are appreciated.

Thanks,

Pavlo

1 ACCEPTED SOLUTION

P-Rudenko-SN
ServiceNow Employee
ServiceNow Employee

Hey guys, I was finally able to solve it. The key point here, is to make sure the Push Application setup is correct. This is something not clearly stated in official docs. So for Android app, these points are important: Push = Direct, Feedback = REST, Google API key = FCM Server Key (both leagacy and the new one are working fine). Despite Google recommendations to set up HTTP headers for the REST message, the notifications are running fine both with- and without it. Therefore, normally you can leave out-of-the-box REST "Google Cloud Messaging Sent" unchanged.    


View solution in original post

6 REPLIES 6

cherylmansa
Kilo Contributor

Hi Pavio! I'm not sure if you were able to resolve this yet but Check out http://www.synq.cloud. I hope that helps you find the answer you are looking for - Cheryl


P-Rudenko-SN
ServiceNow Employee
ServiceNow Employee

An issue is still unsolved, but there are couple of points I've discovered so far (not specified SNow docs). According to Google FCM doc (https://firebase.google.com/docs/cloud-messaging/server), we need to modify an existing OOTB Google REST message at ServiceNow instance. It has to be changed to: https://fcm.googleapis.com/fcm/send. Additionally, an HTTP header must be added to REST message (this one is also easily configurable at the instance). After setting the FCM Server Key available at FCM console, we're still getting authorisation issue in a log (invalid username/password combo).  


P-Rudenko-SN
ServiceNow Employee
ServiceNow Employee

Hey guys, I was finally able to solve it. The key point here, is to make sure the Push Application setup is correct. This is something not clearly stated in official docs. So for Android app, these points are important: Push = Direct, Feedback = REST, Google API key = FCM Server Key (both leagacy and the new one are working fine). Despite Google recommendations to set up HTTP headers for the REST message, the notifications are running fine both with- and without it. Therefore, normally you can leave out-of-the-box REST "Google Cloud Messaging Sent" unchanged.    


Community Alums
Not applicable

Hi .. Are you able to do with FCM Server Key?? In which version instance you did ? I tried with FCM Key which is not working