Potential for app image loading failures with upcoming Drive migration

Hi everyone,

The upcoming Google Drive migration from multi-parent files to shortcuts might cause apps to stop displaying images: they won’t load, and they will be written to the wrong folder. We wrote this post to let you know what to do if that happens, and how to prevent that issue in the first place.

 

What do I need to do if my images fail to load?

We implemented a temporary fix to read shortcuts, which is expected to help minimize the impact on your apps. We still expect some failures. Here's what to do if you see images failing to load in your app:

  1. For any apps that have column type “Image”, check the image folder path in the underlying data sheet.
  2. Locate the image folders in your Google Drive.
  3. Move the folders to the same directory as the Google sheet.

We plan to decommission the temporary fix after the Drive migration is complete, which we expect to happen in Q2. We will contact you if you are relying on the temporary fix and if you need to take any additional steps at that time.

 

Can I prevent these issues ahead of time?

Yes. To prevent the issue, go to Drive and look at the properties of the sheets that you are using in your apps. If there are multiple entries under “Location”, remove all locations except the one that is located in the same folder as the images folder.

If you see images failing to load, and the solution we outlined above (moving the images folder to the same directory as the sheet) doesn't fix it, please contact support. 

9 25 1,509
25 REPLIES 25

This seems to be a crutial annoucement which may advsersely affect to our prod apps.  However, it is very much unclear when and how the problem possible happen, depending on the app settings. Could you elabrate deeper?

Reading through your announcement, I understood the problem may happen

1. Data source is Google Spreadsheet.

2. This Google Spreadsheet have multiple locations

Is this cause the potential threat? Or any other conditions?  Or my understanding is completely wrong?

We know to add multiple location per FOLDER levels with Google Drive functionalities, with SHIFT + Z command. However, we are not sure how to add multiple locations per spreadsheet file level.  In terms of "multiple locations" for the spreadsheet, what does it exactly mean?  while we are not able to add multiple locaoitons per spreadsheet file level?  

 

Furthermore, we do have grave concerns over some of the apps we put in place. For those app, we have centralized google account  to store image files in folders.  Then this image folders are shared with other Google Account. With the google account the image files are being shread, we generated some apps. Then the image files will be saved to folder to shared folder, whose location is added by SHIFT Z command.  Apps haves been running fine with those settings,  but it is possible those setting might be affected as a matter of time ?

Thank you for clarificaition.

If any chance, in light of the amount of potential risks we may have, it would be grateful if AppSheet teams mention to this issue during the upcoming webinars.

@takuya_miyai 


Thanks Koichi, answers below. 

 

We know to add multiple location per FOLDER levels with Google Drive functionalities, with SHIFT + Z command. However, we are not sure how to add multiple locations per spreadsheet file level.  In terms of "multiple locations" for the spreadsheet, what does it exactly mean?  while we are not able to add multiple locaoitons per spreadsheet file level?  


Similarly to folders, spreadsheets and other files could have had multiple parents through SHIFT +Z command (this has been disabled in Drive for several years now). You can verify whether a sheet is multi-parented by going to file properties and checking if multiple entries are under "Location".

 


Furthermore, we do have grave concerns over some of the apps we put in place. For those app, we have centralized google account  to store image files in folders.  Then this image folders are shared with other Google Account. With the google account the image files are being shread, we generated some apps. Then the image files will be saved to folder to shared folder, whose location is added by SHIFT Z command.  Apps haves been running fine with those settings,  but it is possible those setting might be affected as a matter of time ?


Some of those folders will be replaced by shortcuts - Google Drive blog announcement lists criteria that will determine which path becomes a shortcut vs. permanent folder - and our temporary fix will work if folders have been replaced by a shortcut. The fix won't work if a sheet has been replaced by a shortcut. 

 

The Drive announcement we linked in the first post has more information on the change - we didn't duplicate them here in case they change. All affected files will be auditable via admin audit log: 

 

"When a file is replaced with a shortcut:
  • One location is preserved for files or folders currently contained in multiple locations. All other instances of the item will be replaced with a shortcut.
  • Ownership and sharing permissions for files and folders are preserved. 
  • Admins can view a record of these events and changes in the Admin audit log.
 
Google Workspace admins will be notified via email several weeks before the process begins for their organization. Visit the Help Center to learn more about shortcuts replacing items stored in multiple locations."
 
Let me know if you have more questions, happy to help. Since we are downstream if this change, we're playing defense and trying to make sure that the impact on app creators is as small as possible, hence the temporary fix. 

 

Hi @kamila_klimek 

Thank you for additional clarity which is making things clearer to me.

As I have shared our own cases which are potentially affected by this change, we have apps which have been saving image files to folders (which is owned by account that is NOT app owner and location is added to the account for app owner by Shift Z command).  Reading through the Google Workspace announcemenet, this folder (location is added to App Owners account) is going to be replaced to the short-cut.

To understand the future situation perfectly, can we understand your temporary fix is making such short cut (originally folder whose location is added by Shift Z command) is continuously working to save the image (or file) files as before?  Or it will stop working?

For your guidance, Shift Z have been working for years (at least to me), but i did not know this fetures were officially disabled sometime ago.  It is still working now on Folders (but not on individual files) .

Could you give us a yes/no clear answer to the point above? 

--

Then now I m thinking of what the most recommended and safe solutions and workaround.  I recently noticed Google Workspace added awaited feature.  With the simple action on Google Drive, we are now able to transfer the ownership of the folder to the other. This is nice (😄). We are thinking that we have to move the ownership of the image storing folder for app onto the app owners instead of original google account (which is not app owners).  Do you agree with it?

 

Hi, Koichi.

 

The temporary fix will allow the saving of the images to continue working after the folder in the app owner's account is replaced with a shortcut.

 

That said, I agree with transferring the folder to the app owner, as that's the most highly recommended solution. It's best that the image folder exist only in one location, in the same folder as the Google Sheet that's being used by the app.

QTE

The temporary fix will allow the saving of the images to continue working after the folder in the app owner's account is replaced with a shortcut.

UNQTE

Thank you for confirming this, this was what I exactly wanted to know.

We will study further, but it is most likely we transfer folder ownership to account where we host apps.  During our feasibility study, we noticed a possible security pin hole for this Google Drive new feature of transfer ownership of folder to others.

To the google workspace communty and feature idea, I placed as follows. Hope this makes sense and reviewed positively by product team of Google Drive.

https://www.googlecloudcommunity.com/gc/Feature-Ideas/Transfering-ownership-of-folders-should-transf...

--

For reader who does not have access to above link, plesae find full texts here.

 

----Feature Idea for Google Drive ---

We are not sure when exactly this features was GAed, but it is useful for sure.  Transfer the ownership of the Folder in Google Drive to other(s) who are sharing the folder.  I m  refering to this documentation.

https://support.google.com/a/users/answer/9308960?hl=en

  • Once the ownership of the folder is transfered from me to other, then I will have access those files.
  • The new owner decides not to share the folder with me, then I lose the access to folder, including the access to all the files inside this particular folder

Those steps are making sense and in line with what we expect by this operation.

However, the problem is the "ownership" of the files inside the folder.  It remain the name of original owner rather than new owner.  The transfer of the folder is kind of declaration by the old owners that we transfer the folder ownership from me to other, INCLUDING the ownership of the files inside that. However, currently we need to change the ownership of the files mannually before we tranfer the folder. In case we have thousands or millions of files to transfer, it is realistically impossible.

Due to this problem, odd things (I would say this is security vulnerability) are happening.  Let me explain with the actual case. I moved the folder to other. The ownership of folder is now with new owners hands.  Then he decides to remove me from the shared account. I lose the access to entire folder and files at that point of time.  But at the same time, new owner is still not gaining full permission to control over those files as he/she is not pure owners of those files.  Under such a circumstances, those files stands as Orphan, losing its parent...... For those files, the owner in the file properties has no access to the file, and same story for new owners.

To avoid such a security vulnerability, the transfer folder operation should be reviewed in my opinion.  Ideally, once the folder ownership is transfer from A to B, then B should stands as owners for the files inside (including sub folders) automatically.

Currenlty, situation is looking like this.

I give you a present, which is packed by paper bag. Yes, I gave it to you.

Hoever, yes "bag" is now with you, but present (contents inside a bag) is still with me, even I gave it to you. Strange isnt it ?

Hope this issue is addressed in a positive way for us.

 

@takuya_miyai 

 

 

 

Hi @mfakhreddine 

Sorry for bring this old thread up again.

As you previously reported, the SHIFT + Z command to add multiple location to single folder is gone now.

I assumed you have been adding feature where we create short-cut to the folder and we specify the locations to save files (they are created by BOT) to save to this short - cut (by specifying the name of the short-cut inside the app default folder) is temporarily to work. However, after we tested, it is working like a charm even now.

Is this fully and officially supported feature? , i.e we save the files, targetting the folder short-cut inside the deafult app folder, then the app wil save files to the source folder through the short-cut?  We wish to keep having this one as officially supported behavior, thanks.

Koichi

@takuya_miyai 

@Steve   Any chance to escalate my query internally to get the clarification? Thank you for your help.

Escalated.

Thank you @Steve for your help  Hope someone would revert with clarification soon.

 

@Steve  Hi Steve, any luck with this?  

Aleksi's is the only response I got.

Sure, I will ask him directly then....

We are using Microsoft 365 as our datasource on the apps, we have found the same issue with our images not loading. Is the above explanation strictly for Google sheet users or could it be the reason behind our image issues as well?

This is strictly for Google Drive, and only applies to images affected by the migration that will begin tomorrow. 

@Koichi_Tsuji 
"We know to add multiple location per FOLDER levels with Google Drive functionalities, with SHIFT + Z command. However, we are not sure how to add multiple locations per spreadsheet file level.  In terms of "multiple locations" for the spreadsheet, what does it exactly mean?  while we are not able to add multiple locaoitons per spreadsheet file level? "

^couldn't figure out how to quote only part of a message on this new forum 😞

I agree, this announcement is confusing. I think the control-z command only works on folders. 

I wrote an Apps Script to scan your drive for FOLDERs that are stored in multiple locations. It will return the folder names and Id's for all parents of any folder with more than one parent. 
Screen Shot 2022-02-02 at 10.46.13 AM.png

 



function findMultiFolders(){
  let searchFolders = DriveApp.searchFolders("'EMAIL_ADDRESS' in owners");
  let folderList = [];
  while(searchFolders.hasNext()) {
    childId = searchFolders.next().getId();
    let thisFolderTest = hasMultipleLocations(childId);
    if(thisFolderTest){
      folderList.push(thisFolderTest)
    }
  }
  return folderList
}

function hasMultipleLocations(folderId) {
  locations = DriveApp.getFolderById(folderId).getParents();
  let count = 0;
  let multiFolders = [];
  while (locations.hasNext()) {
    let folder = locations.next();
    count++;
    let log = `${count}: ${folder.getName()} (${folder.getId()})`;
  multiFolders.push(log);
  if(count > 1){
    Logger.log(multiFolders)
  };
}
return count > 1 ? multiFolders : false
}

 WARNING: This will probably time out on free accounts, and maybe even on paid workspace accounts with enough folders. 

You can mess around with the query parameters to break the search into smaller chunks. 
https://developers.google.com/drive/api/v2/ref-search-terms?hl=en


Hi GreenFlux. Just to clarify, when the SHIFT+Z shortcut was available, it used to allow you to "Add to Drive" (or add to multiple locations) both files and folders.

Was? It's still working for me, but only on folders. 

I just added another folder to two locations using control-z and ran the script again. It still works, and the script logged the new folder as having two parents. 

Control-z doesn't do anything for me with files, though. It only works on folders in my account. Maybe the change is being rolled out still and my account hasn't gotten the new shortcut behavior. 


I'll ask the Drive team about that!

It turns out that some people still have the ability to add folders to multiple locations using SHIFT+Z but it's expected to be phased out soon.

Yes I’m one of them. 

In case it's helpful - I was also surprised I can't quote a portion of the text, so I used the "quote" option and deleted the parts I don't need. For the second quote, I did the same thing again. 🤷🏻‍♀️

Thank you for the Script @GreenFlux 

Do I simply have to put in my email address here?

("'EMAIL_ADDRESS' in owners")

 Like ("wapplabor@gmail.com") ?

This is not working for me giving me this error:

Exception: Invalid argument: q
findMultiFolders
@ Code.gs:4

Hey @Fabian_Weller , 

Yes, just replace 'EMAIL_ADDRESS' with 'wapplabor@gmail.com' and make sure you keep the single quotes around it. The entire query string should start and end with double quotes, and the search terms are wrapped in single quotes. 

Thank you @GreenFlux now it's working.

It has to look like this:

("'wapplabor@gmail.com' in owners")

 

"Add shortcut to Drive" should work now as well with the API level. Earlier it didn't and that's why you needed to use Shift+Z (Add to my Drive)