You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issues with push messages (service hanging until reboot / messages not processed) #31
I have the following behavior with TextSecure, using the push messaging implementation from this project: TextSecure only seems to "notice" new messages when it is in foreground, on the screen.
For example, I had my phone in stand-by for a while, and I now know that I did receive some messages during that time. I then turned on the screen and unlocked the phone. I waited for ~10-20sec, nothing happened. I started TextSecure, and now I got all the notifications about the messages that I received.
I just received some messages while the phone was in standby, so this is not entirely reproducible either. The bug above happened while being on a highway, so maybe it is related to unreliable data connection. Still, once the device re-gains connectivity, it should get the messages and notify me.
Now, with other TextSecure messages having the same problem, maybe TextSecure is doing something suboptimal (I have no idea what they could do wrong), or maybe the Google implementation has its troubles as well.
Textsecure uses the push message for a wakeup event and notification. Getting the message only when textsecure is in foreground could mean that microg has disconnected from the gms server, I experience the same issue.
You should check your logcat if the heartbeat still occurs:
I can try that; is there a way to get the logs from the time when adb is
not connected? This often happens while I'm traveling, so I don't have
the phone attached to a laptop.
You can also check push functionality with a small app from play store called push notification tester
I don't have play store. (Otherwise, why would I even be interested in
this project ;-) ). Is there a similar app in F-Droid? I couldn't find any.
Great, that seems to work. Next time I get delayed TextSecure messages, I'll check the logs. After some more days of experience I have to say though that often, messages do arrive on time, so I'm no longer sure this issue is actually in GMS rather than in TextSecure.
EDIT: On the other hand, I haven't been in the same situation again that I was in when I experienced the bug: Driving over the highway at high speed, probably losing the connection to the mobile network every now and then.
I have the same problem with the newest TextSecure version released. I tried to build the newest version of android_packages_apps_GmsCore because I have hoped to fix this, but now I'm reading this issue and am not sure...
My girlfriend has the same setting, and the same error on a different device while my friends with official google-services don't have these issue in TextSecure... And Redphone doesn't show me to other Redphone-Users although I should have push-massages know...
I will check the logcat an report back...
Ok, I used the Xposed-Module "FakeGapps" but I realized that I don't need it, because I have OmniRom installed. So I uninstalled FakeGapps and restarted, know everything works fine...
Except an error in the logcat:
W/GCMRegistrarHelper(6156): GCM Not supported: java.lang.UnsupportedOperationExeption: Device does not have package com.google.android.gsf
After a few days (1.5 - 2) I have this problem again. The gcm haertbeat masseges in the logcat are not present then, too. After I restart the phone, everything gets back to normal.
Excellent, @mar-v-in . 2.51 worked without problems, but I also had not GsfProxy installed. I will see how Threema 2.51 behaves with GsfProxy and GmsCore both installed.
It seems that @mar-v-in is right: 2.51 seems to work with both GsfProxy and GmsCore installed.
EDIT: I could finally check it, the newest version of GmsCore works with Threema. Thank you @mar-v-in !
Until the new version (v0.02 I guess – any estimate when it's due?) is released: what are known actions to revive GCM?
reboot (solved it 100% for me, but is not the preferred action)
dialing *#*#CHECKIN#*#* (as mentioned in gms checkin expires #23 – is this a reliable fix? can it be automated e.g. via Tasker? if so, does it hurt to simply run it e.g. once per hour/day via automated task?)
other options? (e.g. force-stop/restart the responsible process (which? how to?))
is it recommended to use one of those "Push Notifications Fixer" apps – and if so, which one(s)? Any side-effects to expect from those?
Apart from that: is there a way for non-devs (like me) to get hold of the "current dev APK" – something like a "nightly/weekly build"? That way we might help confirming whether a certain bug/misbehavior/other_strange_thing (count me in with this one, happens to me about once per week) was fixed or is having other side-effects.
v0.02 will be published soon (maybe next week) and I will start to provide "official" signed builds on a regular base afterwards (including updates through a f-droid repository)
Thanks @julienschmidt – and of course @mar-v-in ! With that announcement, I guess I'll wait that little time and go with the official builds (they'll be more frequent then I take it?) due to signature and automatic updates (F-Droid). Looking forward to that announcement :)
@mar-v-in might be useful to link those automated builds from the README.md? And if I understood you correctly, you'll setup a separate repo for this "dev branch". I'll happily include it in my list of F-Droid Repos 😺
Since the upgrade to Threema 2.6, there seems to be again an issue with GCM. I am not sure whether this is (again) related to some undocumented command of GCM/C2DM that Threema uses or to a bug in Threema itself. (In the latter, maybe a version 2.61 will fix this. Note that I have indeed seen some reports about Push problems with Threema 2.6 and the official Google Play Services, but they may or may not be related to my problem. The general userbase does not seem to have any major problems.)
The problem: Threema no longer seems to be able to register at the GCM service (com.google.android.c2dm.intent.REGISTRATION) nor does it receive any messages (com.google.android.c2dm.intent.RECEIVE - this is probably related to the failed registration).
Wed Jan 27 13:46:16 MEZ 2016 acquireConnection: source = activityResumed, refCount = 1
Wed Jan 27 13:46:17 MEZ 2016 GCM register forced.
Wed Jan 27 13:46:17 MEZ 2016 GCM register in background.
Wed Jan 27 13:46:18 MEZ 2016 GCM registered, token = APA***E
Wed Jan 27 13:46:18 MEZ 2016 Sent push token to server.
Wed Jan 27 13:46:20 MEZ 2016 releaseConnectionLinger: source = activityPaused, timeout = 60000
Wed Jan 27 13:46:20 MEZ 2016 releaseConnection: source = activityPaused, refCount = 0
Wed Jan 27 13:46:20 MEZ 2016 onTrimMemory: 20
XPrivacy shows that a REGISTRATION was executed, and the logcat (captured with catlog) shows that GMS Core connected to the Google push server. Receiving messages works as expected.
This does not happen with version 2.6. The Threema log only shows
XPrivacy does not show a REGISTRATION action, and the logcat does not show anything either (not even an error).
The only REGISTRATION that seems to happen is after the installation of Threema 2.6 (which is also intercepted - and allowed - by XPrivacy). It does not seem to have any effect because push messages do not arrive. (As mentioned, resetting the push token should again lead to a new REGISTRATION, which does not happen.)
I am aware that this description (with a logcat that does not show anything special...) does not really help. To begin, I therefore can only ask:
Does anyone use Threema 2.6 with the newest version of GMS Core, and it works?
Should a developer want to look into this and not have a Threema licence, just send me a message, I will gladly sponsor one.
EDIT: I have (finally) installed the tools to capture logcats via USB. As I am a noob, I will have to find out how I can capture more or useful information. Or does anyone know how to capture the information specifically of GMS Core?
2nd EDIT: I must do something wrong, the logcat does not show any information with entries like "GmsGcmMcsSvc." Have I to set GMS Core to a "verbose" mode or something similar?
Just a little feedback: Heartbeat was just dead again here (still with the 0.01 of GmsCore installed). Did an adb install -r for the 0.2.0, immediately got a lot of noise (all the missed notifications came up at once and were immediately dismissed as already noticed elsewhere), and the heart started beating again – no reboot required at all :) Will watch this a little longer, but that looks very promising. 👍
Threema has been updated to 2.61. The good news is that the app now gets a com.google.android.c2dm.intent.RECEIVE if a new message has been sent to me. Unfortunately, Threema does not seem to process this, i.e. the app does nothing. Moreover, the manual renewal of the push registration token (i.e. the triggering of a com.google.android.c2dm.intent.REGISTER action) still does not seem to work (with the possible exception once after the installation of the update).
I will have to further look into this, but my logcat still does not contain anything special (at least if viewed with catlog).
EDIT: Could this now be the same error as in #75?
@xsmile answered in #100. This is very likely related. @Tentos Please create a separate issue for Threema if the problem still persists with log output
Everyone having issues with push notifications on Android 6.0: Please ensure that "Battery optimization" is disabled for microG Services Core in System Settings -> Battery -> Menu -> Battery optimization. Note that this is the case for original Play Services as it is required to keep a stable background connection.
As far as I can tell from now, problems with GCM do not occur widely and/or are specific to certain apps and custom ROMs. I am closing this issue now. If you encounter a similar issue, please create a separate issue with all details.
Activity
RalfJung commentedon Aug 18, 2015
@mar-v-in Here you go, the bug report I promised ;-)
bonanza123 commentedon Aug 18, 2015
I assume a log is needed here.
Btw., see the last comments/reports in signalapp/Signal-Android#970
RalfJung commentedon Aug 18, 2015
I just received some messages while the phone was in standby, so this is not entirely reproducible either. The bug above happened while being on a highway, so maybe it is related to unreliable data connection. Still, once the device re-gains connectivity, it should get the messages and notify me.
Now, with other TextSecure messages having the same problem, maybe TextSecure is doing something suboptimal (I have no idea what they could do wrong), or maybe the Google implementation has its troubles as well.
dajoe commentedon Aug 20, 2015
Textsecure uses the push message for a wakeup event and notification. Getting the message only when textsecure is in foreground could mean that microg has disconnected from the gms server, I experience the same issue.
You should check your logcat if the heartbeat still occurs:
You can also check push functionality with a small app from play store called push notification tester
RalfJung commentedon Aug 21, 2015
I can try that; is there a way to get the logs from the time when adb is
not connected? This often happens while I'm traveling, so I don't have
the phone attached to a laptop.
I don't have play store. (Otherwise, why would I even be interested in
this project ;-) ). Is there a similar app in F-Droid? I couldn't find any.
bonanza123 commentedon Aug 21, 2015
Try this one: https://f-droid.org/repository/browse/?fdfilter=catlog&fdid=com.nolanlawson.logcat
RalfJung commentedon Aug 21, 2015
Great, that seems to work. Next time I get delayed TextSecure messages, I'll check the logs. After some more days of experience I have to say though that often, messages do arrive on time, so I'm no longer sure this issue is actually in GMS rather than in TextSecure.
EDIT: On the other hand, I haven't been in the same situation again that I was in when I experienced the bug: Driving over the highway at high speed, probably losing the connection to the mobile network every now and then.
jensMF commentedon Aug 26, 2015
I have the same problem with the newest TextSecure version released. I tried to build the newest version of android_packages_apps_GmsCore because I have hoped to fix this, but now I'm reading this issue and am not sure...
My girlfriend has the same setting, and the same error on a different device while my friends with official google-services don't have these issue in TextSecure... And Redphone doesn't show me to other Redphone-Users although I should have push-massages know...
I will check the logcat an report back...
jensMF commentedon Aug 26, 2015
Ok, I used the Xposed-Module "FakeGapps" but I realized that I don't need it, because I have OmniRom installed. So I uninstalled FakeGapps and restarted, know everything works fine...
Except an error in the logcat:
And I could not test Redphone jet.
mar-v-in commentedon Aug 26, 2015
Can you try to use https://github.com/microg/android_packages_apps_GsfProxy ?
jensMF commentedon Aug 26, 2015
Ok, now I get no error or warning at all. Thank you!
jensMF commentedon Sep 8, 2015
After a few days (1.5 - 2) I have this problem again. The gcm haertbeat masseges in the logcat are not present then, too. After I restart the phone, everything gets back to normal.
bonanza123 commentedon Sep 9, 2015
Can you provide a full log (maybe including the period where it was still working until it failed)?
jensMF commentedon Sep 22, 2015
It was gone, but now it came back:
bonanza123 commentedon Sep 22, 2015
is it possible that at this point the internet connection was lost? Were you connected via mobile internet or WiFi?
16 remaining items
Tentos commentedon Oct 20, 2015
Excellent, @mar-v-in . 2.51 worked without problems, but I also had not GsfProxy installed. I will see how Threema 2.51 behaves with GsfProxy and GmsCore both installed.
Tentos commentedon Oct 20, 2015
It seems that @mar-v-in is right: 2.51 seems to work with both GsfProxy and GmsCore installed.
EDIT: I could finally check it, the newest version of GmsCore works with Threema. Thank you @mar-v-in !
Set FLAG_INCLUDE_STOPPED_PACKAGES on GCM intents
IzzySoft commentedon Jan 16, 2016
Until the new version (v0.02 I guess – any estimate when it's due?) is released: what are known actions to revive GCM?
*#*#CHECKIN#*#*(as mentioned in gms checkin expires #23 – is this a reliable fix? can it be automated e.g. via Tasker? if so, does it hurt to simply run it e.g. once per hour/day via automated task?)Apart from that: is there a way for non-devs (like me) to get hold of the "current dev APK" – something like a "nightly/weekly build"? That way we might help confirming whether a certain bug/misbehavior/other_strange_thing (count me in with this one, happens to me about once per week) was fixed or is having other side-effects.
julienschmidt commentedon Jan 16, 2016
@SWW13 provides automated builds here: http://files.brnmod.rocks/apps/GmsCore/Latest/
mar-v-in commentedon Jan 16, 2016
v0.02 will be published soon (maybe next week) and I will start to provide "official" signed builds on a regular base afterwards (including updates through a f-droid repository)
IzzySoft commentedon Jan 16, 2016
Thanks @julienschmidt – and of course @mar-v-in ! With that announcement, I guess I'll wait that little time and go with the official builds (they'll be more frequent then I take it?) due to signature and automatic updates (F-Droid). Looking forward to that announcement :)
@mar-v-in might be useful to link those automated builds from the
README.md? And if I understood you correctly, you'll setup a separate repo for this "dev branch". I'll happily include it in my list of F-Droid Repos 😺Squashed commit:
Tentos commentedon Jan 27, 2016
Since the upgrade to Threema 2.6, there seems to be again an issue with GCM. I am not sure whether this is (again) related to some undocumented command of GCM/C2DM that Threema uses or to a bug in Threema itself. (In the latter, maybe a version 2.61 will fix this. Note that I have indeed seen some reports about Push problems with Threema 2.6 and the official Google Play Services, but they may or may not be related to my problem. The general userbase does not seem to have any major problems.)
The problem: Threema no longer seems to be able to register at the GCM service (com.google.android.c2dm.intent.REGISTRATION) nor does it receive any messages (com.google.android.c2dm.intent.RECEIVE - this is probably related to the failed registration).
Threema offers the possibility to force a new REGISTRATION action ("Reset push token", see https://threema.ch/en/faq/push_andr ). The Threema log of Version 2.53 then reports:
XPrivacy shows that a REGISTRATION was executed, and the logcat (captured with catlog) shows that GMS Core connected to the Google push server. Receiving messages works as expected.
This does not happen with version 2.6. The Threema log only shows
XPrivacy does not show a REGISTRATION action, and the logcat does not show anything either (not even an error).
The only REGISTRATION that seems to happen is after the installation of Threema 2.6 (which is also intercepted - and allowed - by XPrivacy). It does not seem to have any effect because push messages do not arrive. (As mentioned, resetting the push token should again lead to a new REGISTRATION, which does not happen.)
I am aware that this description (with a logcat that does not show anything special...) does not really help. To begin, I therefore can only ask:
Does anyone use Threema 2.6 with the newest version of GMS Core, and it works?
Should a developer want to look into this and not have a Threema licence, just send me a message, I will gladly sponsor one.
To conclude, my system:
Android 4.2.2
Version 0.2.0 of GMS Core (downloaded at http://files.brnmod.rocks/apps/GmsCore/Latest)
Signature spoofing with the FakeGapps Xposed module
Push works with WhatsApp & Push Notification Tester
EDIT: I have (finally) installed the tools to capture logcats via USB. As I am a noob, I will have to find out how I can capture more or useful information. Or does anyone know how to capture the information specifically of GMS Core?
2nd EDIT: I must do something wrong, the logcat does not show any information with entries like "GmsGcmMcsSvc." Have I to set GMS Core to a "verbose" mode or something similar?
IzzySoft commentedon Feb 1, 2016
Just a little feedback: Heartbeat was just dead again here (still with the 0.01 of GmsCore installed). Did an
adb install -rfor the 0.2.0, immediately got a lot of noise (all the missed notifications came up at once and were immediately dismissed as already noticed elsewhere), and the heart started beating again – no reboot required at all :) Will watch this a little longer, but that looks very promising. 👍Tentos commentedon Feb 6, 2016
Threema has been updated to 2.61. The good news is that the app now gets a com.google.android.c2dm.intent.RECEIVE if a new message has been sent to me. Unfortunately, Threema does not seem to process this, i.e. the app does nothing. Moreover, the manual renewal of the push registration token (i.e. the triggering of a com.google.android.c2dm.intent.REGISTER action) still does not seem to work (with the possible exception once after the installation of the update).
I will have to further look into this, but my logcat still does not contain anything special (at least if viewed with catlog).
EDIT: Could this now be the same error as in #75?
xsmile commentedon Feb 27, 2016
Using 6.0.1 and the current nightlies installed as system apps.
This time the heartbeat wasn't issued for several hours until I opened WhatsApp.
Here is the log: http://hastebin.com/oyoyugeyup.avrasm.
This issue might be connected to #100.
mar-v-in commentedon Feb 28, 2016
@xsmile answered in #100. This is very likely related.
@Tentos Please create a separate issue for Threema if the problem still persists with log output
Everyone having issues with push notifications on Android 6.0: Please ensure that "Battery optimization" is disabled for microG Services Core in System Settings -> Battery -> Menu -> Battery optimization. Note that this is the case for original Play Services as it is required to keep a stable background connection.
As far as I can tell from now, problems with GCM do not occur widely and/or are specific to certain apps and custom ROMs. I am closing this issue now. If you encounter a similar issue, please create a separate issue with all details.