I've been trying to update my add-on in the Google Workspace Marketplace and every time I try to deploy, my manifest file (appscript.json) changes, making it impossible to deploy a new version of my add-on.
https://youtu.be/PcNn39z9pac
Does anyone know why this is happening / what I can do to fix this error?
Thanks in advance!
I currently use a Google App Scripts on Google Sheets for my budgeting spreadsheet. Essentially, the way I have it set up is:
Buy item
Input expense onto Google form (which feeds into a spreadsheet)
Use Apps scripts to convert timestamp into yyyy-MM-dd
I've been using this process for 4 years but all of a sudden, today it stopped working by giving me this error below.
Error 401: deleted_client The OAuth client was deleted
Here's my app script:
Here's my trigger:
At some point your Apps Script project's attached Google Cloud Platform (GCP) project (which manages the Oauth client) was likely deleted. You could confirm this by going to the Apps Script project editor, click the gear on the left for Project Settings, then click the Project Number link in the Google Cloud Platform (GCP) Project section. If it loads the GCP console (using the correct Google account) but gives you an error instead of bringing you to the project, then it probably doesn't exist anymore.
First, check if it's been deleted within the past 30 days and could be recovered:
In the GCP console, go to the Manage resources page (project picker → three dots button → select your organization → Manage resources).
Below the list of organizations, folders, and projects, click Resources pending deletion.
If you see the project there, check the box then click Restore. In the dialog that appears, confirm that you want to restore the project.
Go back to the Apps Script project editor and run one of your functions, and it should allow you to authorize the project again instead of giving you the 401 error.
If the project does not appear in the Resources pending deletion list because it'd been deleted over 30 days ago:
Copy all of your Apps Script projects' files to your local machine. If there are many files, consider using the clasp CLI tool, which would allow you to clone the entire project locally with one clasp pull command.
[IMPORTANT] Confirm that all of the files have been stored locally (and backed up, if desired), because the Apps Script project will be deleted permanently.
Make note of any services which are enabled in the Services section of the Apps Script project editor sidebar.
Delete the Apps Script project by going to the Apps Script project's Overview page, then click the trash can labeled Delete project forever.
In your Google Sheets doc, go to Extensions → Apps Script again and it will create a new Apps Script project (with attached GCP project).
Save the default Code.gs file
Re-create the projects' files. If you'd used clasp pull in the first step, then you can use clasp push to push the files from your local machine back to the project. In this case, go to the Apps Script project's Project Settings page and copy the Script ID. Then update the scriptId in the local .clasp.json file, save it, then clasp push.
If there were Services enabled in the previous project, enable them again in the Services section of the editor sidebar.
Run one of your functions and it should allow you to authorize the project again instead of giving you the 401 error.
Web app run latest code.
Execute the app as owner
Who has access to the app: in company
I'm a editor and in google script I don't have have read access any document. But I can test code by run web app latest code.
When enabled new Apps Script runtime powered by Chrome V8 (alpha) for this project, I received the notice "Exception: Document ****** is missing (perhaps it was deleted, or you don't have read access?)".
After, I disabled new Apps Script runtime powered by Chrome V8 => I received the notice "You do not have permission to access the requested document."
I couldn't run web app latest code as before. How to fix it? Thanks :(
I have an Apps Script project that I am developing and pushing updates to via Clasp, and I want to setup clasp stackdriver logging in the terminal. In order to do that, I need the Project ID of the script, which I can not find.
When inside the script editor I navigate to Resource -> Cloud Platform project.. I am just greeted with the following message where the ID should be: "This script has an Apps Script–managed Cloud Platform project."
In order to use stackdriver like you want to, you need to switch to a cloud project that you created at console.cloud.google.com. Once you have a project, use the same dialog at Resource -> Cloud Platform project.. to switch to it.
I am trying to set up a template file with a script that needs to be authorized every time the file is duplicated. I would like the authorization to prompt when the file is duplicated and opened. How do you for prompt authorization on open?