在退出应用程序后,WhatsApp MessionService始终始终丧失 -- whatsapp-messenger 领域 和 task-management 领域 和 services 领域 android 相关 的问题

WhatsApp MessageService is always killed shortly after exiting the app


简体版||繁體版
1
vote

问题

中文

几天前我注意到我不再收到WhatsApp消息,直到我手动启动应用程序,这是待定消息一次交付时。

我通过监视应用程序管理器中的 abcdefghijklmncom.whatsapp.messaging.MessageService 来开始调查。

这就是它首先看起来像什么,在我退出whatsapp之后:

在此处输入图像描述

这是几分钟后看起来像的:

输入图像描述

看起来 MessageService quit,或者它被终止。要验证此操作,我使用adb检查。我最初可以看到服务:

  $ adb shell dumpsys activity services | grep wh   * ServiceRecord{43deec28 u0 com.whatsapp/.messaging.MessageService}     intent={act=com.whatsapp.messaging.MessageService.START cmp=com.whatsapp/.messaging.MessageService}     packageName=com.whatsapp     processName=com.whatsapp     baseDir=/data/app/com.whatsapp-1.apk     dataDir=/data/data/com.whatsapp     app=ProcessRecord{42d19f90 10037:com.whatsapp/u0a10187}   

但随后此服务消失,即使主要过程仍在运行:

  $ adb shell ps | grep wh u0_a187   10037 215   988084 78996 ffffffff 00000000 S com.whatsapp   

服务不会同时终止。在退出Whatsapp后,我已经看到它早6分钟杀死,11分钟。但在绝大多数情况下,它在第8分钟终止了一段时间。

我已经仔细检查了在服务终止时使用以下logcat查询期间仔细检查 logcat ,我认为只有我不关心的东西:

  adb logcat -v time LightSensor:s LightsService:s  SensorService:s SensorManager:s STATUSBAR-BatteryController:s BatteryService:s HeadsetStateMachine:s android.widget.GridLayout:s MP-Decision:s SignalStrength:s McClient:s McDaemon:s QcrilMsgTunnelSocket:s | grep -v ss_tz_mobicore | grep -v ss_daemon   

我无法在日志中看到任何东西会暗示服务发生的事情。它戒了吗?有点杀了吗?我怎样才能发现?

我认为也许服务已被终止B / C在RAM上低于OS,但这似乎不是那么。这是终止时的RAM:

  $ adb shell free -m              total         used         free       shared      buffers Mem:          1821         1587          234            0           75 -/+ buffers:               1511          310 Swap:          399          134          265   

在处理此问题时,我使用Titanium Backup冻结可能干扰WhatsApp的正常操作的所有应用程序,因此这些是我冻结的应用程序:

  • 绿化
  • 放大
  • xprivacy

我也关闭了"每个应用黑客攻击" ,这是一个Xposed模块。

如何了解如何了解为什么MessionService被终止?

编辑1 :有可能是否有可能被终止终止,并且在有新消息时依赖于GCM依赖于GCM?

english

A couple of days ago I noticed that I no longer receive WhatsApp messages until I manually start the app, which is when the pending messages get delivered all at once.

I started my investigation by monitoring the com.whatsapp.messaging.MessageService in the Application Manager.

Here's what it looks like at first, after I exit WhatsApp:

enter image description here

And here's what it looks like a few minutes later:

enter image description here

It looks like the MessageService either quit, or it was terminated. To verify this, I checked with adb. I can see the service at first:

$ adb shell dumpsys activity services | grep wh   * ServiceRecord{43deec28 u0 com.whatsapp/.messaging.MessageService}     intent={act=com.whatsapp.messaging.MessageService.START cmp=com.whatsapp/.messaging.MessageService}     packageName=com.whatsapp     processName=com.whatsapp     baseDir=/data/app/com.whatsapp-1.apk     dataDir=/data/data/com.whatsapp     app=ProcessRecord{42d19f90 10037:com.whatsapp/u0a10187} 

But then this service disappears, even though the main process is still running:

$ adb shell ps | grep wh u0_a187   10037 215   988084 78996 ffffffff 00000000 S com.whatsapp 

The service does not get terminated at the same time. I have seen it killed as early as 6 minutes after exiting WhatsApp, and as late at 11 minutes. But in the vast majority of cases, it is terminated some time on the 8th minute.

I have carefully examined the logcat during the moment of service termination with the following logcat query, which I believe silences only the stuff I don't care about:

adb logcat -v time LightSensor:s LightsService:s  SensorService:s SensorManager:s STATUSBAR-BatteryController:s BatteryService:s HeadsetStateMachine:s android.widget.GridLayout:s MP-Decision:s SignalStrength:s McClient:s McDaemon:s QcrilMsgTunnelSocket:s | grep -v ss_tz_mobicore | grep -v ss_daemon 

I was not able to see anything in the logs that would hint at what happened to the service. Did it quit? Did something kill it? How can I find out?

I thought that maybe the service was terminated b/c the OS was low on RAM, but this does not appear to be so. Here's the RAM at the moment of termination:

$ adb shell free -m              total         used         free       shared      buffers Mem:          1821         1587          234            0           75 -/+ buffers:               1511          310 Swap:          399          134          265 

While working on this issue, I have used Titanium Backup to freeze all apps that might interfere with normal operation of WhatsApp, so these are the apps I froze:

  • Greenify
  • Amplify
  • XPrivacy

I also turned off "Per App Hacking", which is an Xposed Module.

Any ideas on how I can learn more about why MessageService is being terminated?

EDIT 1: Is it possible that MessageService is supposed to get terminated, and that WhatsApp relies on GCM to be notified when there are new messages?

        

回答列表

0
 
vote

我一直与你的问题完全相同。我也可以看到MessionService服务在大约10分钟后被杀死。杀死服务后,仅在打开应用程序时才收到消息。虽然今天谷歌曲为这个问题,但巧合地发现了你在3小时前发布的这个线程。

我正在使用我安装了cyanogenmod 13的新手机。我已经尝试改变与电池使用,内存优化等有关的几个设置,但无济于。

我在2天前开始使用这款手机,从那时起就已经发生了WhatsApp问题。明天我将尝试卸载并重新安装WhatsApp从播放商店,因为此一个从泰坦尼亚级备份备份恢复。我在一个关于这样做的论坛中看到了一个解决类似问题的人......他也从泰国备份恢复并有这样的问题。

顺便说一下,你的关于GCM的理论似乎指向正确的方向 - 在我妻子的手机中,MessionService服务也在大约10分钟后杀死,但是,她没有接收WhatsApp消息的任何延迟 - 所以也许它确实依赖于GCM。

让我知道您是否在调查或解决方案方面取得任何进展。让我也知道我是否可以帮助你别的什么。

 

I've been having exactly the same issue as yours. I can also see that the MessageService service is being killed after around 10 minutes. After the service is killed, messages are only received when opening the app. While googling today for this problem, coincidentally found this thread which you had posted just 3 hours ago.

I'm using a new phone on which I installed Cyanogenmod 13. I've already tried to change several settings related to battery usage, memory optimization etc., but to no avail.

I've started using this phone 2 days ago and the whatsapp issue has been happening since then. Tomorrow I'll try to uninstall and reinstall whatsapp from the Play Store, since this one was restored from a Titanium Backup backup. I saw in a forum someone who resolved a similar issue by doing that... he also had restored from a TiBu backup and was having such problem.

By the way, your theory about GCM seems to point to the right direction - in my wife's phone the MessageService service is also killed after around 10 minutes, however, she doesn't have any delays in receiving whatsapp messages - so maybe it indeed relies on GCM for that.

Let me know if you make any progress on the investigation or come to a solution. Let me also know if I can help you with anything else.

 
 
   
   

相关问题

3  运行的应用程序和服务是安全的,以便关闭? [复制]  ( What running applications and services are safe to turn off ) 
这个问题已经在这里有答案: 关闭 10年前。 可能的重复: 知道哪些应用程序停止 我刚收到了一个使用的nexus,我看到了很多运行的服务和应用程序。我想知道如果我刚开始关闭它们会有什么负面影...

3  如何在启动时运行可执行文件并将其保持运行?  ( How to run an executable on boot and keep it running ) 
我有一个来自 ndk-build 程序的可执行构建。我想在rooted android设备上运行它。 Android将杀死我可执行的可能性是多少? 使用 adb shell ,我能够使用以下命令执行我的可执行文件: adb push executable /sdcard adb shell device:/ $ ...

3  我的谷歌语音服务一直陷入“重新启动”  ( My google voice services keeps getting stuck on restarting ) 
Google语音的"UpdateService" 不断保持困扰"重新启动" ,因此我错过了从谷歌语音接收短信。我已经在一些不必要的服务上修剪了下来,看起来它似乎有助于一大批。关于这个问题的任何其他建议或想法? 我目前正在运行cm6,但它也发生在股票之前。 ...

1  如何使用背景中的应用程序对Android进行网络调用[已关闭]  ( How to make network calls on android with an app in the background ) 
关闭。这个问题是 off-topic 。它目前不接受答案。 想要改进这个问题?更新这个问题,所以它是关于android爱好者堆栈交换的主题。 关闭 ...

1  在退出应用程序后,WhatsApp MessionService始终始终丧失  ( Whatsapp messageservice is always killed shortly after exiting the app ) 
几天前我注意到我不再收到WhatsApp消息,直到我手动启动应用程序,这是待定消息一次交付时。 我通过监视应用程序管理器中的 abcdefghijklmncom.whatsapp.messaging.MessageService 来开始调查。 这就是它首先看起来像什么,在我退出whatsapp之后: 这是几分...

3  “system_server” - Bluetoothphoneservice会导致高CPU使用率  ( System server bluetoothphoneservice causes high cpu usage ) 
我在Nexus 4上使用Android 5.1,几个月前将注意到电池排水量快。思考我需要将Android更新到较新版本我决定首先检查CPU使用情况,并发现进程"System_server" - BluetoothPhoneservice会导致高CPU使用率: 在其他论坛和其他有同样的论坛上进行了研究,但我没...

5  启动Services [重复]  ( Start services at boot ) 
这个问题已经在这里有一个答案: 打开启动/启动后的应用程序 (1答) 关闭...

10  如何防止在后台运行服务? [复制]  ( How can i prevent services from running in the background ) 
这个问题已经在这里有一个答案: 关闭 8年前。 可能的重复: 如何停止运行的应用程序和服务? 是否有一种方法来防止在后台自动运行的服务应用程序(或任何其他应用程序)? ...

2  ICSService进程做了什么?  ( What does the icsservice process do ) 
在运行服务下,我看到 icsservice 或long name com.android.samsung.icsservice 。那个过程做了什么?我正在争论删除它。 注意我有一个AT& T Samsung Captivate(Galaxy S) ...

0  为什么WidgetLocker应用程序逃避我的任务杀手?  ( Why is widgetlocker app evading my task killer ) 
WidgetLocker应用程序(屏幕锁定替换应用程序)有一个服务运行,我可以在我的App Manager(电话设置下)中看到,但不是在我的任务杀手应用程序(高级任务管理器)中。它的服务如何逃避我的任务杀手? 我可以在Phones App Manager中停止其服务,终止该应用程序。我没有窗口锁定器设置为我的默认主...




© 2022 it.wenda123.org All Rights Reserved. 问答之家 版权所有