Bug - when rebooting profiles and tasks not working as expected

118 views
Skip to first unread message

Rich D

unread,
Dec 24, 2019, 5:18:49 AM12/24/19
to Tasker Google Groups Post
Hi João,
I tried the tasker 'Report Issue To Developer ' However since this issue involves a re-boot it did not work.

There seems to be at least  2 issues when re-booting.

1- With the profile  AtHomeProfile

When rebooting the the AtHomeProfile goes inactive which starts the exit task. The exit task definitely runs however it is not shown in the run log. The major issue is even though the first action is a 'stop' action and I have the variable set action disabled the global variable %AdrHome Is getting set To: 0  . In testing it seems to run all the actions in the task even if they are disabled and if the are 'IF' conditions in the task they are ignored. 


2- With the profiles 'Var Set' and 'Var Not Set'

 When rebooting the  'Var Set' profile goes inactive however the exit task does not run. In addition before the device shuts down the  'Var Set'  profile goes active and the enter task is run before the device shuts down. In addition I would expect the  'Var Not Set' profile to active when the  'Var Set' profile goes inactive However it does not. 

Thanks,. Rich




    Profile: AtHomeProfile (1348)
    State: AutoLocation Geofences [ Configuration:Geofence Name: home test
    Status: Inside ]
    Enter: Location Enter (1337)
    A1: Variable Set [ Name:%AdrHome To:1 Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    
    Exit: Location Exit (1338)
    A1: Stop [ With Error:Off Task: ] 
    A2: [X] Variable Set [ Name:%AdrHome To:0 Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    
    Profile: Var Set (1352)
    Restore: no
    State: Variable Value  [ %Mytestvar ~ 1 ]
    Enter: Var Enter (1339)
    A1: Variable Set [ Name:%Var_test To:1 Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    
    Exit: Var Exit (1340)
    A1: Variable Set [ Name:%Var_test To:0 Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    
    Profile: Var Not Set (1353)
    Restore: no
    State: Variable Value  [ %Mytestvar !~ 1 ]
    Enter: dummy (978)
    A1: Stop [ With Error:Off Task: ] 
    
Screenshot_20191224-051031.png

Rich D

unread,
Dec 24, 2019, 5:50:36 AM12/24/19
to Tasker Google Groups Post
Tasker version 5.9.1

Rich D

unread,
Dec 24, 2019, 5:53:07 AM12/24/19
to Tasker
Android version 9

Rich D

unread,
Dec 24, 2019, 7:47:02 AM12/24/19
to Tasker Google Groups Post
Correction...

After further testing the variable set contexts 'do' exhibit the strange exit task behavior as described in the first profile.  so for the purposes of this bug report the 'AtHomeProfile' can be ignored.  I have edited the variable set issues below. 


2- With the profiles 'Var Set' and 'Var Not Set'

 When rebooting the  'Var Set' profile goes inactive and the exit task runs. However it is not shown in the run log and it appears any conditional 'IF' conditions in the task are ignored and the stop task action is also ignored as well as the disabled action feature is also ignored.  I have the variable set action disabled but the global variable %Var_test  Is getting set To: 0   In testing it seems to run all the actions in the task even if they are disabled and if the are 'IF' conditions in the task they are ignored. 

In addition before the device shuts down completly the  'Var Set'  profile goes active again and the enter task is run before the device shuts down. In addition I would expect the  'Var Not Set' profile to go active when the  'Var Set' profile goes inactive However it does not. 

Thanks, Rich.. 

Adrian Wood

unread,
Mar 2, 2020, 4:36:04 PM3/2/20
to Tasker
Hi Rich

Was there any response to this bug?

Marta Hintz

unread,
Mar 3, 2020, 7:20:57 AM3/3/20
to Tasker
jao is still on vacation....

Rich D

unread,
Mar 4, 2020, 9:40:56 AM3/4/20
to Tasker Google Groups Post


Was there any response to this bug?


Actually no. And I kind of lost track of this one. João answer the few post yesterday but I'm not sure he's actually back from vacation. 

I'll see if I can find my test files tonight and confirm the bug still exists in the beta. Then post another bug report.



Rich D

unread,
Jun 26, 2020, 9:21:59 PM6/26/20
to Tasker
Bump....
@ João .. I believe you were on vacation when I posted this before...

Rich D

unread,
Jun 30, 2020, 12:23:17 PM6/30/20
to Tasker Google Groups Post
Bumpity bump bump.....  

Jimmy Jimmy

unread,
Jul 1, 2020, 3:28:30 AM7/1/20
to Tasker
I imported your project but could not replicate the issues you described. I have restarted my device a few times and I have the same logs every time:

1. Var Set stays inactive all the time. Expected, as %Mytestvar is not set anywhere.
2. Var Not Set goes inactive right before Tasker is killed on shut down. Expected.
3. Var Not Set beomes active on reboot and the "dummy" entry task is run. Expected.

Tested on Samsung S9+ on Android 10.

Rich D

unread,
Jul 1, 2020, 6:49:59 AM7/1/20
to Tasker Google Groups Post

I imported your project but could not replicate the issues you described

Sorry about that not sure why but both of those profiles were not monitoring the correct variable. They should both be monitoring the %Var_test variable.  You also need to manually set that variable to 1 before testing so the Var Set profile is active before shutting down. Here is the corrected project. 



adrianp...@gmail.com

unread,
Sep 27, 2020, 3:38:31 AM9/27/20
to Tasker

Any update on this?  If it is still happening, it is a significant bug.  Thanks Rich for raising this.

João Dias

unread,
Sep 29, 2020, 5:33:34 AM9/29/20
to tas...@googlegroups.com
 Ok, I'm taking another look at this now. Sorry for the long delay. Will update with findings.

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias

joaomgcd

unread,
Sep 29, 2020, 6:34:31 AM9/29/20
to Tasker
Ok, so I took a closer look at this, and this is what's happening:

  • Tasker only runs variable actions when the phone is shutting down for whatever reason. Maybe cause those are the faster actions?
  • Tasker was running all variable actions instead of just the ones that are enabled
I've fixed that "running when disabled" bug in this version:  https://drive.google.com/file/d/1MHWlVLGfwJmMRWRKlhFSFl5vCgOah3Ew/view?usp=sharing

Could you please try that? :)

Thank you very much for your patience!

Rich D

unread,
Sep 29, 2020, 6:53:31 AM9/29/20
to Tasker Google Groups Post
Could you please try that? :)


Thank you, I should be able to test this later tonight. Just to clarify though... in addition to Tasker running disabled actions it also ran actions that were contained within an if condition even though the if condition was false. 

Thanks, Rich..

João Dias

unread,
Sep 29, 2020, 7:10:26 AM9/29/20
to tas...@googlegroups.com
Yeah, it simply ran all variable actions. But only variable actions. None of the other actions are ran.

Rich D

unread,
Sep 29, 2020, 12:22:40 PM9/29/20
to Tasker Google Groups Post
Okay so just for clarification you said this fix will address the disabled issue with the disabled actions.  Will it also fix the issue with the if conditions?

João Dias

unread,
Sep 29, 2020, 12:56:27 PM9/29/20
to tas...@googlegroups.com
Oh, right :/ I didn't think of that until now, you're right...

Hmmm, will have to find a way to fix those too...

Rich D

unread,
Sep 29, 2020, 4:35:04 PM9/29/20
to Tasker Google Groups Post

Hmmm, will have to find a way to fix those too...

Thank you for looking into it. 

I think you could get away with having tasker not run certain actions because of a reboot be considered expected behavior. However running actions incorrectly would just be considered a bug.  

Would it be possible to set some type of flag at the start of a reboot condition.  for example it would be nice to have a option in the profile properties to not have it go active or inactive when in a reboot condition. As well as have this information available within a task so you could take appropriate measures during a reboot condition. 

Thanks, Rich

João Dias

unread,
Sep 30, 2020, 4:01:23 AM9/30/20
to tas...@googlegroups.com
What about simply not having anything run when the device is shutting down? Would that shock you? :P To me it doesn't even make sense in the first place... It makes even less sense to run only variable actions...

Rich D

unread,
Sep 30, 2020, 5:10:03 AM9/30/20
to Tasker Google Groups Post


What about simply not having anything run when the device is shutting down? Would that shock you? :P To me it doesn't even make sense in the first place... It makes even less sense to run only variable actions...


Well, you might be on to something there. I never took the time to see exactly which profiles would be affected by a shutdown.  I just checked and it seems the only ones that are triggered for me are ones with a wifi near context and ones with a variable value context.  I can understand the WiFi Near context going inactive as wifi has most likely shut down but the variable value context makes no sense because the variable value has not changed. This also seems to be buggy as it will go inactive upon shutdown then go active again before shutdown is complete.  

So in my little world making it so nothing was triggered would make perfect sense. .....   ¯\_(ツ)_/¯ ....

Thanks,  Rich.. 

João Dias

unread,
Sep 30, 2020, 5:24:35 AM9/30/20
to tas...@googlegroups.com
I'll make that change and see if anyone complains then :P Thanks!

Nors233

unread,
Mar 30, 2021, 1:41:19 AM3/30/21
to Tasker
Hello Joao, im on the latest version and this issue has recently come up for me. I made a similar post about it but it might be better to mention here.  There's a bug with tasker not restoring settings  if you restart the phone while the profile is active.

Steps to reproduce:
1. Set a profile with time trigger 10pm - 7am and enable restore settings.
2. Put any task in (I use change wallpaper )
3. Restart the phone anytime while the profile is active .
4. When the profile ends the wallpaper does not change back.

Since I did not specify an exit task for my profile. When the phone restarts, then Tasker thinks the original wallpaper I had was the one I just changed to. Thus it doesn't restore the original wallpaper (before restart) when the task ends.

In other words:

The profile goes active for the first time and changes the wallpaper  from 'A'  to 'B' , when shutdown starts tasker does nothing per the new fix. So it does not run a exit task (which my profile does not have) "And it does not restore any setting on shutdown"' so the device is shutdown with the same wallpaper 'B' which android now stores to reapply  at start up . When the device boots tasker will run the enter task again so this is where it gets its new restore point Wallpaper 'B' and sets the wallpaper to 'B'.  Now when it goes inactive the wallpaper is restored to 'B'.

Hope that makes sense and you can apply a fix for it.

João Dias

unread,
Mar 31, 2021, 10:33:46 AM3/31/21
to tas...@googlegroups.com
Hi there. Unfortunately I don't think I can fix it because Tasker doesn't always have time to do everything it wants on shutdown. When the entry task runs again on boot Tasker doesn't know that it needed to have run that exit Task on the previous shutdown so it will not be able to restore the correct wallpaper. 

My advice for situations like these is to have a variable like %Night which is set when time is 10PM - 7AM and then have a profile for %Night Is Set where you set the night wallpaper and another one for %Night Not Set where you set the day wallpaper.

Hope this helps!
Reply all
Reply to author
Forward
0 new messages