Cannot access AutomationOnDrive web page

43 views
Skip to first unread message

ChrisM

unread,
Sep 12, 2021, 9:12:34 AM9/12/21
to MppDevices
Hi I've been using the default AutomationOnDrive web page for years and beginning yesterday I have not been able to access it.  I get a message from Google saying "Sorry, unable to open the file at this time."

Is anyone else seeing this?

Thanks

Chris

ChrisM

unread,
Sep 12, 2021, 9:39:23 AM9/12/21
to MppDevices
I just found this email from Google and wonder if this is the cause:
>>>>>>
From: Google Developers <GoogleDevelo...@google.com>
Date: Wed, 11 Aug 2021 at 01:41
Subject: [Action Required] Drive API requires updates to your code before Sep 13, 2021

Hello Google Drive Developer,

We have identified you as a Developer who has used the Drive API in the last 30 days. We are writing to let you know that on September 13, 2021, Drive will apply a security update that will change the links used to share some files, and may lead to some new file access requests. Access to files won’t change for people who have already viewed or modified these files.

Please update your code as detailed below before September 13, 2021, to avoid failing requests.

What do I need to know?

Items that have a Drive API permission with type=domain or type=anyone, where withLink=true (v2) or allowFileDiscovery=false (v3), will be affected by this security update.

In addition to the item ID, your application may now also need a resource key to access these items. Without a resource key, requests for these items may result in a 404 Not Found error (See below for details). Note that access to items that are directly shared with the user or group are not affected.

Will this change affect me?

If your application uses the Drive API to access files which have been shared with a user through link sharing, your application may be affected by this change.

What do I need to do?

To avoid errors accessing files, you must update your code for accessing files to include the appropriate resource keys. Details on how to do this for each of the affected Drive APIs is included below:

Changes to the Drive API

The resource key of an item is returned on the resourceKey field of the file metadata in the Drive API response.

  • If the file is a shortcut file, then the resource key for the target of the shortcut can be read from the shortcutDetails.targetResourceKey field of the same resource.
  • URL type fields such as exportLinks, webContentLink, and webViewLink will include the resourceKey.
  • Requests to the Drive API can specify one or more resource keys with the X-Goog-Drive-Resource-Keys HTTP request header.

Learn more about this change from the Drive API guide.

Changes to Apps Script

The DriveApp from Apps Script has been updated to return the resource key of a file or folder with the getResourceKey method.

  • Note: When fetching a file or folder, the resource key can be specified on the getFileByIdAndResourceKey or getFolderByIdAndResourceKey methods.
Changes to Drive UI Integrations

If your application is integrated with the Drive UI to create or open items, it will receive resource keys when your application is invoked from the Drive UI.

  • The state information for a New URL will contain folderResourceKey, which is the resource key of the folder where the new item should be created.
  • The state for an Open URL will contain a mapping of file ID to resource key in the resourceKeys field.

Learn more about integrating with the Drive UI on our website.

Which projects may be affected?

Your projects that have used the Drive API in the last 30 days and may be affected by this change are below

 <xxxxxxxxx-link to OnDrive web site>

To get help with these changes, see the Drive API support options on our website.

Thanks for choosing Drive API.

Sincerely,

The Google Drive Team


MikeP 4 MPP

unread,
Sep 12, 2021, 10:26:55 AM9/12/21
to MppDevices
Yep, that's exactly what happened, and google changed my deployment link when I updated the page.  I've put a link you can use permanently here: https://sites.google.com/site/mppsuite/wemoondrive/am-remote-online, and I'll keep the direct link on that page updated as well.

ChrisM

unread,
Sep 12, 2021, 12:49:01 PM9/12/21
to MppDevices
Hey I'm back in business!! Thanks Mike!!

ChrisM

unread,
Feb 20, 2024, 8:18:50 AMFeb 20
to MppDevices
Hi Mike, looks like this issue is back.  I'm using the link https://sites.google.com/site/mppsuite/wemoondrive/am-remote-online you shared, and see a message from Google saying "Sorry, unable to open the file at this time." 

Thanks

Mike P 4 MPP

unread,
Feb 20, 2024, 1:43:48 PMFeb 20
to MppDevices
Yep, google made two changes to mess me up and I've been forced to redeploy the app.  I'll have a new version of AutomationOnDrive out soon too.  I think you caught the problem before I updated that page, if you visit again now it should be working, let me know if it isn't.

The two changes are permission related - google won't let me run the script to archive the drive log from the app anymore, so you need to add a manual trigger to run it daily (there's a new page on my site that explains how to do this).  The other is they don't allow drive images to be displayed in web app pages anymore so for now I'm using a beta service that deploys them to a content server and makes them available for the AoD page.

ChrisM

unread,
Feb 25, 2024, 5:03:15 PMFeb 25
to MppDevices
Thanks Mike.  The new link is working.  Much appreciated.

ChrisM

unread,
Feb 26, 2024, 5:51:44 PMFeb 26
to MppDevices
Hi MIke, can you post a link to the fix for the manual trigger?  

"you need to add a manual trigger to run it daily (there's a new page on my site that explains how to do this)"

I can't seem to locate this info.

Thanks

Chris


On Tuesday, February 20, 2024 at 1:43:48 PM UTC-5 trogli...@gmail.com wrote:

Mike P 4 MPP

unread,
Feb 26, 2024, 6:50:54 PMFeb 26
to MppDevices
Sure, it's in the AutomationOnDrive section: https://sites.google.com/site/mppsuite/wemoondrive/log-backup.
I may have found a fix that allows it to work without sensitive permissions but I'm still working on it - it's a rewrite using a different API set so I'm still not sure.

Reply all
Reply to author
Forward
0 new messages