wire-android_legacy icon indicating copy to clipboard operation
wire-android_legacy copied to clipboard

Wire loses server connection when device is in sleep mode

Open mss-hh opened this issue 5 years ago • 2 comments

I recently switched to a new phone running Android 10. As I don't have Google Apps installed I am using Wire's internal "maintain connection" option. On my old phone with Android 9 the server connection was stable but on Android 10 Wire disconnects immediately when the phone goes into sleep mode. As soon as I wake it up Wire reconnects and stays connected until the phone goes to sleep mode again.

Steps to reproduce the behavior:

  1. Install Wire on an Android 10 device
  2. Enable "maintain connection" option
  3. Wait until phone goes to sleep mode or put it in sleep mode manually
  4. No new messages will be received
  5. Wake up the phone
  6. The notification popup will briefly show "Connecting...", then "Connected to Wire server" message
  7. Wire will receive new messages until phone is in sleep mode again

Expected behavior: Server connection should remain active while the phone is in sleep mode

Smartphone:

  • Wire version that exhibits the issue: 3.46.890
  • Last Wire version that did not exhibit the issue (if applicable):
  • Android OS version used to run Wire: 10.0 (works on 9.0)
  • Is this a custom firmware or a stock one: custom (crDroid 6.4)
  • Mobile phone model/manufacturer: Xiaomi Redmi Note 8T
  • Mobile network type (EDGE/LTE/Wi-Fi/Offline): LTE/Wi-Fi

Additional context: Other apps using their own server connections do not have any problems on my phone so I think it is not a general Android issue.

mss-hh avatar Apr 01 '20 23:04 mss-hh

Some more observations after using my new phone for some time.

  • I thought the reason might be my phone switching between WiFi and mobile network very often. But according to my router its WiFi connection is stable, even during sleep mode.
  • Sometimes Wire stays connected for several hours but it seems to happen randomly.

mss-hh avatar Apr 30 '20 22:04 mss-hh

@mss-hh See below details,

  • Whitelist wire app from battery optimizations see https://dontkillmyapp.com/general (for custom ROMs) see https://dontkillmyapp.com/xiaomi see https://dontkillmyapp.com/google
  • Alternatively, Set wire app as device administrator (set to allow) (this definitely solve the problem in every android versions)

Aikatsui avatar Jun 04 '21 01:06 Aikatsui