Hello everyone,
I am facing an issue with push messages not arriving at the Android clients. I have a custom built Moodle mobile app (phonegap) with my own AirNotifier server (moodle fork). Push messages to iOS clients work perfectly fine, just Android clients are affected. I've created a project on the Google Developer console, enabled the Cloud Messaging API and whitelisted the IP address of the AirNotifier server. I even whitelisted 0.0.0.0/0 as suggested in some other forum posts. In the phonegap built I've adjusted the project ID in the config.json and config.xml file.
Looking at the AirNotifier error log I get the following:
[I 170425 19:42:33 connectionpool:756] Starting new HTTPS connection (1): android.googleapis.com
[E 170425 19:42:36 web:1908] 500 POST /api/v2/push/ (xxx.xxx.xx.xx) 3424.23ms
With the test scripts from https://github.com/airnotifier/test-scripts/tree/master/v2 I was able to get a slightly more detailed error message:
string(31) "{"error": "Mismatch sender Id"}"
I am a bit of a loss here since I've tried creating several API keys and double checked the project/sender ID. Recently the Google API project got migrated to Google "Firebase" (https://console.firebase.google.com), however the original keys and sender ID remained the same.
- Sender ID = added to config.json and config.xml in the phonegap build as well as AirNotifier config
- Legacy Server key = added to the AirNotifier config
Any ideas what could have gone wrong here? Thanks a lot in advance!