On April 10, 2018, Google deprecated GCM. Google removed their GCM server and client APIs on May 29, 2019. |
If any of the following errors are showing in your dashboard Error Console, there is a configuration issue with your Firebase Cloud Message (FCM):
- Received error: Received push with missing authorization on platform GCM
- Received error: Received push with invalid authorization on platform GCM
- Application does not have permission to send to this device.
- Original Message: Error: mismatched sender ID
For example:
Check FCM Server API Key
If it appears that your push notifications are no longer being received on Android devices, it is possible that you are using the Android API Key rather than the Server API Key to identify your project in Airship.
To fix this issue, create a new key by completing the following steps:
Log in to the Firebase site:
- Select your project.
- Choose Project Settings after selecting the settings gear.
-
Choose Cloud Messaging to view your Server Keys. "Server key" will be used for your Airship integration.
- Ensure that this is the Key used in configuring FCM services in the Airship Dashboard as described in the documentation: Airship Push Provider Setup: FCM. The Server Key should go in the API key field:
Check the Sender ID
For FCM:
- Select your project.
- Choose Project Settings after selecting the settings gear.
-
Choose Cloud Messaging to view your Sender ID.
Double-check the Package Name, if this is set for your project:
For FCM:
- To find your Package Name in FCM, Choose Project Settings after selecting the settings gear:
2. If you have a Package Name configured, it will be displayed here:
Other common things to check:
- Background data needs to be enabled on devices. Otherwise pushes can't send from GCM to Android devices until they have active WiFi connection. To enable background data for each version of Android OS, please consult Android documentation.
- Notifications are not enabled for the application itself. Notifications are enabled or disabled in the Manage Applications screen. Navigate there for each Android OS by selecting Show Notifications.
- If you're testing a production build, the inProduction flag in your code should be set to true. Otherwise, it should be set to false.
- The Mismatched Sender ID error happens when your Sender ID is incorrect. Ensure you're using your project number, not ID.