MacroDroid keeps crashing and saying "Write file action failed" in a notification.

I restarted my phone and now MacroDroid won't open and keeps notifying me that, even though it has the "files and media" permission enabled. I'm afraid if I reinstall the app then I'll lose all the progress I made today since I only exported all my macros 12 hours ago so my only hope is my auto cloud save, but I don't wanna risk that yet.

I assume it's because one of my macros uses the write to file action and even if it has the files and media permission, there's still another confirmation when setting the folder location after making a write to file action. Is there a way to fix this through adb or anyway to export my macros in this situation?

I'm not rooted and using the Galaxy S22 Ultra with android 12 (one ui 4.1), I didn't even get to give it adb permissions yet because I restarted my phone so that I could do it locally using another app. So ya it just keeps crashing everytime I try opening, I don't think updating to the beta will fix anything either.

Edit: Beta didn't help.
 
Last edited:

Endercraft

Moderator (& bug finder :D)
I restarted my phone and now MacroDroid won't open and keeps notifying me that, even though it has the "files and media" permission enabled. I'm afraid if I reinstall the app then I'll lose all the progress I made today since I only exported all my macros 12 hours ago so my only hope is my auto cloud save, but I don't wanna risk that yet. I assume it's because one of my macros uses the write to file action and
even if it has the files and media permission, there's still another confirmation when setting the folder location after making a write to file action. Is there a way to fix this through adb or anyway to export my macros in this situation? I'm not rooted and using the S22 Ultra with android 12 (one ui 4.1), I didn't even get to give it adb permissions yet because I restarted my phone so that I could do it locally using another app. So ya it just keeps crashing everytime I try opening, I don't think updating to the beta will fix anything either.
That's strange... I think making a bug report and possibly disabling Macrodroid would be your best option. Oh right Macrodroid keeps stopping so you can't... Maybe it has to do with one of your macros.
 
That's strange... I think making a bug report and possibly disabling Macrodroid would be your best option. Oh right Macrodroid keeps stopping so you can't... Maybe it has to do with one of your macros.
Ya one of my macros writes to a file and I guess restarting my phone reset that permission so it's stuck trying to write to it and failing, also not sure how effective making a bug report would be if I'll have to wait months for the next update to patch it, I'm starting to think that reinstalling is my only option. I just hope someone knows how I can recover my current macros so I don't lose all my progress or how to bypass it somehow. I'm going to bed so hopefully there's an answer by tomorrow.

Edit: The full notification says "Write file action failed, please reconfigure file directory in the write file action.", and again, I assume it's referring to when you go to the folder location and grant access to it when writing to a file, not the app permission itself since it's already enabled.

Edit 2: Also removing its permission and restarting doesn't help either, wished it did. I guess simply having the problem macro in question is making it crash. The notification did change to "Write to File requires READ_EXTERNAL_STORAGE permission" though, so tomorrow I'll try granting it through ADB and hopefully that'll solve everything, don't have access to a PC at the moment.
 
Last edited:
Do you have any idea what macro it is that cause the problem, and what triggers it?
Again, the macro has the write to file action and the app just keeps crashing so nothing is being triggered because the app hasn't even ran in the first place. My best guess is MacroDroid is stuck trying to read a folder I granted permission to where the file is stored that the action writes to (being a simple .txt file), and restarting my phone must've reset/revoked that permission.

For anyone else that's still confused, make a new macro, add a "write to file" action, and when you choose the directory you'll see that it asks to be granted access to that location, and restarting my phone must've reset that therefore putting the app in a crash loop somehow.

If you don't see it then it might be a bug only on this version of Android?
 
Last edited:
Top