[RESOLVED] Constraint for current macro running

djstf

New member
Hi,

I've added a constraint to a macro, either Macro Running or Macro Not Running on [This Macro] both produce the same error in the log:
Could not find macro with id: -1 and name: [This Macro]

I imported my macros from a backup, so I tried cloning and creating a totally new one, all with the same error.
 

dhj49er

Well-known member
I have tried the macro as shown in the attached screenshot.

Running the macro and it works as expected, as shown in the system log screenshot.

Have I replicated your use of macro running constraint?

If not could you provide a screenshot of your macro?
 

Attachments

  • Screenshot_20231116_005122_MacroDroid.jpg
    Screenshot_20231116_005122_MacroDroid.jpg
    334.5 KB · Views: 13
  • Screenshot_20231116_005109_MacroDroid.jpg
    Screenshot_20231116_005109_MacroDroid.jpg
    186.2 KB · Views: 12

djstf

New member
Hi dhj49er,

No, I was using the actual constraints option, not an action. I want to stop execution of the whole macro if its already running. Here are the screenshots...

(I know the constraint is macro running and should be macro not running...it doesnt matter, the log is the same)
 

Attachments

  • Screenshot_20231116_110836_MacroDroid.jpg
    Screenshot_20231116_110836_MacroDroid.jpg
    50.7 KB · Views: 9
  • Screenshot_20231116_110856_MacroDroid.jpg
    Screenshot_20231116_110856_MacroDroid.jpg
    111.4 KB · Views: 9

dhj49er

Well-known member
Hi dhj49er,

No, I was using the actual constraints option, not an action. I want to stop execution of the whole macro if its already running. Here are the screenshots...

(I know the constraint is macro running and should be macro not running...it doesnt matter, the log is the same)
Does the attached macro replicate your usage?

The macro runs as expected - see attached screenshot.

If I change the constraint to macro running (this macro), the macro doesn't run when the screen is turned off. Again this is the expected result.

I am not getting the error messages....so I don't think it's a bug.

Have you tried turning your phone off, wait a few seconds, then on?
 

Attachments

  • Screenshot_20231116_012551_MacroDroid.jpg
    Screenshot_20231116_012551_MacroDroid.jpg
    250.1 KB · Views: 6
  • Screenshot_20231116_012543_MacroDroid.jpg
    Screenshot_20231116_012543_MacroDroid.jpg
    401.1 KB · Views: 6

djstf

New member
Yes that macro replicates it accurately except that you wont be able to trigger it twice with a screen off trigger. Maybe try a different trigger you can fire twice, or use test macro twice?

I would assume with no errors that we have different versions of the app - mine is 5.37.12

As noted I tried with a new macro and a cloned macro, I also just restarted too. Same error.
 

dhj49er

Well-known member
The attached macro has 2 triggers, vol up press and vol down press.
I have run the macro as follows
First test:-
Press vol up & Macro runs
After ~ 5s press vol down & macro not triggered as constraint is false
After 10s count1 is incremented.
This is the expected result
Second test;-
Press vol down & macro runs
After ~5s press vol up & macro not triggered as constraint is false
After 10s count2 is incremented
This is the expected result.
Third test:-
Modify constraint from macro not running (this macro) to macro running (this macro)
Pressing vol up or vol down and the macro does not run as the constraint is false
This is the expected result.
The attached screenshot of the system log confirms tests 1 & 2.

I am using the latest beta 5.38.14

I suggest you update MD on your phone, as I'm not seeing any error messages and it's working as expected.
 

Attachments

  • Screenshot_20231116_020910_MacroDroid.jpg
    Screenshot_20231116_020910_MacroDroid.jpg
    405.8 KB · Views: 5
  • Screenshot_20231116_020857_MacroDroid.jpg
    Screenshot_20231116_020857_MacroDroid.jpg
    347.4 KB · Views: 5
Last edited:

djstf

New member
Thanks for the confirmation. I couldnt get the beta through the play store, but the issue isn't major for me so I can wait for the 5.38 stable.
I'll update when thats out.
 

djstf

New member
I got the update and tested it, the constratint is working now.
The first entry in the release notes was
"Fixed issue where Macro Running constraint did not work correctly when referencing "This Macro"
 

dhj49er

Well-known member
I got the update and tested it, the constratint is working now.
The first entry in the release notes was
"Fixed issue where Macro Running constraint did not work correctly when referencing "This Macro"
Perhaps you could change the title to remove BUG and or add RESOLVED?

This would help other users.

Thank you
 
Top