I have a script run by trigger which has been working for months but then failed with error in
getFoldersByName which cannot find a folder called 'House'. I am able to navigate to this folder and the trigger runs under my profile. The folder is a parent folder and has not changed since the script was first setup.
I've seen this error with getFoldersByName failing when a script works with one user but failed with another.
I was able to resolve both problems by editing the folder name and then renaming it back again to the original name. ie: I change 'House' to 'House+' and then change it back to 'House'.
This change seems to reset something in Google Drive or Apps Script which allowed getFoldersByName to work.
Is this a bug, does anyone have similar problem and is there a work around?