Tasker Hangs at Wifi Action, When Another Wifi Action was Previously Carried Out in Another Task
- Tasker can successfully turn on/off Wi-Fi of the device. (With https://github.com/joaomgcd/TaskerSettings .)
Problem Reproduction (sequential steps) :
1) Make sure device is more than "capable" in terms of processing power (e.g. at least mid-range smartphones). Make sure device has more than enough free storage memory (e.g. 200 GB). Make sure device has more than enough free RAM memory (e.g. 8 GB). Make sure device doesn't have many other apps opened, or run, or even installed. Make sure device is problem-free (fully up-to-date, no virus, etc.). You get the idea... You could also say, make sure device is brand-new and has just been unpackaged. Bonus point: Make sure device is neither rooted, nor does it use non-stock ROM/OS.
2) Make sure device can otherwise run Tasker normally.
3) Make sure that every single battery optimization measure for Tasker on the device is turned off (terms could be, among others, background running, auto-launch, battery optimization).
4) Make sure to give Tasker every single permission it demands. Bonus point: Also every single permission it doesn't demand, but can be given. My restriction personally on principle: no ADB Wi-Fi though.
5) Set up these tasks :
- Task T1 : (below are its list of actions)
- A1: Wifi - turn off
- Task T2 : (below are its list of actions)
- A1: Wifi - turn on
- A2: Beep.
6) Have no other tasks running.
7) Have no profiles enabled.
8) Run T1.
9) Run T2.
Problem : Tasker hangs at / right after T2-A1, because T1 was run. Wi-Fi is successfully turned on, though. T2-A2 is never reached, or is reached but after a very long amount of time (probably min. 1 hour). In this condition, Tasker seems to be in a not-normal state (I'm lazy to write verbosely, but what can I say, a trained eye can see when a software doesn't run normally). It seems that Tasker has some internal bugs with handling Wi-Fi.
The problem is consistently reproducible on the device.
If T1-A1 is exactly the same with T2-A1. i.e. both Wifi - turn on (or both Wifi - turn off), then the problem doesn't happen.
Upon inspecting the log that can be let run, everything seems as it should. Tasker just doesn't continue carrying out actions after the T2-A1.
Enabling "Continue task after error" on T2-A1 doesn't help. What also doesn't help is setting these in preferences: Tasker can queue 100 tasks ; Disable "reduce resource usage".
In summary : Tasker always hangs at a Wifi - turn on action, when another task previously runs a Wifi - turn off action; and vice-versa. If both are turn on or turn off, then no problem at all.
Please forgive my confidence, but this is 99% an internal bug; an unintended behavior (i.e. this is not an error on my side as Tasker user). I humbly make many mistakes, but I was quite thorough with checking this.