Macro stops working

wrbird

Member
My macros randomly stop working after they start. This has been happening for a while now. I review the macro and everything looks good. I've found that if I reboot my phone they all work good again. Does anyone know what the issue is, or is this just a common issue with MacroDroid?
 

Josué García

MacroDroid Support
Staff member
Mis macros dejan de funcionar aleatoriamente después de comenzar. Esto ha estado sucediendo desde hace un tiempo. Reviso la macro y todo se ve bien. Descubrí que si reinicio mi teléfono, todos funcionan bien nuevamente. ¿Alguien sabe cuál es el problema, o es solo un problema común con MacroDroid?
You could review the settings mentioned here, it is possible that the system is killing Macrodroid
 

wrbird

Member
Yeah, I understand what you're saying, but if MacroDroid was actually killed, then the macro wouldn't even be able to start, would it?

The macro definitely starts, it just doesn't finish.

Thoughts?
 

wrbird

Member
I did go back to the Android battery settings for MacroDroid and set it to UNRESTRICTED. Maybe this will fix the problem. Since it's a random issue, I'll just have to wait and see.

I do appreciate your replies 👍
 

Josué García

MacroDroid Support
Staff member
I did go back to the Android battery settings for MacroDroid and set it to UNRESTRICTED. Maybe this will fix the problem. Since it's a random issue, I'll just have to wait and see.

I do appreciate your replies 👍
Check all the options listed on the web, sometimes there may be more mechanisms that kill applications.

If you are sure you have a correct configuration you can also upload the macro you have conflicts with and we can check, hopefully there may also be the possibility of a bug, macro or macrodroid maybe, but it is an issue that has several points where to start reviewing
 

wrbird

Member
Ok, thanks for letting me know. I just went through all the settings listed in dontkillmyapps and set them accordingly👍
 

the_foster

New member
I do have a similar issue.
At some time the macros stopped working.
I installed MD helper and granted it and Macrodroid itself all rights (including setting WLAN and location services) and even exceptions to the battery saving options and exceptions in AFWall and Blokada.
In another forum i found the hint to uninstall and reinstall MD, which somehow worked for some days but then stopped again.
When i issue "Test Macro" (enter Geofence and activate WLAN) manually, it works, but not automagically.
On MIUI-13/Android 12, no ROM-update in between.
 

wrbird

Member
Making all the battery settings changes didn't help. Macros still randomly stop working after they start. After rebooting my phone they work correctly again.

Does anyone have any other ideas to fix this?
 

MacroDroidDev

Administrator
Staff member
@wrbird What exactly do you mean by the macro starts but doesn't finish?

Either you have a long running macro with loops and delays etc. or I think you misunderstand how MacroDroid works.
 

wrbird

Member
@MacroDroidDev I definitely understand how MacroDroid works 😊 Though, I admit I'm not a professional programmer.

My macro opens an app and has two UI interaction clicks. So when I run it, the app opens, but doesn't do the UI Interactions. That's what I mean by it starts, but doesn't finish. Again, this issue is random. It will work totally fine, then some random day it opens the app, but doesn't do the UI interactions. I have several macros that are similar, and they all have the same issue. However, I haven't checked yet when one stops working do the others stop working at the same time. I'll have to check that next time one stops working.

When I reboot the phone, the macro works perfectly again.

And my above question wasn't answered: "but if MacroDroid was actually killed, then the macro wouldn't even be able to start, would it?"

Thanks for your help.
 

Jacob L

Moderator (Lawsonator)
In which case, you need to follow steps at dontkillmyapp.com and disable and enable accessibility services for MacroDroid. There's examples of macros which automate this process
 

wrbird

Member
In which case, you need to follow steps at dontkillmyapp.com and disable and enable accessibility services for MacroDroid. There's examples of macros which automate this process
I followed all those steps already, as stated in previous posts. And, as asked above, if MacroDroid was actually being killed, the macro wouldn't even start, right?
 

Dm114

Well-known member
@MacroDroidDev I definitely understand how MacroDroid works 😊 Though, I admit I'm not a professional programmer.

My macro opens an app and has two UI interaction clicks. So when I run it, the app opens, but doesn't do the UI Interactions. That's what I mean by it starts, but doesn't finish. Again, this issue is random. It will work totally fine, then some random day it opens the app, but doesn't do the UI interactions. I have several macros that are similar, and they all have the same issue. However, I haven't checked yet when one stops working do the others stop working at the same time. I'll have to check that next time one stops working.

When I reboot the phone, the macro works perfectly again.

And my above question wasn't answered: "but if MacroDroid was actually killed, then the macro wouldn't even be able to start, would it?"

Thanks for your help.
Don't forget to add Wait actions between 2 UI interactions (from 100 to 500ms generally is enough)
 

MacroDroidDev

Administrator
Staff member
UI Interactions rely on the accessibility service on your system. This is without doubt the most flakey part of Android and it can easily get disabled by the OS or simply stop reporting the windows root node (so nothing on the screen can be identified).

What do you see in your system log?
 

wrbird

Member
This is without doubt the most flakey part of Android and it can easily get disabled by the OS
Yep, I agree with that! And it's the most probable cause. And I imagine there's nothing I can do about it, is there? I know I'm very unhappy with Android 12. I actually had to start using MacroDroid because 12 broke a number of things I was easily able to do in 11😥

What do you see in your system log?
Are you referring to the MacroDroid log or another log file the OS creates? If you're referring to the OS log, I don't know how to access that one 😕
 

RSF

Well-known member
Note that you can look at the MacroDroid System Log within a macro as well as from the main menu. Looking at it from within a macro has the nice feature that it shows just the log entries relevant to the macro. Open the macro, click the three vertical dots at the top-right, and select Show Log.

Just in case you can't get the UI Interaction working in MacroDroid anymore, note that MacroDroid also works with a plug-in called "AutoInput". That can simulate clicks etc. in a similar way, via the Accessibility service. I've found sometimes MacroDroid's internal UI Interaction works where AutoInput doesn't -- and vice versa. Somewhat maddening. But might provide a backup option for you.
 
Top