4
votes

I am attempting to publish a simple Google Docs add-on, following these instructions: Publishing an Add-on

However when completing the configuration for Google Apps Marketplace SDK, I enter my script project key (found from file --> project properties) and receive the following error: 'Project Key is not associated with the current project.'

Only instance where I can find someone with the same problem (here) occurred when they created a project on the Google Developers Console instead of going through resources --> Advanced Google Services. This is not the reason for my error, can anyone shred any light onto my problem?

Any help would be gratefully received, Connor

6
Have you published a version of the script yet. Look in File->Manage Versions. There should be at least one managed version. - Spencer Easton
Yes I have :/. Tried following the steps a few times now, cannot see were I am going wrong. It is defiantly the right project key and the error does not help narrow down to the problem at all. Thank you for your time, this is staring to bug me after finally getting to the point where I am ready to publish, falling at this step is annoying. - Connor
Are you using the key or the ID? - Spencer Easton
The project key (deprecated), did try the Script ID as well but received the same error - Connor
When I go to Resources --> Developers Console Project, it says 'This script is currently associated with project:' and lists the correct project where I am attempting to input the project key. - Connor

6 Answers

3
votes

For me I need to go Publish->Deploy as API. Select the correct version and then the publish screen worked

2
votes

Kept trying, did not change the way I tried publishing nor the project key I was entering and it worked after so many retries. Wish I could give a more detailed answer...

1
votes

I needed to include a correct version number (1,2,3,4; not "v0.1") in addition to the script ID. The error suggested my script ID was wrong, but the error went away when I picked a valid version number.

1
votes

For me, the Google App Script file needed to be associated with the project.

  1. In the GAS, go to Resources > Cloud Platform Project.
  2. Under Change Project, enter the project number (which can be found on the home page of the Google Cloud Platform Project in the Project info module), and click Set Project.
  3. Confirm the notices (though make sure that is really what you want to do).
  4. Once it has been set, go back to the App Configuration, and re-enter the information (if you are already on that page, refresh).

That's what worked for me, but maybe other developers get that error for other reasons.

Source: https://developers.google.com/apps-script/guides/cloud-platform-projects#switching_to_a_different_standard_gcp_project

0
votes

It's different in deploy or test in legacy editor and new editor.

And I'm using legacy editor before (because some following steps from documents is not work in new editor),

So when I lookup Mange deployment in new editor,

It wasn't exisisted,

And the deployment ID it's not work when I fill out App configuration in Google Workspace Market.

For me I just change to following the Legacy editor's following steps https://developers.google.com/workspace/marketplace/enable-configure-sdk#legacy-editor_2

and It works.

0
votes

Hmm I had issues as well. It didn't work with version 1 in "Docs Add-on script version" but while I tried a bunch of stuff I ended up deploying again and then I incremented version to "2" and then it worked.