Closed farewelltospring closed 6 months ago
Our Firebase API tokens are matched to our signature. You must register your own Firebase API tokens paired to your signing key, and include them in your custom Signal build.
Thanks for the pointer. Will I have to replace all of the values in app/src/main/res/values/firebase_messaging.xml
with values from a firebase project I own (and have paired with my personal signing key)?
Correct: you will have to provide your own values for all Google/Firebase tokens.
I recompiled with my own Firebase tokens. FCM is successfully registering and I no longer see the "background connection enabled" notification, but I'm not receiving any push notifications from Firebase (The onMessageReceived()
log statement never appears in logcat).
After comparing logcat output between the Play Store apk and my local apk (both version 7.0.2), the Play Store apk receives notifications from Firebase correctly:
I ActivityManager: Start proc 14634:org.thoughtcrime.securesms/u0a288 for broadcast {org.thoughtcrime.securesms/com.google.firebase.iid.FirebaseInstanceIdReceiver}
I FcmReceiveService: onMessageReceived() ID: 0:1709617667738038%e3016397f9fd7ecd, Delay: -123 (Server offset: 0), Priority: 1, Original Priority: 1, Network: [isOnVpn: false, isMetered: false]
I ActivityManager: Background started FGS: Allowed [callingPackage: org.thoughtcrime.securesms; callingUid: 10288; uidState: SVC ; intent: Intent { cmp=org.thoughtcrime.securesms/.gcm.FcmFetchForegroundService }; code:PUSH_MESSAGING; tempAllowListReason:<broadcast:u0a127:com.google.android.c2dm.intent.RECEIVE,reason:high-prio FCM,reasonCode:PUSH_MESSAGING,duration:20000,callingUid:10127>; targetSdkVersion:33; callerTargetSdkVersion:33; startForegroundCount:0; bindFromPackage:null]
Whereas my local apk has nothing.
Is it possible that the Signal-Server isn't sending messages correctly? I looked at the code a bit and IIUC, what happens is:
If so, then I don't know what's broken, because this process sounds like it should be agnostic to the specific Firebase instance. Regardless, something is broken, because I'm not receiving push notifications even though I'm doing things right.
I recompiled with my own Firebase tokens.
Don't change all the values in firebase_messaging.xml
or it won't work. Just update:
google_app_id
google_api_key
google_crash_reporting_api_key
project_id
Thanks valldrac, worked like a charm. :D
Bug description
After setting up Signal (registering or restoring from a backup) after compiling the app from source, Signal prompts the user to "optimize for missing Play Services" in order to retrieve messages while inactive.
Steps to reproduce
Actual result: Observe notice: "Optimize for missing Play Services / This device does not support Play services. Tap to disable system battery optimizations that prevent Signal from retrieving messages while inactive." plus the "background connection enabled" notification. Expected result: No notice, no websocket connection.
Screenshots
n/a
Device info
Device: Sony Xperia 5iii Android version: 13 Signal version: 7.0.2
Link to debug log
https://debuglogs.org/android/7.0.2/89f9c73989f4e19a55e157f61cd5e3509631ddc4196c0e23402a6fc6abc8bce7