I am trying to update a Google Sheets Addon.
I currently face 2 problems:
the new Script Editor does not know anything about versions (so I used the legacy editor and created a new version there)
when I want to deploy the changes (via the G Suite Marketplace SDK) I get an "Project Key is not associated with the current project or the script version doesn't exist." error when I enter the new version.
What should I do?
We have just rolled back to a previous version, can you refresh and try again? Please let me know how it goes.
Related
I've got some Google Sheet script code that I'd like to extract into Google Sheet Addon to be published for just of our domain (not public web). Individuals on my team have been able to do this successfully in the past but after 1/25/2019 when Google removed Add-Ons from Google Chrome Store we've been having difficulties.
I am trying to follow:
https://developers.google.com/gsuite/add-ons/how-tos/publish-addons#publishing_instructions
But get the following error when trying to configure the G Suite Marketplace API:
Project Key is not associated with current project or the script version doesn't exist.
I am pulling the project Key from File --> Project Properties:
Does anyone have any idea where I am going wrong or know of good tutorial of how to publish a private Google Sheet Add-on?
I had the same problem but identified a solution as follows.
In the Google Apps Script Editor, under Resources -> Cloud Platform Project, click the ProjectName - project-id-xxxxxxxxxxxxxxxxxxx link. Then when it opens your Cloud Platform Project, in the upper left corner, your project name will be listed with a dropdown. Click the dropdown and verify that this project-id-xxxxxxxxxxxxxxxxxxx matches the link you clicked. The two numbers did not in my case and I had to refresh my screen for the correct project-id to show up in the Cloud Platform Project screen.
Don't know if this will help, but I was having the same error message and I just got it to work. I put in the value from File --> Project Properties: ->Project key (Deprecated) and still got the error. Then I changed the version to the number of my latest version and it worked.
Double check your version number - while in the script editor, click on 'File' and 'Project Properties'. I had the same problem. It turns out my error was entering the version name I had given my current version of the script (3.0), instead of the number Google had assigned to the current version of my script (3).
Once I entered '3' as the version number, I no longer got the error message "Project Key is not associated with current project or the script version doesn't exist ", and I was able to save.
I used the 'Project key (Deprecated)'.
The Project key has been deprecated. Try using the Script Id instead.
I have been searching for an answer, more that likely using the wrong terminology, to my question and I have read through the Google documentation but I am now more confused than when I started looking for the answer.
I'm new to Google Apps and a complete beginner at Javascript. I recently started working in a Google Apps school (we have our own domain) and I have started developing some custom Google Sheets to aid other teachers and boost productivity.
I have developed a Sheet with some custom scripts and a custom menu bar to call the various functions of the script. Since I am so new to Javascript my scripts have some bugs that I fix as other users report them to me. However, my problem is that when I fix a bug in my "master" Sheet the end user must open the shared master Sheet and make a copy of it to benefit from the update. I want to update to be pushed out to all copies of the sheet (circa 4 copies)
I know need to deploy it but I don't know whether I need to deploy it as a web app or a sheets add-on from the script editor? Again, we have our own domain so I do believe I don't need to have it approved by Google to use it internally in our domain?
Based from this documentation, public add-ons require a review before publication, since you have your own domain, you can publish just for users within your domain without a review.
To publish an add-on for the first time, follow these steps. If you also want to let Google Apps domain administrators install and authorize your add-on for all users in their domain, follow the steps for domain-wide publication as well.
When you fixed your bugs and wanted it to be updated to all copies of sheets, you can follow this Update your add-on link to update an add-on that you have already published.
Open the add-on project in the script editor.
Make the necessary changes to your code, then save a new version of your project by clicking File > Manage versions, then Save
New Version. Close the Manage Versions dialog.
Click Publish > Deploy as add-on. (Or Sheets or Docs or Forms add-on.)
In the dialog that appears, change the add-on's details as needed, select the new version of your script, then click Update store
item. (If you change the add-on's name, make sure you also change
the name of the Apps Script project to match, as the project name is
shown in the authorization dialog.)
In the store listing, click Publish changes, then click OK in the dialog that appears.
Hope this helps!
Is there a way I can reach out to someone in the Google Apps team who could help me with an outage?
I accidentally deleted the file that contained the project associated with a Sheets Addon published on the web and having 5000+ users (had a thread here: https://stackoverflow.com/questions/36704711/i-accidentally-deleted-the-google-sheet-that-contained-code-for-my-published-add)
I worked with Google Drive support to undelete the file and now I can access it, and all the code is fine.
However, since then the addon installed by so many users stopped working for everyone. It gives the users the following error:
"We're sorry, a server error occurred. Please wait a bit and try again."
I tried re-publishing a new version of the add-on, but I can't do that either, I'm getting the following error:
Any help would be appreciated.
Was able to fix this by reassigning the sheets addon code to a different Developers Console Project: Resources -> Developer Console Project... -> Change Project.
Just created a new empty project for that.
It looks like the problem was in the addon being linked to a project that for some reason got deleted when I deleted the addon code. And restoring the addon code didn't restore the association with the project.
It's still a mistery to me how a Sheets Addon depends on the Developer Console Project, but reassigning it to a different project fixed the issue. I was also able to publish an updated version of the addon, however creation of the new project triggered a manual review, so it'll take some time before new fixes will become available.
I am working on an add-on for the new Google spreadsheets but I wonder how versions are handled? In the old script gallery, there were versions. Are they working the same in add-ons after the add-on is published?
Also I see an auto generated Help submenu item. How do I generate content for it?
Thanks.
Thanks to #Steve Lieberman answer I see now how to choose on publish and update later the version of the add-on. But in the documentation I can't find an explanation of what will be the effect of updating to a new version on already used copies of the add-on. Will they be automatically updated? Will they receive in some form a notification of the new version?
Thanks.
When you publish your add-on [1], there's an option to select the version of the script that will be used.
Note there's also a version of the Chrome Web Store entry, this can differ from the version of the script.
The source code that is executed will be based on the version of the script that is published to the Chrome Web Store.
[1] https://developers.google.com/apps-script/add-ons/publish#publish_your_add-on
First create a new deployment/version of the script in the script editor.
Then update the script version in the Project's Google Workspace Marketplace SDK page, App Configuration tab (scroll down), then Save it.
Note that the update will take effect immediately when Saved, including for documents that are currently open in a browser.
Debugging: I don't think it's possible to have multiple deployments/versions of a Published Add-On active at the same. You have to do your debugging of the HEAD version in the Add-On's Host document, or in a document that does not have the Add-On installed (you can add the HEAD deployment of the Project as a script library in that case).
I use Google App in my company, and I often have a prob when I update my script.
When I Update my script , my Webpage on Google sites is not updated , and for long time.
I must create a new script when I update my script.
Can I resolve this problem ?
regards
There are two ways to publish your code:
A) Either by deploying a new version, which is done as follows:
File -> Manage Versions
Add a new version -> Close dialog
Publish -> Deploy as web app
Select the version added -> Update
B) Or by always using your latest code
Publish -> Deploy as web app
Under the web app URL, click on the latest code button.
This way, any change done and saved will automatically be updated upon a refresh
Follow the instructions in the documentation. You need to first save a new version in the versions dialog. Then you need to re-publish it using the new version number.