AppsScript Web Deployment always stops working after 3-4 days

My first post, so please advise if this is the wrong community area.

I have a Google Sheets Apps Script, that I have deployed as a Web deployment (head, running as me, expose to everyone), I have authorized the script and can call it via cUrl etc for 3 or 4 days at a rate of once per hour.  And it works great (populating the spreadsheet with some environmental data).

But then I get a 403

I then have to redeploy, reauthorize and update my script to use the new URL and all works fine again.  But then it again stops after 3-4 days with the same 403 error.

 

What are the steps to ensure the script is available long term please?

Solved Solved
0 10 1,866
1 ACCEPTED SOLUTION

This is not the proper forum.  This is a Community on usage of AppSheet apps.  I would recommend going to a Google search for your issue, almost everything, including all the Google Community posts, can be found there.  At least as a starting point!

View solution in original post

10 REPLIES 10

This is not the proper forum.  This is a Community on usage of AppSheet apps.  I would recommend going to a Google search for your issue, almost everything, including all the Google Community posts, can be found there.  At least as a starting point!

@Readiescards if this is a Workspace instance, ask over on the Workspace forum.

To me, it sounds like you are hitting a quota.  If you stop queries for 25 hours, does it start working again?  See https://developers.google.com/apps-script/guides/services/quotas

-KAM

Useful link thank you.

Currently I'm posting data once/hour and it takes between 1 and 16 secs to execute the script (I've no idea why the huge script execution time variation it is a fairly simple script that just creates a new row in a spreadsheet and populates the cells based on matching the json event data variable names to the column names). 

 

> If you stop queries for 25 hours, does it start working again? 

I will try when it next fails should be any day soon

I appreciate the advice and have yet to find the 'correct' forum/group to ask Apps Script questions 

@Readiescards stackoverflow is my go to for programming questions TBH but https://www.googlecloudcommunity.com/gc/Workspace-Q-A/bd-p/workspace-q-a might be good too though I think your post might have been moved there already? -KAM

So getting 403 now, have stop the automation that is trying to reach the Apps Script now. Will give it a good 24 hr break and then re-enable. Watch this space!

@Readiescards never hurts to sacrifice a few office interns at this point to appease the computer gods.  -KAM

36 hours, re-enabled script and still getting 403 error 😞

Re-deployed and working again but not something I want to do every few days. Bit lost.  

@Readiescards does your workspace have any tech that might scanning and disabling things? Is your session length the same as the amount of time until it stops working? -KAM

My Apps Script is an extension of a Google Spreadsheet.  It says it is associated with a standard GCP .  If I click on the GCP link it takes me to Google Console.  Which shows nothing specific is setup e.g. no logging, tracing or errors. (as I'd expect as everything was created from the Google Sheets).  On the GCP Activity and Recommendations tabs nothing is listed.  I've no idea what a 'Workspace' is in this context - is that something I need?   The script has been working fine overnight. I very much appreciate your assistance

Top Labels in this Space
Top Solution Authors