Flows not working since Android 11 update

252 views
Skip to first unread message

Inigo Cantolla

unread,
Jul 20, 2021, 12:51:47 AM7/20/21
to Automate
Hello,

I've recently updated to Android 11 and flows I use every day have stopped working.

1. First flow that stopped working is a screenshot organizer, I monitor the screenshot folder `/storage/emulated/0/DCIM/Screenshots` and when a file is created, I use a dialog choice? block and an expression true? block to select and move the screenshot to different folders. Since I've upgraded to Android 11 I've been getting this error: `com.llamalab.safs.NoSuchFileException: /storage/emulated/0/DCIM/Screenshots/.pending-...-Screenshot-...`
If I don't use a dialog choice? block and move the screenshot immediately after its created I wont get an error, but the file in the destination folder will be named `.pending-` before the screenshot name.

2. Second flow that stopped working is a flow to backup my WhatsApp Media files, but after upgrading to Android 11 (WhatsApp has moved directory location on my device) I'm getting errors I never used to get like: `com.llamalab.safs.NoSuchFileException: /storage/emulated/0/Android/media/com.whatsapp/WhatsApp/...` or `java.io.IOException: File name to long` (WhatsApp Documents folder)

Are there any solutions or workarounds for this?
Do I need additional permissions?
Am I doing something obvious wrong?
Should I post this also on the subreddit?

Any help would be greatly appreciated! Thank you!

Bushmills

unread,
Jul 20, 2021, 4:16:05 AM7/20/21
to Automate
Under Android 11 are my screenshots under /storage/emulated/0/Pictures/Screenshots, and not under the Digital Camera directory. Maybe you've chosen that destination yourself, for a screenshotting flow? But then OTOH wouldn't you need to monitor that directory for changes.
Check, using a file manager, that the specified path "/storage/emulated/0/DCIM/Screenshots/.pending-...-Screenshot-...` actually exists, because the error message indicated that it doesn't.
For the apparently too long directory name, try whether it helps to specify it differently: Rather then as interactive non-fx choice,  try to specify it as function (tapping the struck-out "fx" in the path specification)     "{storage()}/Android/media/com.whatsapp/WhatsApp/..." (with double quotes)   or    storage(Android/media/com.whatsapp/WhatsApp/...)    (without quotes an curly braces).
If that doesn't help, I'd try a shell function to copy those files instead, assuming that those files serve as source of a copy operation which is likely when backupping them.  The command to copy them by shell command is  "cp  source  destination", with source and destination replaced against the actual files and paths. For source, you may want to use a wildcard for files, as in    {storage()}/dirs/*
An command line switch  -R  for also copying subdirectories exists.

Inigo Cantolla

unread,
Jul 20, 2021, 2:43:13 PM7/20/21
to Automate

Thank you for your reply, here is some more info from the things I've been trying.

My screenshots are under /storage/emulated/0/DCIM/Screenshots, they've never been under /storage/emulated/0/Pictures/Screenshots,
I deleted my screenshot folder and it just created a new one in the same dir, I tried to move my screenshot folder /storage/emulated/0/Pictures/Screenshots but it will just add new screenshots to .../DCIM/Screenshots.

I am certain that that those folders exist, for my screenshots I'll get the error: NoSuchFileException when I try to copy or move files, for WhatsApp folders its seem I only get the error: NoSuchFileException when trying to move files, but I can copy them, don't know if this makes sense?

If you could can you go into a bit more detail on how this works, I'm not the most tech savvy person. 
"I'd try a shell function to copy those files instead, assuming that those files serve as source of a copy operation which is likely when backupping them.  The command to copy them by shell command is  "cp  source  destination", with source and destination replaced against the actual files and paths. For source, you may want to use a wildcard for files, as in    {storage()}/dirs/*
An command line switch  -R  for also copying subdirectories exists."

I really appreciate it.

Bushmills

unread,
Jul 20, 2021, 3:54:23 PM7/20/21
to Automate
So, for the Whatsapp directories, are these assumptions and derivations correct:
- You intend to move directory contents?
- There's a directory hierarchy you want to move, rather than only files from a single directory?
- The target directory, where you move the directories to, is on storage on your mobile device (that is, not over network)?
(reason is that the shell command will look different for any different answer to any of these questions)

Inigo Cantolla

unread,
Jul 21, 2021, 1:46:44 PM7/21/21
to Automate
Bushmills, thank you for you help,

After playing around with the screenshot flow, the problem was the screenshots are now created as .pending (For editing purposes, etc) and "I think" a bit later remove the .pending and turn into the normal screenshot name.
I changed my flow so the output name of the screenshot is not passed right when the file created, but taken later that way the file wouldn't have the .pending name and I wouldn't get the error.

As for the WhatsApp shell command will probably be a bit convoluted with what I do, because I move, then copy, then move and things like that. There seemed to be a bug, because I redid my flow and it seems to at least be working, but it takes a really long time to list files, but that is another issue.
 I will post in an other post, because I'm not getting the error: NoSuchFileException.

Thanks again for your help :)
Reply all
Reply to author
Forward
0 new messages