FCM messaging for HCL Verse for Android clients

HCL Traveler server can use Firebase Cloud Messaging (FCM) for real time push notifications to keep your Mail, Calendar, Contact and To Do data on your HCL Verse for Android clients up to date. Google has deprecated GCM and replaced it with FCM.

The HCL Traveler server attempts to communicate with the FCM service using the host fcm.googleapis.com on port 443. Make sure that any internal firewalls between the HCL Traveler servers and this external host allow this connection.

Checking status

A connection to the FCM server will only be active in HCL Traveler if there is an active HCL Verse for Android client running on a device logged in with a Google account and Using FCM mode for auto sync.

Debugging Issues

Most FCM issues are related to proxies or firewalls in the network. You can test network connectivity including firewall settings by either
  1. sending a tell traveler push test message to a device registered with FCM or
  2. trying HTTP POSTs to https://oauth2.googleapis.com/token and https://fcm.googleapis.com/v1/projects/notes-traveler-2014/messages:send in a web browser on the server that is connecting to the FCM server (either the HCL Traveler server or the proxy server).
  1. Identify a user with a device registered with FCM and send a test message via a tell command.
    1. If you don't already know a user with a device registered with FCM, find a user by:
      1. Issuing the tell traveler systemdump push command.
      2. opening the output file that systemdump created
      3. searching in the Listener Store section for a user with the Manufacturer Address and Manufacturer Provider ID set as needed.
    2. Confirm the user has the Manufacturer Address and Manufacturer Provider ID set as needed and get the device name by issuing the tell traveler push status <userName> command for the user name determined above.
    3. For the device name and user name determined above, issue the tell traveler push test * <deviceName> <userName> command.
  2. Trying https://oauth2.googleapis.com/token and https://fcm.googleapis.com/v1/projects/notes-traveler-2014/messages:send.
    By default, the requests via the browser's address bar will be HTTP GETs, but the FCM HTTP v1 API requires the requests to be HTTP POSTs. There are multiple methods to create the HTTP POST requests including the following:
    1. In the browser's Developer Tools' console, paste 'fetch("https://oauth2.googleapis.com/token", {"body": null, "method": "POST"});' (without the single quotes) and hit Enter/Return.

      If you get a Content Security Policy failure on the fetch with method POST, first browse to https://oauth2.googleapis.com/token in the browser's current tab via the address bar and then retry the fetch with method POST in the console.

    2. In some (e.g. Firefox) browser's Developer Tools in the Network section, you can resend the request after changing the method to POST or create and send a new request that is an HTTP POST.

      The request will be missing some information, so a "successful" result is an HTTP 400 (Bad Request) response.

    3. In the browser's Developer Tools' console, paste 'fetch("https://fcm.googleapis.com/v1/projects/notes-traveler-2014/messages:send", {"body": null, "method": "POST"});' (without the single quotes) and hit Enter/Return.

      If you get a Content Security Policy failure on the fetch with method POST, first browse to https://fcm.googleapis.com/v1/projects/notes-traveler-2014/messages:send in the browser's current tab via the address bar and then retry the fetch with method POST in the console.

    4. In some (e.g. Firefox) browser's Developer Tools in the Network section, you can resend the request after changing the method to POST or create and send a new request that is an HTTP POST.

      The request will be missing the authentication credentials, so a "successful" result is an HTTP 401 (Unauthorized) response with a response body that indicates an authentication problem.

On the Traveler server, run the command:
tell traveler push cmstatus
In the output, check for a section that looks similar to the following text.
Traveler: ########## Connection Notification Sender FCM (Tue Nov 04 06:50:43 EST 2019) ##########
Traveler: Description: Details about the connections to the Google Firebased Cloud Messaging (FCM).
Traveler: Connection to Google Firebased Cloud Messaging is active

To verify that the connection to the FCM server is working connect an HCL Traveler for Android client from a device that is also logged in with a Google account. The HCL Traveler server will not attempt to contact FCM until it has a reason to do so.