Repository navigation
Closed
Description
As already mentioned in #52 there seem to be issues with apps not getting messages. I have had this issue today in a situation where microg definitely got a GCM message and had a stable connection before and after the message but WhatsApp did not receive the message until I opened it almost an hour later. Here the log with identifiers replaced by X/x (for uppercase/lowercase hex numbers) and # (for decimal numbers):
01-11 18:12:44.882 11243 11460 D GmsGcmMcsSvc: Heartbeat initiated, reason: Intent { act=org.microg.gms.gcm.mcs.HEARTBEAT flg=0x4 cmp=com.google.android.gms/org.micro[2410/6195]
csService (has extras) }
01-11 18:12:44.882 11243 11460 D GmsGcmMcsSvc: Scheduling heartbeat in 300 seconds...
01-11 18:12:44.882 443 553 E WifiNative-wlan0: doBoolean: disable
01-11 18:12:44.890 11243 20659 D GmsGcmMcsOutput: Outgoing message: HeartbeatPing{last_stream_id_received=146}
01-11 18:12:44.960 562 562 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-STARTED
01-11 18:12:45.710 443 553 E WifiNative-wlan0: doBoolean: enable
01-11 18:12:45.733 20236 20236 D PrivacyPolice: Wi-Fi scan performed, results are: [...]
01-11 18:12:47.116 11243 20658 D GmsGcmMcsInput: Incoming message: HeartbeatAck{last_stream_id_received=146}
01-11 18:14:30.663 11243 20658 D GmsGcmMcsInput: Incoming message: DataMessageStanza{id=XXXXXXXX, from=###############, category=com.whatsapp, token=1, app_data=[AppData{key=ip, value=###.###.###.###}, AppData{key=id, value=XXXXXXXXXXXX}, AppData{key=ts, value=1452532470}], from_trusted_server=false, persistent_id=0:#############%xxxxxxxxxxxxx, sent=1452532470066}
01-11 18:14:30.710 443 12231 W ActivityManager: Unable to start service Intent { act=com.google.android.c2dm.intent.RECEIVE cat=[com.whatsapp] flg=0x10 pkg=com.whatsapp (has extras) } U=0: not found
01-11 18:15:00.999 20175 20175 D com.newsblur.service.ServiceScheduleReceiver: starting sync service
01-11 18:15:01.030 20175 23007 D com.newsblur.service.NBSyncService: Abandoning sync: app not active and network type not appropriate for background sync.
01-11 18:17:44.877 443 553 E WifiNative-wlan0: doBoolean: disable
01-11 18:17:44.877 11243 11460 D GmsGcmMcsSvc: Heartbeat initiated, reason: Intent { act=org.microg.gms.gcm.mcs.HEARTBEAT flg=0x4 cmp=com.google.android.gms/org.microg.gms.gcm.McsService (has extras) }
01-11 18:17:44.877 11243 11460 D GmsGcmMcsSvc: Scheduling heartbeat in 300 seconds...
01-11 18:17:44.877 11243 20659 D GmsGcmMcsOutput: Outgoing message: HeartbeatPing{last_stream_id_received=148}
01-11 18:17:44.963 562 562 I wpa_supplicant: wlan0: CTRL-EVENT-SCAN-STARTED
01-11 18:17:45.713 443 553 E WifiNative-wlan0: doBoolean: enable
01-11 18:17:45.768 20236 20236 D PrivacyPolice: Wi-Fi scan performed, results are: [...]
01-11 18:17:47.033 11243 20658 D GmsGcmMcsInput: Incoming message: HeartbeatAck{last_stream_id_received=147
Note also the difference in the stream id. I wonder if microg should have sent an ack message? This difference in the stream id stays the same, i.e. there was always a difference of 1 until a reconnect happened because my phone got a WLAN connection.
Metadata
Metadata
Assignees
Labels
No labels
Activity
michitux commentedon Jan 11, 2016
I've just edited the log above, somehow in the log I had before the main error was missing:
aapt dump xmltree /data/app/com.whatsapp-1.apk AndroidManifest.xmlgives meIn
dumpsys package com.whatsappI get under "grantedPermissions"com.whatsapp.permission.C2D_MESSAGEandcom.google.android.c2dm.permission.RECEIVEand forcom.google.android.gmsI getcom.google.android.c2dm.permission.SENDas granted permission.I would say this seems to be correct but I'm also relatively new to Android development so maybe I've missed something?
[Edit] Added the probably more relevant information from the manifest of WhatsApp.
pejakm commentedon Jan 12, 2016
@michitux I can't confirm yet, but it seems to me that WhatsApp started to behave correctly after I installed this: https://github.com/microg/android_packages_apps_GsfProxy/releases
pejakm commentedon Jan 12, 2016
Actually, no this just happened to me a few moments ago.
mar-v-in commentedon Jan 12, 2016
What Android version is this?
Set FLAG_INCLUDE_STOPPED_PACKAGES on GCM intents
mar-v-in commentedon Jan 12, 2016
I just added a flag that might fix this issue. Please check again with that commit included.
michitux commentedon Jan 12, 2016
I've just tested this, it still doesn't work, the flag of the intent is now different though, so your change has definitely been applied:
Signal is getting messages via GCM without any problems, there the log shows first an incoming message and then Signal says that it got a GCM message.
This is on stock CM11 2015-12-13 on a Samsung Galaxy Nexus, patched using Needle. The self-check is green apart from the system's support for spoofing signatures. I have also re-installed WhatsApp yesterday even though it had already got the C2DM-permission during the last update. WhatsApp has version 2.12.402 (downloaded from its website).
Various small fixes
Nutomic commentedon Jul 17, 2016
I'm using WhatsApp with GmsCore and don't have any problems. The only caveat is that I had to disable the Android 6 battery optimisation for GmsCore (in the system app settings). After that, messaging works fine.
WhatsApp version: 2.16.155
GmsCore version: 0.2.3-6-gbee7bc9 (from microg F-Droid repo)
Added item to disable battery optimizations (fixes microg#75, microg#113
Added item to disable battery optimizations (fixes microg#75, microg#113
Added item to disable battery optimizations (fixes microg#75, microg#113
Added item to disable battery optimizations (fixes microg#75, microg#113
Added item to disable battery optimizations (fixes microg#75, microg#113
Added item to disable battery optimizations (fixes microg#75, microg#113