Reputation:
When trying to manage an app using urbanairship and trouble shooting 'missing' push notifications, I decided to write a Q&A to assist other developers.
The most common complaint from clients is, a user on a device didn't get a notification.
Occasionally a whole group will miss out on notifications causing me to examine the client app and urbanairship dashboard to figure out what has happened.
The most common errors I have found on the dashboard have been:
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
And I wanted to share how I have resolved these.
Upvotes: 1
Views: 950
Reputation:
There are several points that can cause errors:
In the airshipconfig.properties gcmSender = #########
The Mismatch Sender ID error happens when your Sender ID is incorrect. Ensure you're using your project number, not ID.
In the urbanairship dashboard, go to settings -> services
The package name is optional, if they do not match though this will cause a problem and it can be removed altogether - the package name, not the service!
- If notifications only arrive when connected to WiFi, confirm that Background data is enabled.
- Background data needs to be enabled on devices. Otherwise pushes can't send from GCM to Android devices until they have active WiFi connection. Pushes are lost after they leave Urban Airship. To enable background data for each version of Android OS, please consult Android documentation. nb*
- 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.
The quotes are taken from Urbanairship GCM Troubleshooting Guide
nb* There are no reasonable ways of ensuring mobile data is enabled, at best the user can receive a warning when there is no wifi connection and mobile data is disable Latest update on enabling and disabling mobile data programmatically
As an extra:
For notification problems on a specific device I ask the client to complete a form like so:
Mobile Type:
Android, iOS, other.
Make:
Example: Sony, Samsung, Apple.
Model
In iOS Example:
Settings -> General -> About -> Model = MF325X/A
In Android Example:
Settings -> About Phone -> -> Model number = E2353
Exact Android or iOS version
In iOS Example:
Settings -> General -> About -> Version = 8.3 (12F70)
In android Example:
Settings -> About Phone -> Android Version
That way any changes in permissions between OS versions, or the way push notifications are managed, or known bugs in a device can be explored also.
Upvotes: 1