Status Update
Comments
mi...@google.com <mi...@google.com> #2
Hello,
Thank you for creating this issue.
I could not reproduce this behaviour. Time-based triggers are running even after following the steps you specified.
From the screenshots you shared, it looks like there are two functions in your project that have the same name. This might be the reason you are getting the behaviour you expect. Are you sure that's not the case? Can you share all the code you're using (if you haven't done it already) so that I can try to reproduce this.
Kind regards.
ta...@gmail.com <ta...@gmail.com> #3
We have a huge project and it would be impossible to put all the code here. Right now we are working on removing duplicate function names (even though none of them is called from a trigger) to see if it fixes it.
But in our project, the described steps stop the trigger execution in 100% of cases.
mi...@google.com <mi...@google.com> #4
Hello,
Please remove all the duplicate function names in your project and see if the problem persists.
Kind regards.
ta...@gmail.com <ta...@gmail.com> #5
However, the problem still persists. making any change in the Edit Trigger dialog (shown in the screenshot) or making no change and just clicking on Save – stops the trigger. The trigger shows up, but never runs.
We have a project in UAT where this issue is reproducible that we can give you access to, we also have Ids of triggers that exist, but don't run if that can help:
iEEHHfBVQiqv_QBYtjKLPA
nwKoRLtnQDqn9RguCa_ABw
rUPQ6zxQMSW8ztg1SbeUQ
mvAtaKcGRqy5kn39cPNaxQ
6PuyYdGdSCimntjVkO7MgQ
mi...@google.com <mi...@google.com> #6
Hello,
- Could you share a project in which this behaviour can be reproduced (of course, free of sensitive information)?
- Have you checked if you can reproduce the problem with a new project that has the same code as the one that is failing? Or is it just that specific project that is experiencing this?
Kind regards.
ta...@gmail.com <ta...@gmail.com> #7
Please send your email address to me and I'll add you to the project.
mi...@google.com <mi...@google.com> #8
Hello,
That won't be possible.
As I said before, have you checked if you can reproduce the problem with a new project that has the same code as the one that is failing? Or is it just that specific project that is experiencing this?
If it can be reproduced in another project, please share the code that will reliably reproduce it. If it's just this specific project, would creating a new project be a valid workaround?
Kind regards.
ta...@gmail.com <ta...@gmail.com> #9
Also, what do you mean by 'share the code'? The project has thousands of lines of code, I can't just copy-paste them all here.
We can give you access to the project via Cloud Console, why are you saying it's not possible?
We have a reproducible case of triggers that are not running even though they exist, I provided the Ids of such triggers.
ta...@gmail.com <ta...@gmail.com> #10
wa...@gmail.com <wa...@gmail.com> #11
I noticed recurrent triggers are able to run twice.
Third time gets expired and routine stops forever.
That was fixed to me as soon as I disabled Chrome V8 for that project.
So my assumption is Chrome V8 is not suited to Google Apps and still lacks maturation.
Try yourself running Apps Script Legacy to check what happens.
BTW, I'm not from Google support. Just a regular user...
Regards
ta...@gmail.com <ta...@gmail.com> #12
mi...@google.com <mi...@google.com> #13
Hello,
In case you cannot reproduce this in another project, please contact G Suite support in here:
In any case, since you are not sure if you can reproduce this in a new project, I'll wait for your news and won't close this case yet.
Kind regards.
ta...@gmail.com <ta...@gmail.com> #14
One important thing to note: THIS CAN ONLY BE REPRODUCED IF THE PROJECT IS PUBLISHED AS A SHEETS ADD-ON.
Here are the steps we used to reproduce the problem:
1. Create 3 blank G-Sheets documents and create hourly trigger in each document via “Create Trigger” menu (see create-trigger-menu.png)
2. Make sure all triggers run, in our case they ran 5 times during 5 hours (see triggers-list.png)
3. Go to “Edit trigger” window and just press “Save” button. We did it for the first two triggers (see modify-trigger.png)
4. This caused the 2 triggers to stop and never fire again. The trigger ids are 6CFa7J1dRkeWfK4PbHAHHA and WHAd1CcdSbqeGSlO74qwxg.
The 3rd trigger is still running, id =c1et5snyQPCZJCGmCYYfKQ. See triggers-stopped.png
Please see the test add-on code below.
Code.gs:
function createTrigger ()
{
var triggerId = ScriptApp.newTrigger("runTrigger").timeBased().everyHours(1).create().getUniqueId();
SpreadsheetApp.getUi().alert('Trigger created Id=' + triggerId);
}
function removeTriggers ()
{
removeUserTriggers();
removeProjectTriggers();
}
function removeUserTriggers ()
{
ScriptApp.getUserTriggers(SpreadsheetApp.getActiveSpreadsheet()).forEach(function (trigger) {
if (trigger)
{
var id = trigger.getUniqueId();
ScriptApp.deleteTrigger(trigger);
SpreadsheetApp.getUi().alert('Removed User Trigge id=' + id);
}
});
}
function removeProjectTriggers() {
ScriptApp.getProjectTriggers().forEach(function (trigger) {
if (trigger)
{
var id = trigger.getUniqueId();
ScriptApp.deleteTrigger(trigger);
SpreadsheetApp.getUi().alert('Removed Project Trigger id=' + id);
}
});
};
function runTrigger ()
{
Logger.log ("trigger executed");
var range = SpreadsheetApp.getActiveSpreadsheet().getRange("A1");
var d = new Date();
var currentTime = d.toLocaleTimeString();
range.setValue(currentTime);
}
function onOpen(e) {
SpreadsheetApp.getUi()
.createAddonMenu()
.addItem('Create Trigger', 'createTrigger')
.addItem('Remove All Triggers', 'removeTriggers')
.addToUi();
}
ta...@gmail.com <ta...@gmail.com> #15
iz...@gmail.com <iz...@gmail.com> #16
al...@itechart-group.com <al...@itechart-group.com> #17
is...@google.com <is...@google.com>
jp...@google.com <jp...@google.com>
jp...@google.com <jp...@google.com> #18
I ran the code in a test domain and will report back if I can reproduce this. Please comment here if this is still an issue.
Description
Automatic hourly trigger stops executing the function after a certain sequence of actions.
A small code sample that reliably reproduces the issue. The sample should run as-is or with minimal setup, without external dependencies.
ScriptApp.newTrigger("RunTrigger").timeBased().everyHours(1).create()
function RunTrigger ()
{
Logger.log ("trigger executed");
}
What steps will reproduce the problem?
1. Create an hourly installable trigger and make sure it's running every hour.
2. In the script editor, go to Edit -> All Your Triggers to see the list of triggers
3. Click on the edit icon next to your trigger (screenshot1.png)
4. In the subsequent dialog box (screenshot2.png), don't select anything, just click on Save.
5. Next hour observe that the trigger has stopped executing and is just sitting there.
What is the expected output? What do you see instead? If you see error messages, please provide them.
The expected output is for any trigger to keep working after it's been edited.