Deleted script, no triggers, still getting emails - google-apps-script

I deleted a google apps script from docs (Gmail Snooze), but I keep getting a message every day:
Start Function Error Message Trigger
6/9/12 12:49 AM myFunction We're sorry, a server error time-based
occurred. Please wait a
bit and try again.
I've already tried creating a new script, going to Resources > All Your Triggers, and nothing is there.
Is there a better way to get rid of these error messages than creating a new filter in gmail to auto delete them?

Have you also tried deleting the spreadsheet from the Trash in Google Docs?

There have been some reported problems around deleting triggers. You may want to add a comment on this open issue.

This worked for me!
Open a spreadsheet then go to tools-spreadsheet editor, then on the
editor window go to Resources->All your triggers... and see if the
trigger is still listed there. If so, delete it.
Source: How to delete a google apps script service

There might be an update to the interface. Triggers are now accessible trough different menu.
Open script.google.com and open any project or create a new one if you don't have any projects. Then go to Edit>All your triggers and switch off the ones you don't need.

Related

Simple function suddenly throws "An unknown error has occurred, please try again later"

Since today morning, I am getting the below message while trying to run new App scripts on a new Google sheet.
Error An unknown error has occurred, please try again later.
My other App scripts attached to existing Google sheets continue to run fine. But if I create a new sheet and add even a plain simple function as shown below and try to execute this, I get the above error after it attempts to run it for some time and then gives up.
function Mytest()
{
}
I suspect that it is not able to bring the permission box which it use to bring up for any new script created. Till yesterday, once the permissions dialog box comes up and I used to give the permissions, the scripts use to run fine. But today it is not even bringing up the permission dialog box.
It looks like there is a outage going on with Google Apps Script when running new projects. I can see a couple of people reporting it in Google's public issue tracker.
It looks like it is only affecting new projects but most old projects are running fine. In the meantime you can add more info to the report to bring more attention to it. I have made some tests in 4 different accounts from different organizations and I can confirm I am also affected by this.
A couple users are reporting that it started to fix itself, and it looks like clearing cache and cookies from the browser may solve the issue (this is not a definitive solution but may work for you).
Only happens with Apps Script-managed Google Cloud Platform projects. Seems okay if you manually set the GCP project with the id using Resources > Cloud Platform Project...
I tried this because mine started with this error:
We're sorry, there was an unexpected error while creating the Cloud Platform project. Error code DEADLINE_EXCEEDED
I was having the same issue. Adding the script ID to the Library seemed to fix it.
Go to the "settings" option in the left menu of the script editor and copy the script id. Then click the plus icon next to the "Library" option and click "look up". Once the script is found, click "add" and run the script.

GAS onOpen() not running for copied spreadsheet

I have a spreadsheet with a script that includes onOpen() which successfully creates some custom menus. When I copied the spreadsheet (and the bound script of course), the onOpen() no longer runs. I tried a few things I found from other postings of the same problem:
Revoke the new spreadsheet's authorization - can't because it does not show up in my account as an authorized app.
Manually create a trigger for when the doc opens - I get an error "We're sorry, a server error occurred. Please wait a bit and try again."
Copied the script file itself and renamed it.
Renamed the enclosing script project.
Renamed the enclosing spreadsheet.
So, none of these has worked. Anything else I can try, or is there a known problem on Google's side?
Thanks!
I looked at the said issue tracker and found that the problem stemmed from this line of code:
DriveApp.getFileById(SpreadsheetApp.getActiveSpreadsheet().getId());
To make this work, I would suggest to enable the Drive API in Resources -> Advanced Google Services. It will also ask you to enable Drive API in your Google Dev console. Do this and let me know if it worked for you.

Google Apps Script keeps running after trigger removed (multiple users)

I have a fairly simple Google Apps Script that runs every time an answer to a Google Form is submitted (by using "on form submit" trigger). The script does some simple manipulations and updates a Google SpreadSheet. Recently I needed to change that script to run manually and not on form submit, so I deleted the trigger. However the script still kept running on every form submit!
There are other users who might have the same trigger setup, since the spreadsheet and the code are shared. Is there a way to completely delete all the triggers for a particular script? In the meantime I just renamed the script and that has solved the issue, however this is a bad solution.
Search on stackoverflow did nothing, seemingly similar questions are resolved through clearing "Resources -> All your triggers...", which only does it for your user. Question is how to remove/edit all the triggers for the project, even from other users.
Here's how to stop any orphaned Google Script.
Go to https://security.google.com/settings/security/permissions
Click the script / project name you wish to uninstall
Next click Remove and you are done.

Can't Locate/Delete an Installable Trigger

I installed a form submit trigger for my project using ScriptApp around the beginning of May. The trigger has worked just fine however I now wish to uninstall the trigger and am running into problems. When I try to view all my current project triggers (Resources > Current project triggers), it returns that there are no associated triggers. Also when I try to run (Resources > All your triggers) it returns that there are no triggers shown.
I'd like to believe that this is the case, that the trigger in question has been somehow deleted but I don't believe that it is. To make sure the trigger didn't run, I de-authorized the script to run from my google account settings.
My suspicions that the trigger was not deleted were confirmed when I received a "Summary of failures for Google Apps Script: Form Processing Script" which told me my script had failed 3 times because, "Authorization is required to perform that action."
These failure e-mails also contain a statement, "To configure the triggers for this script, or change your setting for receiving future failure notifications, click here." When I click on the link, there are no triggers shown...
Here's a look at the code i used to install the trigger:
function formSubmitTriggerInstall() {
var formID = '1rOikLDUAqMWCB0ktjWzFE0oB6LmOHvXuzPAqyq0XLwE';
ScriptApp.newTrigger('processForm')
.forForm(formID)
.onFormSubmit()
.create();
}
I have also tried to locate the trigger using ScriptApp but to no avail.
Does anyone have any suggestions on how I can eliminate this trigger or get the associated trigger ID?
One other note, since I installed the trigger, the google developer's website and documentation went through a major face lift and some of the page content appears to be updated as well. Not sure that would affect my triggers though.
It was confirmed that this was a big and it was fixed by the apps script team.

414 Error for creating trigger for google app scripts

I have some exisiting google app scripts in a spreadsheet of my google drive.
Tried to create a time driven trigger under Script Editor -> Resources to automate the execution of a script. Encountered error: 414. That’s an error.
The requested URL /... is too large to process. That’s all we know.
Read through some of the existing similar issues/solution. Nothing specific to time driven triggers found.
Anyone has a workaround ?
Have you tried running the script without the trigger? I find most times I get that error it's because I'm trying to add a trigger to a script that I haven't yet run and authorised first. Good luck!