Charging Only Run Condition is no longer working as expected

It seems that with the most recent update, the ability to run only when charging is broken. When I try to open the app with this enabled (and plugged in), I get the “Syncthing is disabled. Do you want to change your preferences?”. Removing the “Run only on wifi” condition makes no difference either.

I use the following Run Conditions on my Nexus 6P running Oreo 8.0.0:

  • Always run in background
  • Run only when charging
  • Run only on wifi.

I believe this started with the latest Syncthing update on Android (0.9.16) that happened on October 10th.

Thanks.

— Update ---- A reboot fixed the issue. Sorry about that.

So I thought that a reboot fixed the issue, however it’s happening again.

It seems as though Syncthing isn’t honouring the current battery state. Once I rebooted, and plugged in, it was working fine. When I unplugged, however, Syncthing kept running and eating my battery despite the “Only run when plugged in” option being enabled.

Once I restarted Syncthing, I got the “Syncthing is disabled. Do you want to change your preferences?” screen. However, it still refuses to run when I plug my phone in.

It’s definitely acting up since the last Syncthing update.

Can you post a logcat?

Here’s what I was able to pull out what looked meaningful. Let me know it’s helpful or not.

This was after I first launched Syncthing it on battery with the “run only when plugged in” option enabled… After that I plugged into power and got that "Syncthing is disabled… " popup.

Thanks

Okay found it, another Android 8 “optimization” that breaks stuff. Can you check if changes in wifi run conditions work correctly?

https://commonsware.com/blog/2017/04/11/android-o-implicit-broadcast-ban.html

Awesome. I saw the patch on github for it as well. Looks good!

Yep, transitioning from cellular to wifi (and back) works. It seems that only the battery state change is affected by the bug.

Cheers

2 Likes