Solved: SenderID Mismatch


#1

Hello,

We are using Parse Server version 2.2.17 with Trigger.io and the Parse Module version 2.14 (Tried using 2.13 before) but can’t get the Push Notifications to work with Android.
The GCMSenderID has been set in the new Parse Module.

In Parse-Dashboard I can see the entry from my Android device, although the GCMSenderID field is always empty.
Parse Server has been initialized with a config.json which contains:

{
    "appId": "appid123",
    "masterKey": "masterkeykey",
    "clientKey": "clientkeykey",
    "databaseURI": "mongodb://localhost",
    "serverURL": "http://****:1337/parse",
    "push": {
        "android": {
          "senderId": "GCM_SENDER_ID", <- Used the project ID in Google Developer Console
          "apiKey": "GOOGLE_API_SERVER_KEY"
        }
    }
}

When I try to send a Push Notification I get the error message:

verbose: REQUEST for [POST] /parse/push: {
  "where": {},
  "data": {
    "alert": "pushmessage"
  }
} method=POST, url=/parse/push, host=****:1337, connection=keep-alive, content-length=175, origin=http://****:4040, user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36, content-type=text/plain, accept=*/*, referer=http://****:4040/apps/myapp/push/new, accept-encoding=gzip, deflate, accept-language=en-US,en;q=0.8,de;q=0.6,fr;q=0.4, , alert=pushmessage
verbose: RESPONSE from [POST] /parse/push: {
  "headers": {
    "X-Parse-Push-Status-Id": "hIfTmaDSPM"
  },
  "response": {
    "result": true
  }
} X-Parse-Push-Status-Id=hIfTmaDSPM, result=true

verbose: sending push to 1 installations
verb parse-server-push-adapter GCM sending to 1 device
verb parse-server-push-adapter GCM GCM Response: {
verb parse-server-push-adapter GCM     "multicast_id": ****,
verb parse-server-push-adapter GCM     "success": 0,
verb parse-server-push-adapter GCM     "failure": 1,
verb parse-server-push-adapter GCM     "canonical_ids": 0,
verb parse-server-push-adapter GCM     "results": [
verb parse-server-push-adapter GCM         {
verb parse-server-push-adapter GCM             "error": "MismatchSenderId"
verb parse-server-push-adapter GCM         }
verb parse-server-push-adapter GCM     ]
verb parse-server-push-adapter GCM }
verbose: sent push! 0 success, 1 failures

I tried using Pushwoosh with the same API key and GCM SenderID and it worked.
Only Parse Server with Parse Module won’t work.
Am I missing a step?


#2

Hi,

you should check the following things:

  1. make sure you’ve set your GCMSenderID in the trigger parse module.
  2. make sure your device is subscribed to your server. Migrating the data from parse.com is not enough in case of android: window.forge.parse.registerForNotifications(function() { … })
  3. check your server logs for " […] at least one ID field (deviceToken, installationId) must be specified in this operation […]" errors. This is an open issue of the parse server atm: https://github.com/ParsePlatform/parse-server/issues/2090

Good luck.