-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"clasp log" incorrectly reports 'The projectId "x" looks incorrect' #813
Comments
@mgrazebrook can you suggest what the RegEx should be? |
I'm sure you know the format of project IDs better than I. However the first thing that strikes me is the regex requires [a-z] as the starting character but my ID starts with a digit. However (as noted in my description) either I'm looking for the wrong ID or the terminology (the message asks for a projectID, whereas there's no such thing in the properties), so the other possibility is that I don't know how to find the right ID and if so, perhaps the documentation could be clearer. |
Looks like you're providing a script ID, not the project ID. The command needs the project ID of the underlying GCP project in order to read the logs. While this is part of the script metadata, it's not (yet) exposed in the management API. Will update readme to be a little clearer, but no need to update the regex right now. |
Any update on this issue? |
No updates? Still not working |
The ProjectID is the one from the associated Google Cloud Project, not the numeric one - try changing it in .clasp.json and check if it works. Hope this helps! @marcelogaio-groovinads |
I am having this very same problem. I am a contractor within Google myself, using an internal ProjectID and receiving this error. I cloned the clasp code, extracted the regex as coded: I really don't have the time to fork, modify the regex to suit my needs, then deploy locally. Please can this get what should be a really quick update? Thanks in advance |
Expected Behavior
The project ID is valid. I'm a newb so I don't know what 'clasp logs' should do.
Actual Behavior
Steps to Reproduce the Problem
$ clasp logs
Specifications
node -v
): v15.0.1clasp -v
): 2.3.0Further information:
I imagine it's failing here since the ID won't match the regular expression:
clasp/src/utils.ts:227
export const isValidProjectId = (value: string) => /^[a-z][-\da-z]{5,29}$/.test(value);
My project is an Apps Script Community Connector. I'm able to push and pull. Project Properties gives no "project ID" as such, the value clasp logs quotes is the "Script ID". There is also a "Project key" but it wouldn't match this regular expression either.
To get here, I started following the Clasp Codelab but pulled my community connector instead.
The text was updated successfully, but these errors were encountered: