Summary
This incident stemmed from a misalignment between a Google Cloud Project and the Apps Script project metadata required for publishing a Google Workspace Add‑on. Although the project number and script ID appeared correct, the Marketplace configuration rejected the form because the Apps Script project was not actually bound to the same GCP project the user believed it was.
Root Cause
The failure occurred because the Apps Script Project Script ID was not associated with the GCP project selected in the Marketplace SDK configuration. This typically happens when:
- The Apps Script project was created before enabling the Google Cloud Project linkage.
- The script is still using a default (implicit) GCP project, not the standalone GCP project the user configured.
- The Marketplace SDK expects a bound GCP project, but the script is still mapped to a different internal project.
- The script version referenced in the Marketplace form does not exist or was never deployed.
Why This Happens in Real Systems
This class of issue is common because:
- Apps Script auto‑creates hidden GCP projects unless explicitly overridden.
- Developers assume that matching project numbers in the console means the linkage is correct.
- The Marketplace SDK performs strict validation and rejects any mismatch.
- GCP and Apps Script have separate identity layers (project number, project ID, script ID, deployment ID), which can easily become unsynchronized.
Real-World Impact
When this mismatch occurs, teams experience:
- Inability to publish or update Workspace Add‑ons
- Blocked Marketplace submissions
- Confusing errors that imply the Script ID is wrong even when it is correct
- Time lost debugging the wrong layer (Apps Script vs. GCP)
Example or Code (if necessary and relevant)
Below is an example of how developers verify the Apps Script project is bound to the correct GCP project using clasp:
clasp open
clasp setting projectId
clasp push
This ensures the script is explicitly linked to the intended GCP project.
How Senior Engineers Fix It
Experienced engineers resolve this by validating the entire chain of identifiers:
- Check the Apps Script Project Settings → Confirm the script is using a standard (not default) GCP project.
- Rebind the script to the correct GCP project using the Apps Script dashboard or clasp.
- Create a new script version and ensure it appears in the Marketplace SDK dropdown.
- Verify OAuth consent screen is configured in the same GCP project.
- Ensure Marketplace SDK is enabled only in the correct project.
- If corruption or mis‑binding persists, create a fresh GCP project and re‑link the script to eliminate hidden defaults.
Why Juniors Miss It
Less experienced developers often overlook this because:
- They assume Script ID = GCP project linkage, which is not true.
- They do not realize Apps Script silently creates default GCP projects.
- They expect the Marketplace SDK to auto‑detect the correct script version.
- They are unfamiliar with the difference between project number, project ID, script ID, and deployment ID.
- The error message is misleading and suggests the Script ID is wrong rather than the project binding.
If you want, I can also generate a troubleshooting checklist or a diagram showing how Apps Script and GCP projects connect.