Google Sheet Add-on not updating - google-apps-script

I wrote a Google Apps Script and successfully deployed it as a Google Sheets Add-on.
Yesterday, I found a bug, I updated the script, and I deployed a new version of the add on.
No matter what I do, I still see the old version of the add-on in Google Sheets.
I tried to:
1) Reload the Google Sheet file
2) Uninstall and install the plugin
3) Restart Chrome
4) Re-deploy the add-on
Nothing worked.
How can I force Google Sheets to update to the new version of the plugin?
UPDATE: As pointed out by Alan Wells, this is related to the following bug:
https://groups.google.com/forum/#!topic/google-apps-script-community/WTV2CGFTuHU
Workaround: publishing the plugin from the GCP Marketplace configuration screen worked for me.
Thanks,
Fabio

This issue is now fixed. Also the new GSM publishing flow, which no longer requires to publish or update a Chrome Web Store listing, is live.
To update the script of an add-on follow these instructions https://developers.google.com/gsuite/add-ons/how-tos/update-editor-addons#update_published_add-on_code.

Related

How to use google app script addon by app script manifest or local environment?

I am new to google app script. I don't know how to deploy the Google add-on. I have tried some setups for deployment but have not been able to do the deployment. so, I have some questions below.?
Can we use the google app script add-on without deploying on google marketplace? or
how to use google add-on local environment?.
or
Can we use the google add-on just by passing appscript.json? as we do in excel? In the excel add-in we just pass the manifest file and we put the dist folder on the local server so anyone can use that add-in.
Can anyone guide me about this.
I suggest you read https://developers.google.com/apps-script/add-ons/ and https://developers.google.com/workspace/marketplace
To deploy an add-on (i.e. create a version of the script that can be used by an app in the Google Workspace Marketplace) see https://developers.google.com/apps-script/concepts/deployments
To test an add-on (install it without having to publish it in the Google Workspace Marketplace)
See https://developers.google.com/apps-script/add-ons/how-tos/testing-editor-addons.
To publish an app in the Google Workspace Marketplace see https://developers.google.com/apps-script/add-ons/how-tos/publish-add-on-overview and https://developers.google.com/workspace/marketplace/how-to-publish.
Sheets and other Google Workspace products are on the cloud, so you can't copy a file somewhere to install and add-on. If you have are a Google Workspace customer you can publish a private app in the Marketplace. Then the admin can install the app for its users.

When deploying Google App Script Add-On appscript.json code changes

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!

Google Apps Script: "Error 401: deleted_client The OAuth client was deleted" All of a sudden?

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.

Error:Exception: You do not have permission to call Session.getActiveUser. Required permissions: https://www.googleapis.com/auth/userinfo.email

I recently migrated one of my projects to the new V8 engine of appscript.I am getting this exception
Exception: You do not have permission to call Session.getActiveUser.
Required permissions:
https://www.googleapis.com/auth/userinfo.email..Session.getActiveUser
is not accessible without permission
Any ideas would be appreciated
As stated by #zimday this isssue has been already reported in Google Issue Tracker.
You can follow the issue in this link. Give it a +1 to make Google aware of the people affected by it.
As stated by #Raserhin, there's an open issue with google and the problem seems to be with the new App Script runtime powered by Chrome v8.
A small workaround (until the issue is resolved) will be to disable the App Script runtime as follows: (Run -> Disable App Script runtime powered by Chrome V8). The project will now run with Apps Script Legacy which does not have this issue.

Scripts in my Google sheet not working After Downloading

I have a Google sheet with some Google Scripts..here its working fine,But After Downloading and opening these scripts are not working. Is there anything to do for working these scripts.
Google Scripts can only run on Google servers. You cannot download them and run locally.