[SOLVED] How to Update Mattermost with GCM Server ID for Android Push Notifications?

While setting up Mattermost, we successfully configured the push-proxy with iOS notifications and our own signed copy of the iOS app. However, for Android, we realize that we need to change the ServerID to match the Google Project ID for GCM-based notifications to work. Tracing through the code, the ServerID is set from the DIAGNOSTIC_ID, which in turn is a random id generated by a call to model.newID().

So we are befuddled how the ServerID (and the resulting DeviceID sent in GCM calls) would ever match the project keys generated through the Google Console. The only thing we can think of our forcing an update to the DiagnosticID (updating the Systems table where name=“DiagnosticID”).

Is that the correct approach?

Robert Buccigrossi

FYI: We know that it is a SenderID issue as we modified push-proxy to give us some diagnostic information, and when we directly call it with the Mattermost ServerID and DeviceID, GCM accepts the message, but gives us the error:

2016/04/12 21:02:17 ERROR Android reponse: &{5356772378128812979 0 1 0 [{ MismatchSenderId}]}

Which means it liked our AndroidApiKey, but the DeviceID (generated in part from the ServerID) didn’t match the approved Project ID.

You need to change the GCM id at



Thank you! That was exactly what we needed.

I’m having the same error MismatchSenderId

The value of gcm_sender_id is the value of firebase sender id under Cloud Messaging right? or am I doing something wrong? I’m not getting android push notification