Fixed
Status Update
Comments
ce...@gmail.com <ce...@gmail.com> #2
I encountered that issue with my project. I have time-based trigger that appoints next run using time-based trigger.
am...@google.com <am...@google.com>
am...@google.com <am...@google.com> #3
Can we reasonably assume that ES5 will not be removed before this issue is resolved?
@mr...@gmail.com: You probably should star this issue (if you haven't yet) if you are affected by it.
@mr...@gmail.com: You probably should star this issue (if you haven't yet) if you are affected by it.
qi...@gmail.com <qi...@gmail.com> #4
Not sure if this is exactly the same issue, but triggers under V8 get deleted when created programatically from a straight script. This extract is from a bigger piece of code that others have worked on, I've tweaked it to just run the core functions. Under V8 the triggers end up disabled without reason, whereas under ES5 it all works as designed.
var ml_howFrequent = 3;
function ml_install(){
//Delete any already existing triggers so we don't create excessive triggers
deleteAllTriggers();
if (ml_howFrequent < 1){
throw "[ERROR] \"ml_howFrequent\" must be greater than 0.";
}
else{
ScriptApp.newTrigger("ml_install").timeBased().after(ml_howFrequent * 60 * 1000).create();//Schedule next Execution
ScriptApp.newTrigger("ml_startSync").timeBased().after(1000).create();//Start the sync routine
}
}
function ml_startSync(){
Logger.log("Output this");
}
function deleteAllTriggers(){
var triggers = ScriptApp.getProjectTriggers();
for (var i = 0; i < triggers.length; i++){
if (triggers[i].getHandlerFunction() == "ml_startSync" || triggers[i].getHandlerFunction() == "ml_install"){
ScriptApp.deleteTrigger(triggers[i]);
Logger.log(triggers[i].getHandlerFunction(), " has been deleted");
}
}
}
var ml_howFrequent = 3;
function ml_install(){
//Delete any already existing triggers so we don't create excessive triggers
deleteAllTriggers();
if (ml_howFrequent < 1){
throw "[ERROR] \"ml_howFrequent\" must be greater than 0.";
}
else{
ScriptApp.newTrigger("ml_install").timeBased().after(ml_howFrequent * 60 * 1000).create();//Schedule next Execution
ScriptApp.newTrigger("ml_startSync").timeBased().after(1000).create();//Start the sync routine
}
}
function ml_startSync(){
Logger.log("Output this");
}
function deleteAllTriggers(){
var triggers = ScriptApp.getProjectTriggers();
for (var i = 0; i < triggers.length; i++){
if (triggers[i].getHandlerFunction() == "ml_startSync" || triggers[i].getHandlerFunction() == "ml_install"){
ScriptApp.deleteTrigger(triggers[i]);
Logger.log(triggers[i].getHandlerFunction(), " has been deleted");
}
}
}
qi...@gmail.com <qi...@gmail.com> #5
Hi
I also have an issue with trigger.
A script published as a web app and create a time trigger, when a new version of the web app is published with V8 runtime the authorization are lost.
So you have to revert runtime to old one and it goes back to normal way.
Stéphane
I also have an issue with trigger.
A script published as a web app and create a time trigger, when a new version of the web app is published with V8 runtime the authorization are lost.
So you have to revert runtime to old one and it goes back to normal way.
Stéphane
am...@google.com <am...@google.com> #6
Hi
I met the same issue here when I tried to create a time-based trigger inside of the script as answered in this post [1].
I have disabled V8 runtime option which made the script working again.
Is there an ETA for this issue?
[1]https://stackoverflow.com/a/8608327
I met the same issue here when I tried to create a time-based trigger inside of the script as answered in this post [1].
I have disabled V8 runtime option which made the script working again.
Is there an ETA for this issue?
[1]
Description
I have reported another issue(
* Which Developer Preview build are you using? See Settings > About phone > Build number (for example OPP3.170518.006).
OPP4.170623.014 publicly known as the 4th Android 8.0 developer preview
* What device are you using? (for example, Nexus 6P)
Nexus 6P
* What are the steps to reproduce the problem? (Please provide the minimal reproducible test case.)
Similar to the previous report
1: Install a new app which targets Api Level less than O(for example 25, 24, 23, 22...)
2: Don't run it after the installation, .
3: Go to settings -> Apps & notifications -> App info -> [the app] -> Battery(for those with "No battery use since last full charge" notes).
4: Find the "Background activity" section
5: Turn off it
* What was the expected result?
Step 4 and 5 are successful for apps targeting less than API level 26(O)
* What was the actual result?
For app that has never started, step 4 is successful since there is no "Background activity" option, thus step 5 is not available.
That option will not show up unless the app is launched once.
* Relevant logcat output.
It is not needed since the issue is obvious and can be reproduced easily.
* Optional: Link to any screenshot(s) that demonstrate the issue (shared privately in Drive.)
* Optional: Link to captured Android bug report (shared privately in Drive.)
It is not needed since the issue is obvious and can be reproduced easily.