I ran the Drive Migrator script to try to move some files between 2 google accounts. It failed and kept sending me error emails, so I tried to turn it off by by revoking the Drive Migrator permissions inside my google account settings. Now I get a different email every day, saying that Drive Migrator failed to run because it requires authorization, so it is still running somewhere but I can't find any reference to it in my google account settings. The error email contains a link where I am supposed to be able to configure triggers for the script, but the link just loads a "Forbidden Error 403" page.
Thanks
Open Google Apps Script (can be any script). Remove any triggers that fire the migrator. Revoking the permissions would only cause an error message to be sent out, as the script will try to run due to the trigger. It tries to get through the oAuth and fails, causing you to receive the error.
A trigger is the only thing you need the script to attempt to run. Authorization is needed to actually perform some of the tasks in the script. Heck, some scripts can be run automatically with no authorization whatsoever. Always get rid of any triggers you no longer need.
Try this:
Go here:
https://security.google.com/settings/security/permissions
Scroll down and select "Drive Migrator" then select "Remove".
(It was mentioned in the app reviews)
I went to the respective script and just added /* and */
/*
script here
*/
Related
I've been executing a gscript for a couple years now, but just today I started seeing the following when I try to execute it:
The script does not have permission to perform that action. Required
permissions: (https://www.googleapis.com/auth/calendar ||
https://www.googleapis.com/auth/calendar.readonly ||
https://www.google.com/calendar/feeds)
I went ahead and deauthorized my script from my Account permissions page and re-ran the script to force re-auth, but I'm still seeing the error.
The line in question is simply trying to do:
CalendarApp.getDefaultCalendar()
Any idea on how to resolve this issue?
From what error you've encountered, it indicates that the script lacking the authorization needed to run. When a script is run in the Script Editor or from a custom menu item an authorization dialog is presented to the user. However, when a script is run from a trigger, embedded with a Google Sites page, or run as a service, the dialog cannot be presented and this error is shown.
If the script contains new unauthorized services, you must re-authorize the script. Here's a documentation on how to troubleshoot this type of error in Google Apps Script.
If a trigger continues to fire and cause this error, you can access your triggers by doing the following:
Select Edit > All your triggers in the Apps Script editor. The resulting dialog shows all active triggers running on your account.
Find the offending trigger in the list.
Click the clear icon next to the trigger name to remove it.
Click Save to record the deletion.
You can also remove problematic add-on triggers by uninstalling the add-on.
I'm using Apps Script and the OAuth2 for Apps Script Library to connect to a couple Google advertising platforms. Basically, each account team has a Google sheet that automatically gets their campaign data every morning. I've got a couple of these sheets up and running already, but when I try to set up this most recent sheet I'm getting the "Authorization is required to perform that Action" at the very end of the OAuth process. I'm able to start the OAuth dialogue, select an account to authorize, but then I run into the error.
I authorized the script in the script editor before I ran it, and all of my OAuth credentials are correct. I've even deleted and re-created the scripts. The other sheets running the same scripts are still working fine.
What's going on here? I'd appreciate any ideas, I've set up a couple test sheets to see if I can puzzle it out, and now they're all returning the same error.
Update: Everything works properly when run from a different account, so it's looking like it's a problem with my account, specifically. Is there any way to manually check that an Apps Script project has been authorized correctly on a given account, aside from the prompt when the script is first created?
I ended up fixing it by explicitly setting the Authorization Scopes in the manifest. In case anyone finds this question later, here's the links to the relevant Apps Script guides:
Authorization Scopes:
https://developers.google.com/apps-script/concepts/scopes
List of OAuth 2.0 Scopes:
https://developers.google.com/identity/protocols/googlescopes
I mistakenly revoked permissions on a google-apps-script that ran on a time trigger on a google spreadsheet from here: https://myaccount.google.com/permissions . I now receive an email that the script fails to run. Going to the spreadsheet and editing the script fails to bring up the script, presumably because of the lack of permissions, but no error is shown, just a blank script editor. I am able to see the trigger to the script (here: https://script.google.com/macros/triggers?id=some_id ), but I am not able to get to the script.
How can I restore or reinstate the permissions to this script?
Or how can I get the code to this script? Where is it stored?
If you simply revoked permissions it will not remove the actual script/coding. So it may not be attached to the spreadsheet you are opening. Perhaps you are opening the wrong spreadsheet, or it is a standalone- If you type type:script into your google drive search it will show all scripts that are not bound to a spreadsheet.
As far as restoring you will just want to run it, once you find it.
I was successful. I'm not sure what did it but: previously I was not able to view the script, looking at the revision history doesn't allow me to get access to the menu and thus I was not able to get at older versions of the script. But making a copy of the spreadsheet then allowed me to view the script again, both in the original and copy of the spreadsheet. Running the script then requests for permission, restoring the permissions!
I really don't know if the lack of access to the script was a temporary condition or required that I make a copy of the spreadsheet, but this was the sequence of events that worked for me.
Thank you #OblongMedulla for making the suggestions.
You can simply go to your Google Profile - Manage Your Google Account - Security - Third Party Apps and revoke the permissions. If you want to use the app again, you'll have to run the script again from appscript and grant the permissions.
In my organizzation, I created an internal site with a script callable from different pages inside that reads / writes data from various spreadsheets and send mail.
For testing, I shared the site and documents with a my colleague but he can't run the scripts because appears page to request permission:
"... This script is Requesting permission to do potentially harmful operations. Only authorize the script if you truly trust the author!"
if my colleague click on "authorize" nothing happens.
I give to my colleague the link of the script (not the page that embeds the script), clicking on "authorize" he received a long email from google where it is explained that authorized the execution of the script but instead continues to not work ..
The one way to allow the execution of script is to run the script directly from the editor to grant permissions.
I can't do it for other colleagues!!!
I'm really unhappy about this. I worked a lot on the script but now I realize that I can't do it to my colleagues for another google's big bug.
I have a script that uses also spreadsheet and mail service and I have not any difficulties with authorizations ...(after the red screen is approved user have full access to the app)
Are you sure there is not something else that could prevent your script to work with other users ? A document that is not shared or a call to an external api or whatever ? All I can say is that the current procedure is far more convenient than it used to be a few month ago and that I see not bug on that just now...
In my experience with scripts in spreadsheets, new users have to run the script, authorize it, and run it again.
I am receiving an apps script notification email about 1 per minute. I don't think I have any scripts running. How do I make it stop?
Your script, Unsaved script, has recently failed to finish successfully. A summary of the failure(s) is shown below. To configure the triggers for this script, or change your setting for receiving future failure notifications, click here.
Details:
Start Function Error Message Trigger End
6/21/12 1:15 PM myFunction We're sorry, a server error occurred. Please wait a bit and try again. time-based 6/21/12 1:15 PM
Sincerely,
Google Apps Script
You should check if you have some triggers that are running...
to check that : open or create a spreadsheet go to >tools>script editor > EDIT > all your triggers and see if something is firing every minute.
and... delete it with the x
I found I created a script and forgot about it. Kept getting many notifications. In my case, it was a script in Google Drive. Try this:
Open Google Drive
In search bar type: 'app:"Google Apps Script"'
This should list all apps. find the one with the same name as the notification and edit/disable.
Note, that you may also have a script bound to a google document a.k.a. Addon (https://developers.google.com/apps-script/guides/bound) which can have a trigger built in.
I had to find all spreadsheets and look under Tools (as above) to find the culprit. I could not find a way to search for sheets with scripts.
Go to google.com, then click your account picture in the top-right corner of the screen. Next, click Account, then Security, then Review permissions. Click Revoke Access next to the script whose authorization you want to revoke.