Publishing a Google Docs Add-on: Project Key is not associated with the current project
Asked Answered
S

10

17

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

Seif answered 7/12, 2016 at 22:22 Comment(6)
Have you published a version of the script yet. Look in File->Manage Versions. There should be at least one managed version.Arundinaceous
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.Seif
Are you using the key or the ID?Arundinaceous
The project key (deprecated), did try the Script ID as well but received the same errorSeif
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.Seif
Switch your script project to use a standard GCP project Ref: developers.google.com/apps-script/guides/… How to: developers.google.com/apps-script/guides/…Prebo
S
3

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...

Seif answered 15/12, 2016 at 15:21 Comment(0)
M
23

I was able to fix by combining two successful responses from this post:

  1. use version number, and only the number, e.g. "1" -- Do not use "v1.0" or "Version 1 on Oct 1, 6:10 AM" or your deployment's Description
  1. After completing step 1, delete your entry in field 'Docs Add-On Project Script ID', then re-enter it -- the page seems to not re-evaluate your changes unless you do this; I had tried saving multiple times before doing this with no success using the correct version number and script ID.
Miramirabeau answered 1/10, 2022 at 10:30 Comment(3)
wow. Thank you. both of those tips are perfect. This was about to turn into one of those "what the f*** am I doing wrong here"-developer-scream moments.Dull
also note that adding version like 0.1 gives the error, I needed to enter 1 insteadArmes
This worked, but the Marketplace SDK API/Service details ("App configuration" tab) requiring the raw version number when the Manage deployments Apps Script dialog makes you name the version, is dumb, and adds to the surprisingly painful experience of testing and publishing Google Workspace/Editor add-ons.Enthrall
A
4

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

Agrippina answered 9/9, 2018 at 19:12 Comment(0)
S
3

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...

Seif answered 15/12, 2016 at 15:21 Comment(0)
D
3

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.

Dervish answered 16/9, 2020 at 23:35 Comment(0)
P
1

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

Plovdiv answered 7/10, 2020 at 1:11 Comment(0)
G
1

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.

Giorgia answered 30/9, 2021 at 6:10 Comment(0)
R
1

I got the same error today, I made it finally work. I will go through the fields I checked.

  1. App Integration [I'm deploying using deployment ID, you can get the ID from AppScript manage deployment]

Select the option as per your need

  1. Choose which workspace you are releasing [In my case Sheets], type the version from AppScript.

Sheets addon

  1. Enter all other general Credentials and save.

The above steps worked for me.

Raymond answered 19/5, 2022 at 6:55 Comment(0)
G
1

Try to use the Google Workspace Add On and enter the App Script Deployment ID. That accepted for me and showed it as a Sheets Add-On

Giraud answered 14/8, 2022 at 3:43 Comment(0)
O
0

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.

Overmatter answered 2/5, 2021 at 2:22 Comment(0)
H
0

Looks like it is not possible to change scriptId after a round of review. So you can just update only version. I changed to last number of deployment version like '6' and it is saved.

Hagride answered 17/1, 2023 at 10:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.