Wait until trigger action doesn't work properly when the macro is disabled

Pepy

Member
When the macro is disabled, it's not able to detect the trigger but will still timeout.

This happens with any trigger, not just the one used in the example recording.

Version: 5.37.12
 

Attachments

  • Screen_Recording_20231019_185907_MacroDroid.zip
    2.4 MB · Views: 9

dhj49er

Well-known member
When the macro is disabled, it's not able to detect the trigger but will still timeout.

This happens with any trigger, not just the one used in the example recording.

Version: 5.37.12
I've used the attached macro to test MD wait for trigger behaviour when the macro is disabled. The wait for trigger has a continue timeout set for 10 seconds.

In all the following cases I have run the test via the test macro action.

1st test - run the macro and wait > 10 secs
The macro begins popup message is displayed and 10s later the macro continues popup message is displayed.
This is the expected behaviour.

2nd test - run the macro and disable the macro after a few seconds.
Only the macro begins popup message is displayed. The macro continues popup message is not displayed no matter how long I wait.
Again this is the expected behaviour.

3rd test - repeat test 2 and enable the macro (a few seconds after disabling it).
Only the macro begins popup message is displayed. On switching off the phone and back on, the macro continues popup message is displayed.
I believe this is the expected behaviour.

It appears that when the macro is disabled on a wait for trigger with timeout, the timeout is stopped. Re-enabling the macro doesn't appear to restart the timeout, which makes sense.

Unfortunately, I'm not seeing the timeout complete when the macro is disabled.
 

Attachments

  • Screenshot_20231020_080946_MacroDroid.jpg
    Screenshot_20231020_080946_MacroDroid.jpg
    282.2 KB · Views: 7

dhj49er

Well-known member
I repeated the above tests with the timeout changed from continue to cancel after 10s.

When I disabled the macro MD generated a warning message - see the attached system log. I didn't get a warning message when the timeout was set to continue.

Apart from these tests I have never used disable macro when the macro is running.

I find I use cancel macro, as I need to stop a macro running.
 

Attachments

  • Screenshot_20231020_093725_MacroDroid.jpg
    Screenshot_20231020_093725_MacroDroid.jpg
    402.7 KB · Views: 4

Pepy

Member
It appears that when the macro is disabled on a wait for trigger with timeout, the timeout is stopped. Re-enabling the macro doesn't appear to restart the timeout, which makes sense.
Shouldn't the timeout continue to keep going like with the Wait until next action action? If it changes your timeout to no timeout I wouldn't say it's working as expected.
Unfortunately, I'm not seeing the timeout complete when the macro is disabled.
If it was already disabled before being run it should say in the log based on my initial testing. Perhaps you thought it didn't complete since the popup didn't show due to it being disabled.
When I disabled the macro MD generated a warning message - see the attached system log. I didn't get a warning message when the timeout was set to continue.
Is this on the beta? I have not seen a single warning after repeating your tests.
 

dhj49er

Well-known member
Shouldn't the timeout continue to keep going like with the Wait until next action action? If it changes your timeout to no timeout I wouldn't say it's working as expected
I believe disabling a macro stops all processing of the macro actions including any ongoing timeout.

Re<enabling the macro and it never ran the action after the wait action. The popup message never displayed and the system log did not show any actions.

I believe this is the expected behaviour.

I was on the latest beta when I did the testing.

If you are convinced it is not working as it should, I suggest you generate a bug report.
 

Pepy

Member
I believe disabling a macro stops all processing of the macro actions including any ongoing timeout.

Re<enabling the macro and it never ran the action after the wait action. The popup message never displayed and the system log did not show any actions.

I believe this is the expected behaviour.
I thought it only seemed like it did due to how fast it goes through the actions (hence the importance of the Wait for next action action).
If you are convinced it is not working as it should, I suggest you generate a bug report.
Isn't this supposed to be where I report bugs?
 

Attachments

  • Screenshot_20231024_021001_MacroDroid.png
    Screenshot_20231024_021001_MacroDroid.png
    87.9 KB · Views: 5
  • Screenshot_20231024_111845_MacroDroid.png
    Screenshot_20231024_111845_MacroDroid.png
    77.4 KB · Views: 3

dhj49er

Well-known member
I thought it only seemed like it did due to how fast it goes through the actions (hence the importance of the Wait for next action action).

Isn't this supposed to be where I report bugs?
No...report bugs from MD.

Select the 3 dots ....top left hand corner
Select Toubleshooting
Select Report a Bug

Not sure what your test macro has to do with the issue, as there is no wait for trigger action.
 

Pepy

Member
No...report bugs from MD.

Select the 3 dots ....top left hand corner
Select Toubleshooting
Select Report a Bug
Thanks. Was looking at the beta feedback thread and thought this was what the dev meant by "troubleshooting section".
Not sure what your test macro has to do with the issue, as there is no wait for trigger action.
I believe disabling a macro stops all processing of the macro actions including any ongoing timeout.
To show that disabling doesn't stop the macro but rather skip or prevent the actions from actually doing anything.
 

dhj49er

Well-known member
Thanks. Was looking at the beta feedback thread and thought this was what the dev meant by "troubleshooting section".


To show that disabling doesn't stop the macro but rather skip or prevent the actions from actually doing anything.
The system log shows actions from test macro such as wait for trigger which aren't in the screenshot of macro test.

So I still don't see how you claim disabling a macro doesn't stop but rather skip or prevent actions from doing anything, not from your screenshots.
 

Pepy

Member
The system log shows actions from test macro such as wait for trigger which aren't in the screenshot of macro test.

So I still don't see how you claim disabling a macro doesn't stop but rather skip or prevent actions from doing anything, not from your screenshots.
Those are from previous tests before I reconfigured. Check out the latest test. But anyway, I reuploaded it with the log cleared.
 

dhj49er

Well-known member
What do you mean? The log matches the contents of the macro now, what else is there to change?

Yeah, I just did. The issue I originally reported with it not responding while disabled and the one you found about the timeout not resuming after reenabling.
The test macro is for a wait action not a wait for trigger. So this doesn't show the original issue.

Is this the macro you used to report the bug?
 

Pepy

Member
The test macro is for a wait action not a wait for trigger. So this doesn't show the original issue.
The screenshots in the reply were in response to this:
I believe disabling a macro stops all processing of the macro actions including any ongoing timeout.
You made it sound like it stops the processing of any module, so I used a Wait until next action action to show that it continued to work even after the macro was disabled.
Is this the macro you used to report the bug?
So no, they weren't for the bug I originally reported. There's another set of screenshots in the OP for that.
 

dhj49er

Well-known member
I've tried disabling and enabling the test macro shown in the screenshot.

The system log screenshot shows multiple tests. The first is to let the macro run without disabling, to show the macro working correctly. This is the only time the test continues popup message is displayed.

It is not displayed whenever I disable the test macro, even if I subsequently enable it.

But if your assertion is correct shouldn't it be displayed?

Why the difference in test results?

Perhaps the difference is that in your test you are only giving MD 1 sec to disable a macro before enabling the macro. That may be too fast and is unlikely to be a real world use case.
 

Attachments

  • Screenshot_20231025_200402_MacroDroid.jpg
    Screenshot_20231025_200402_MacroDroid.jpg
    256.7 KB · Views: 3
  • Screenshot_20231025_200308_MacroDroid.jpg
    Screenshot_20231025_200308_MacroDroid.jpg
    242.4 KB · Views: 3
Last edited:

Pepy

Member
It is not displayed whenever I disable the test macro, even if I subsequently enable it.

But if your assertion is correct shouldn't it be displayed?

Why the difference in test results?

Perhaps the difference is that in your test you are only giving MD 1 sec to disable a macro before enabling the macro. That may be too fast and is unlikely to be a real world use case.
Same result if I wait for longer than a second before reenabling. Interestingly enough, it seems that it remains that way as long as it's 4 seconds or less; any longer than that and it'll get cancelled as soon as it's disabled.
When I disabled the macro MD generated a warning message - see the attached system log. I didn't get a warning message when the timeout was set to continue.
So unfortunately the dev said it will take too much effort to fix and that they would include that warning in the next version to make it clearer.
 

Attachments

  • Screenshot_20231026_081827_MacroDroid.png
    Screenshot_20231026_081827_MacroDroid.png
    134.5 KB · Views: 4

Endercraft

Moderator (& bug finder :D)
Disabled macros and wait actions really are something ! That's not the only issue with this specific configuration.
 
Top