Read file with dynamic name fails with error

First I'd like to say thank you to all who have put in so much to make macrodroid pretty amazing!!

Im inches away from completing my voice activated dynamic content engine. Ive got nearly all of it working except this...

When I call my file with a static name it works like a dream!

But when select read file dynamically and use a variable to pass the file name, it turns into a nightmare...

Error reading from file uriString

Please help! Im so close!!

Screenshot_20220830-090112_MacroDroid.jpg
 
I made a macro just for testing this... here's what I found...

When I was first doing this the files were being saved on my phone under the macrodroid folder.

It kind of worked but I still got the error message.

Good thing that years ago when I was trying to get this working I found out about file permissions and specifically bought a phone with SD card so that I could have better functionality for this.

Once I changed everything to be using files on the SD card it worked seamlessly!

Thank you for your support and I'm glad I was able to find a solution!

Thank God for my SD card slot!
 

Attachments

  • another_test_file.txt
    24 bytes · Views: 7
  • Screenshot_20220831-093529_MacroDroid.jpg
    Screenshot_20220831-093529_MacroDroid.jpg
    225.9 KB · Views: 5
  • Testing_get_file_dynamically.macro
    10.7 KB · Views: 9

FrameXX

Well-known member
I can confirm that I also tryed the action with dynamic file name and it always fails no matter how many times I reconfigure the folder.
 
Further testing seems like i got it working in a macro using files from SD card but it's still failing inside action blocks even if I use SD card
 
I moved my functions from action blocks back to macros, made sure all referenced files are on sd card and now I'm able to read and write files using magic brackets in the file names.

Dynamic file names to device do not work.

Dynamic file names in macros work great.

Dynamic file names in action blocks are not working regardless of sd card or device location.

Thanks again to the team for engaging with me on this and thank you to hard working developer(s) who have made macrodroid into something pretty amazing!

Now if only sql worked natively in macrodroid 😀. I'm happy to pay for that. Pm me!
 
It also fails for me (only in action blocks) and my device does not have an external memory slot, android 12
@MacroDroidDev
Should I open a ticket or something for the dynamic file name failing in action blocks?

I'm guessing this issue might also be affecting other features as well that have not yet been reported.
 
Please use report a bug from the troubleshooting section with the macro that fails and the relevant description. This will then go into my bug tracker so I can recreate easily and then set about
Thank you! I'll have to come back to it when I've got some time. I already uploaded all the elements on this thread but testing revealed that it's only failing in blocks, function is working ok in macro using SD card but same feature failed when inside a block instead of a macro.
When I get some time I'll try doing as you suggest
 
Top