Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing field or documentation in sygnal yaml? Where do we set SENDER-ID to avoid FCM/GCM error MismatchSenderId #303

Closed
jittygitty opened this issue May 21, 2022 · 4 comments

Comments

@jittygitty
Copy link

Describe the bug
I have a SENDER-ID (a number) in FCM/GCM google console.
I get error MismatchSenderId in Sygnal
But I see no info/documentation anywhere how/where to set the Sender-ID

To Reproduce
Steps to reproduce the behavior:

  1. Setup Sygnal use custom apk name as the app com.etc name in sygnal.yaml
  2. Build Apk with config.xml https push url replaced with your custom server
  3. Try push notification
  4. sygnal.log gives MismatchSenderId error

Expected behavior
Expect no MismatchSenderId error if I could put the FCM/GCM "SenderID" number somewhere...

Smartphone (please complete the following information):

  • Device: Android 8.1

Additional context
Add any other context about the problem here.

@jittygitty
Copy link
Author

jittygitty commented May 21, 2022

I thought the MismatchSenderId error in sygnal log was due to missing senderid in sygnal.yaml but perhaps SenderID goes in:
https://github.com/vector-im/element-android/blob/develop/vector/src/gplay/debug/google-services.json

I've replaced google-services.json in element android app with my own from firebase fcm/gcm, but still no go, still not getting any notifcation on android phone, though I'm not getting MismatchSenderID anymore.

@jittygitty
Copy link
Author

UPDATE currently I think problem is due not to sygnal but a problem with PUSH RULES not propagating from dendrite to element:
element-hq/element-android#6115

@squahtx
Copy link
Contributor

squahtx commented May 30, 2022

Closing, since it sounds related to dendrite. Please reopen if you continue to have issues on matrix.org or a synapse homeserver.

@H-Shay H-Shay closed this as completed Jun 1, 2022
@jittygitty
Copy link
Author

jittygitty commented Jun 3, 2022

@squahtx Thanks yea should be closed, sorry for got to update here but for other's benefit, basically there were two problems:

  1. One was that my apk needed to have not just the PUSH server configured to my server but it needed the package name and senderid to match properly with one in Sygnal config etc otherwise you get MismatchSenderID, so this part had nothing to do with Dendrite but some mistakes/mismatches in Google Json (which is produced by Google Play consoles' FCM and has senderid etc) included in my custom built apk. (It also needs to match Sygnal config for app_id com... etc) The initial confusion is there was no senderid setting in Sygnal, but only the api-key. I discovered the senderid etc comes from the google json in the apk.

  2. Once MismatchSenderID was fixed with proper config, the issue with Dendrite was that when creating users via command line add-user instead of through the "register" process, the "Push Rules" never get properly propagated/triggered in the CLIENT. There was a PULL-REQUEST to fix ( Use /admin/v1/register in create-account dendrite#2484 ) this but I don't think it's been reviewed or merged yet.

The easy a "workaround" I've been using which gets PUSH notifications working well for me, is here: element-hq/element-android#6115 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants