-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Google Play Services aren't used #8992
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
Comments
Did you install/register with Google Play Services disabled? Whatever the state is during registration is the state it'll stay. You can't register without play services and then turn them on later to start using them. Also, how is Google Play Services setup? Are you using microg or something similar? Are you running lineageOS, or a stock ROM? Also, please post a debug log (Settings > Advanced > Submit debug log). Thanks! |
I'm using Stock version provided by Motorola. I haven't changed anything on this system. Here is the debug log: https://debuglogs.org/7ef0cb3f17b8e0946d6745056364fb3eb1e8815932f694f0efd0c775dc63c4bb I found this line in it:
What me confuses me is |
Are push notifications working in general? You can test it with something like Push Notification Tester. |
I had these symptoms. I believe Google Play Services was lacking permissions. Granting permissions to Google Play Services and rebooting did not fix my issue. Reinstalling Signal after that did fix my issue. |
Push notification work fine for other applications. My feeling is that I have to reinstall Signal like @stub42 did. But I think reinstalling is a bad user experience especially for users who are not tech related. |
I have the same issue on an Asus Zenfone 6, Android 9, stock ROM, September security update. https://debuglogs.org/ab743ad5c11e261b244a84f2ec36fa6dd3234f3247aa4acd0062e5c92d950bbc Steps I have tried (all failed):
Push notification tester linked to by @ahstro detected GP services and notification worked (tried with 1 second delay). Unfamiliar with github etiquette, so please educate me if I'm hijacking/diluting the thread. |
I have the same issue on my Android One phone (Make and Model: Xiaomi Mi A2) which definitely has Google Play Services with all permissions granted. My device is on the November Security Patch. All other push notifications work fine; I have even tested with the Push Notifications Tester app. Signal was working fine until I factory-reset my phone and installed all my apps again (because I had to send my phone to get serviced for a hardware issue). I restored Signal messages from backup when I saw the persistent 'background connection enabled' notification. I thought it had something to do with the restored messages, so I even tried with a clean Signal install to no avail. Debug logs |
@greyson-signal tagging you so this doesn't slip through the cracks. This is now happening on every phone I install Signal to, including a Samsung Galaxy M30s and Xiaomi Redmi 7A. EDIT: EDIT2: Well, looks like I spoke too soon. The 'background connection enabled' persistent notification is back on my Mi A2. |
All I can add here is that it has occurred to me on a new Stock ROM Galaxy S9+ on which I set Signal as SMS app right out of system settings before I followed the regular Signal number registration process. After that, the persistent notification told me it is using background services to function. Did clear the app data and reinstalled the app, the problem was then gone afterwards a regular Signal registration as the first step. |
I'm affected with this issue too. Phone is ASUS ROG II (WW, Android 9). No other apps complain about missing Play Services. I do have MicroG installed though. |
I'm also having this problem on a Samsung Galaxy S8 running stock firmware with Google Play Services. https://debuglogs.org/2e49967ffb408b7fb1c9ab23b69531009f1693df93f250b0dffac435a0f0ebea |
I bet the issue is here: https://github.com/signalapp/Signal-Android/blob/master/src/org/thoughtcrime/securesms/util/PlayServicesUtil.java#L35 That switch statement might need to be more clever about what to do with each code. For example, "SERVICE_MISSING_PERMISSION" might return when I disable Camera permission from Play Services. But Signal shouldn't care about that. Same thing with the SIGN_IN_* results. Do we need to be signed in to Google for Signal to do its thing? There are a whole bunch of possible results and not all of them should make Signal fallback, by my amateur understanding of things. https://developers.google.com/android/reference/com/google/android/gms/common/ConnectionResult.html |
https://debuglogs.org/dbdc13c3f3e0efc9b817bb37870e75e6d2452686cb05c9f7bfd78f787d6c87bb Edit: I've just installed it, and it is working fine now - detected Play Services. |
I was hit by this issue now, too. What needs to be done to convince signal to use GCM or give more details why it thinks it is not working? |
Could check how other Android OSS apps do the Play Services detection. |
I realized that on my system a token has been available, so I wonder why it has not been used. For me it has been enough to set the option "pref_gcm_disabled" to "false" (in "/data/data/org.thoughtcrime.securesms/shared_prefs/org.thoughtcrime.securesms_preferences.xml"). After that it uses GCM as expected and my battery life is much better now. I assume there is something wrong in the token handling in the Android app. If a token is available, what's the reason to not use it? I assume if some Play Service is not available, also the token should be missing. |
I have the same problem. It happened recently. Started showing the permanent notification "background connection enabled". Before that everything was fine, I was getting notifications from Signal and I didn't have this issue. Now, I am getting notifications just fine, but the permanent "background connection enabled" is annoying. Here is my log: https://debuglogs.org/e7bf0d440107dd795b0f2f6e48163471ae25a32c474c44c1827f2f9c8fe482ed Interesting fact: I was having notification issues with Viber ever since I got this phone. Missed notifications all the time. Tried contacting their support but they were not helpful. This was the reason I installed Signal actually. I don't have any problems with other notifications. Instagram, Messenger, Twitter all work fine. Even WhatsApp (which I no longer use). I was on the "beta" channel of Google Play Services. I thought that was the problem. Left the Beta channel, reset the Google Play Services app, installed the non-beta version, reinstalled and re-registered with Signal to no avail. I am using stock Android 9, Samsung Galaxy A10. Never did any changes to the firmware or ever rooted the device. |
These steps solved it for me on my Oneplus 7T / Android 10. |
I don’t have this file on a Galaxy S9+. ~/data is empty, but in ~/Android/data/org.thoughtcrime.securesms are just the folders "cache" and "files", both empty and there aren’t any hidden files. |
You need a rooted device or should use adb. You need to look at /data/data/... but you are looking in path ~/data/... |
Ah, got confused by ~/data and /sdcard, Android’s file hierarchy is a mess. |
Actually I just did this on my phone without adb. Just get a file explorer e.g. MixPlorer, grant root permissions to it and edit the file on the phone. Good Luck |
@schneekluth Of course it works with root with a graphical file manager but my mother’s phone, which is still affected by this bug, isn’t rooted, you see? |
Ah, sorry. |
Same problem here after I wanted to use a backup from another device. Second install with importing a previous backup leads to: So first I installed and setup Signal without any issue on my brand new unmodified Motorola one vision with Android One 10. Everything worked like expected. Then I recognized I couldn't just import my backup from my old device (Moto Z Play android 8), I have to place it in a certain folder and reinstall Signal again. So I deinstalled Signal, placed my backup in Signal/Backups and installed Signal again. The Backup got recognized, passphrase correct, all messages imported, some options with every right granted but at the end the message: "This device does not support play services ("Google-Play-Dienste"). Tap to disable system battery optimizations that prevent signal from retrieving messages while inactive." I didn't change anything but installing with a backup. Another try without the backup finally ended with the same issue NOT recognizing the play services like above. Don't know how to go the adb-way mentioned above without a step by step guide. :-( Anyone willing to help with this? So no Signal on my new phone? Do I have to stick with my old one? |
@issteve For the solution I used you need root access to your phone. |
@maggu2810 Yes, you are right, this would be a great idea! Meanwhile the situation got mysteriously even worse. I reconnected the Signal App on my old phone (without doing any other change to this phone) and have the same problem there now too! So all I did was switching the connection on again and register it again. I did not even use any other app or change any other setting in the mean time. Everything was fine before I stopped the Signal registration and is now weird with just registering it again... (((Btw. I was thinking what I probably did differently than "the average person"
Debug log (relevant to me looks something between 2020-04-17 18:43 to 18:45 when Maybe: |
@greyson-signal Excuse me...
...does this mean, once signal switched to assuming (wrongly) there are no play services, simple reregistering could maybe help? Or does it have to be a new install? Or does nothing help as soon as it switched away from the play services? Thank you for your time and effort! |
I also used the "by call" verification as I cannot receive SMS, too. WRT to my comment above about an UI setting to change the property. Changing the property directly does not make sense (IMHO). But perhaps a button to retrigger the GCM check? Perhaps with a debug log that can be submitted if something goes wrong. |
My guess now after further testing: it's related to the verification by call, cause I did investigate a little bit more by changing only the registration method (and phone number):
=> I just deregistered the number in the settings and left the program, but than
Switched it again (without reinstalling or any other changement) but verification by call: same problem https://debuglogs.org/723dfe4e698d1c9a966ef4f4c199e4ad57feb5416a193a3b93fc086244882163 shows (wrong detection):
AND shows (right detection):
|
...and by taking a first look at the code I found in:
Does this mean FCM could be classified as relevant again (what it obviously is ;-) ) there and could be switched on if a verification by call is used at this place (again)? P.S. In anyway you can see with this bug report FCM is relevant for requesting verification by call. ;-) It could be something like:
See: #9550 Sorry, as I can't test it without having it integrated in an App from the play store, I'm not able to do the pull request by myself. Anyway I'm willing to test it on three different devices as soon it's available to me. |
Fix for Bug signalapp#8992 - As described there FCM /is/ relevant for confirmation by call (e.g. regarding telephone providers which didn't offer SMS).
Fixes signalapp#8992 - As described there FCM /is/ relevant for confirmation by call (e.g. regarding telephone providers which didn't offer SMS).
@johanw666 : I hope I'm not annoying you now, but I think you really brought me on the right track. As you wrote, the code checking if FCM is possible should have nothing to do with the registration method. But it looks like it wrongly does here and causing this bug with just one "false" instead of "true" in line 127... (see above) |
FIX (bug bypass): Anyone who is subscribed to this thread, please do try what @issteve referenced. I cleared signal storage and re-registered using SMS OTP. The last few times I did the sms network was congested and I opted for call. This time the play services error did not appear! |
I need to migrate my Signal app to another phone. @mudeth Which app to use to test the fix? The apk on the Signal webpage or the Play Store beta release? |
@maggu2810 : I'm sorry I have to tell you I didn't hear anything back yet from anyone familiar with doing final pull requests like @greyson-signal or @johanw666 . So it looks like the probably fix I suggested - even it would be only the change of one word - is still just lying around here and AFAIK not (yet) merged from any developer into any app. |
I used the play store apk (think I've been on the beta for a while now).
You could try temporarily installing the SIM in a device that supports SMS, activate it on your new device and manually type the SMS in maybe? |
Sorry, I understand the comment wrong. @mudeth If the fix has not been merged, it does not matter which app to use. The problem is that my provider of my mobile phone number does not support / deliver SMS. As I do not want to root my new phone in the first days and activation by voice call does not seem to get fixed, I don't know what to do now... |
If I build the Android app myself (with the potential fix) myself,
|
Yes, that's correct. I just replied with which version was working for me.
I've never built for Android myself and I have zero experience, so take this with a grain of salt, but I would definitely give it a shot at least! Build Instructions are available here. |
Seems to work for me for the moment. After the restart I did not open the app but asked a friend to send a message. Hopefully the app does not decide to set the gcm disabled option to true again after a while. |
I've put a "bandaid" in 4.59.2 (currently in beta) to check for play services at app start and get you hooked up to FCM if you have it. Still looking at addressing the root cause. |
Great and please excuse the follow question but I cannot found it myself. In am already in the beta channel on Google Play but it shows me "4.58.5". Found it on apkmirror. As long as the signature fits, I assume it is okay to take it from there. |
FYI
|
That was the "bandaid" :) We sort of "heal" your play services state at app start. As I said, still working on fixing the underlying problem. |
I'm afraid I stumbled across a side effect of that bandaid... As I can see it starts with websocket and gcm disabled I used Signal with websocket and microG for some months and it worked when it was disabled during registration. But the update yesterday to 4.59.8 seems to have it broken... |
Same here on LineageOS 16/MicroG 0.2.10 : before Signal 4.59.8, everything worked fine (and Signal was registered with GCM via MicroG), but since Signal 4.59.8, I don't receive the messages until I open the app. |
At some point, I kind of just feel like if you're going to install something that fakes google play services, then you're going to run into problems when that fake doesn't work. I don't know exactly what the solution is for you. |
Yes, I understand your feeling. I actually don't require GCM for Signal ; it's just that MicroG happened to be active (I need it for other purposes) when I installed Signal, and now it doesn't work as it used to. Is there a way to make Signal stop rely on GCM ? Without reinstalling as that'd mean losing years of conversations ? |
If you create a local backup, you can remove and reinstall the app and restore from backup. |
@greyson-signal : But I don't want to argue about the motivations, I will try to propose a solution. I don't want to patronise you, this is just a idea from my side:
Now this switch doesn't function anymore because on every startup the state gets detected. I don't know if this fits in with your agenda, but I think it would help some users (like me). |
Bug description
I'm running Signal on a Motorola Moto G (7) Play which has Google Play Services running. The problem is that Signal doesn't seems to use it because it shows me the notification "Background connection enabled".
I checked how long Signal was running in the background and it shows me that Signal was only running in foreground.
I've setup Signal by restoring a backup but I'm not sure if that is related.
Device info
Device: Motorola Moto G (7) Play
Android version: 9.0.0 (Security Patch Level: 1 June 2019)
Signal version: 4.45.2
The text was updated successfully, but these errors were encountered: