BOT AppScript Execution cancelled Issue

BOT trigger AppSciprts and if duration is over 60s, it may cause 'Execution cancelled' from this morning.

However, some cases (over 60s) can be completed while some can not. (No issue on AppScripts yesterday)

Not sure what's the issue.

8 28 1,293
28 REPLIES 28

Steve
Platinum 4
Platinum 4

Please contact AppSheet Support for help with this.

OH thank GOD i found someone else having this issue. 

I've been experiencing this myself, scrambling to find a solution as it's literally caused everything to come to a screeching halt!

Good to know it's not something with our account, or the script, but instead an AppSheet wide problem.

Now that I know this, I'm going to send in an escalation request - see if we can't get this sorted out ASAP!

@lizlynch 

__________________________________________________________________________________

Update: my service ticket was responded to, they've escalated this to the specialist team.

I spent some time today investigating GCP, and noticed something that might be the issue:

  • There is a setting in cloud functions/cloud run that controls when it should retry.
  • This setting defaults to 60 seconds, so if someone didn't change this by accident - it would have this effect.
    • The function/run would try and execute.... but at the 60 second mark it would cancel whatever, and try again.

If AppSheet build the script-running-system using GCP, and they used Cloud Run to accomplish this, and someone forgot to change the default 60 seconds to the max 3600.... then any of our long-running scripts would retry themselves.

I've passed my theory along to the team, hopefully they can resolve this quickly. 

Thanks for your information.

not sure why suddenly, it happened this week. I suppose it's not my issue.

May I know when you found this problem ?

Instead, I'm trying to use 'call a webhook' to replace and currently, no timeout issue if exectuion period is over 60s.

Glad to know.
So it seems something wrong with Google Apps Script (GAS)?
We are experiencing the same issue(Execution cancelled). Our AppSheet app calls the GAS script via automation. However, when the execution time exceeds 60 seconds, the running GAS script gets cancelled.

 

I also report this issue as well as this post to the AppSheet specialists.

Let us wait for the update.

Just wanted to chime in and indicate that I am having the same issue.

I am also having this same issue

This issue is being looked into. Thank you for reporting!

Many Thanks. Same issue, I went to a lot of work until I realize it is not only me. Good to know that it is not on the user side. Just have to be patient now 🙂

Thanks for the reply! Do you have an estimate as to when we can expect this to be fixed? 

Is this issue in this case still unresolved?
I am having a lot of trouble with the GAS program process being cancelled in the middle of the process.
It is interfering with my work.

@Sadaharu_K - Just confirming that this issue is still open, but it is being worked on. Thank you for your patience! 

IF this is really addressed by AppSheet dev member, could you add the updates on your daily notes, so that we see the progress? thanks.

 

@nico 

for the attention from specialist. 😊

 

 

The outage on Apps Script executions over 60s should be resolved by the end of day today. It's already successful for over 50% of 60s< requests but the remaining 50% should be rolling out today - we're waiting on a server config rollout to complete which is slow.

Thank you! 😊

Requests over 60s has been fully fixed according to logs as of yesterday -- thanks for your patience.

We confirmed that processes exceeding 60 seconds are not canceled.
Thank you very much.

My app seems to still be having the issue but now the time limit is 120s instead of 60s. 

The 120s timelimit is for bots triggered from events. See: Automation Limits

The limit is increased to 5 minutes if you want to run a scheduled bot instead.

I hope you can share what our frustration is. The number of the members are reporting the new findings (basically bugs) and Google team on this community is going on silence. This is giving us Google not taking any action to those voices, or our voice is not reaching out to the ears of your team.

Once the outage happens, then I post to this community to share what sort of unusual behavior (once again, bug or outage).  If we are lucky enough, then Google team gets back to us, saying we are aware of your issue.

Then, the question is why Google is always "not proactive" to share the latest issues (inc. outages).....

The service health site never updated, it indicates AppSheet is running 24/7 basis without problems. So I deleted your service health site from my favourite, as it never helps us.

AppSheet is for business application, so the base layer of the user expectation is it runs seamlessly. However, the outages still happens friquently. Then we post a problem on this community.  Google support desk says they watch 24/7 basis, however, all the users know it is faulty statement.  When we are lucky, then we can get the swift response ever when we see the outage......

Annoying, hope you can share our frustration.

 

Thank you very much for your reply.
I hope you will receive good news as soon as possible.

Thank you for your continued support.

JSO
Silver 2
Silver 2

The same thing happened to me.
My script took 5 minutes to execute directly.
Called from ApPSheet it was cancelled after 60 seconds and started again.
I hope they fix it although my specific problem (generating PNG pages from a PDF file) was solved using Cloudinary tools (excellent, by the way).

For anyone that's looking for a work around, I came up with something yesterday so I could at least get back online to some degree.  It involves creating scripts that run on a timer, that pull data from the sheet we need to watch, pulls out any records that need to be processed, and then processes them.

  • There's more involved, as we're dealing with parallel processing, but that's essentially what happens.

https://www.googlecloudcommunity.com/gc/Tips-Tricks/Building-a-work-around-to-Automation-A-framework...

We encountered a similar problem.

It appears that when calling a script from AppSheet, the timeout becomes 60 seconds, and it retries twice.
So once the GAS (Google Apps Script) execution time exceeds 60 seconds, it results in "Execution cancelled".

We used a workaround to avoid this issue.
Specifically, we implemented the doPost method in GAS, and then called it via a webhook in AppSheet. This method allows us to set our own timeout and number of retries. We set the timeout to 360 seconds, which is the maximum execution time for GAS.

This ultimately solved the problem. We hope this helps you.

I will keep this in mind for future actions.
In my specific case I needed to obtain each of the pages of a PDF in image format.
I created a program with GAS that returned the images in PNG format. Separating a 40-page JPG took my program almost 5 minutes (called directly from AppScript).
When linking it from AppSheet I had the problem of waiting time and duplication of the action.
I looked for another solution and found Cloudinary, a website that can deliver the files by doing a previous treatment.
I upload the PDF file and through its URL and some parameters (size, page number,...) and the desired format, it returns a JPG image almost instantly.
My problem is solved but I appreciate this solution for other cases.


@Koichi_Tsuji wrote:

Then, the question is why Google is always "not proactive" to share the latest issues (inc. outages).....


Tsuji I share your frustrations.  As someone that's building software that companies literally run on - mission critical stuff here - it adds difficulty to the process when there's an error on the AS side of things, and there's little transparency as to what's going on.

We're looking at things from the user perspective; if you put your business hat on and look at it from that side... if they were to have an accurate and honest running list of all the issues, outtages, etc. - what sort of image would that present?

Now.... if they embraced it, leaning into the fact that they're building a software system.... humans are imperfect... mistakes will be made, but we fix them ASAP!!!! We're tightly engaged with our community, etc. etc.

  • You remember what the community was like in 2018?
  • Devs here answering questions directly; especially here during the daily rollout, to catch all the issues people report.
  • Those times were great.  When something popped up, we could say something and someone ON THE ACTUAL DEV TEAM would chime in with the answer.  OMG, it was great. Problems were solved almost immediately. 

If we could get back to something like that, man.... that would go a LONG way - and present such a strong positive front image to potential new businesses that are thinking of migrating their systems to AS.

---------------------------------------------------------------------------------------------------------------------

I will say: it does seem that the trusted community expert escalation thing works well.  Whenever I submit something through that, it's escalated pretty quickly.

Thanks for getting a fix in place, and for the updates and transparency. 🙏