clasp icon indicating copy to clipboard operation
clasp copied to clipboard

Clasp create --parentId <ID> errors out

Open rsisnett-sd opened this issue 1 year ago • 2 comments

(Note: Non-breaking issues are likely not to be prioritized. Please consider a PR in addition to your issue)

Expected Behavior

A project would be created using the provided ID as the parent. The ID is from a Google Spreadsheet

Actual Behavior

The program errors out and spits out the following message: Request contains an invalid argument

Steps to Reproduce the Problem

  1. Create a spreadsheet and copy the ID
  2. Call claps create --parentID <ID from the previous step>

Specifications

  • Node version (node -v): v22.5.1
  • Version (clasp -v): 2.4.2
  • OS (Mac/Linux/Windows): Mac

rsisnett-sd avatar Sep 16 '24 16:09 rsisnett-sd

Looks like may be an issue with the Apps Script API itself, getting a "Requested entity not found" issue from the underlying API when trying to create a container bound script. Works if creating the container (the --type option) so think this may be a change in how drive files are accessed and which scopes are required (but if there was a change, it's not yet documented, so considering it a bug.)

sqrrrl avatar Mar 11 '25 15:03 sqrrrl

This may be related to new documents -- files that have been created, but not yet modified in any way (default title/content). These are in a weird state and API fails with them. If same issue, giving the doc a title or any thing to trigger an explicit save should resolve it. There's a feature request filed to have the API do this automatically, but in the mean time try that workaround

sqrrrl avatar May 30 '25 17:05 sqrrrl