clasp icon indicating copy to clipboard operation
clasp copied to clipboard

`clasp run` instructions for authentication could use reworking

Open leeyspaul opened this issue 5 years ago • 3 comments

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

Expected Behavior

When running clasp run without the proper scopes we need to set the scopes required. I would expect the instructions to either link to documentation in setting the scopes explicitly.

Actual Behavior

Currently in the output when scopes are not set correctly we get the following (after running a clasp helloWorld:

$ clasp run helloWorld
(node:61428) ExperimentalWarning: The fs.promises API is experimental
Running in dev mode.
Hey! It looks like you aren't authenticated for the scopes required by this script.
Please enter the scopes by doing the following:
1. Open Your Script: ...
2. File > Project Properties > Scopes
3. Copy/Paste the list of scopes here:
            ~ Example ~
https://mail.google.com/
https://www.googleapis.com/auth/presentations
----(When you're done, press <Enter> 2x)----

This led me to going to File > Project Properties > Scopes expecting me to set them there but instead we actually need to explicitly set them in the manifest file in appsscript.json. As mentioned in the docs here.

Screen Shot 2020-07-22 at 5 03 17 PM

Steps to Reproduce the Problem

  1. Run a script function without proper scopes set (any new project) e.g. clasp helloWorld

Specifications

  • Node version (node -v): v10.13.0
  • Version (clasp -v): 2.3.0
  • OS (Mac/Linux/Windows): Mac

leeyspaul avatar Jul 23 '20 00:07 leeyspaul

Is this strictly a documentation issue? Can anyone volunteer for a PR?

PopGoesTheWza avatar Mar 19 '21 21:03 PopGoesTheWza

I'm noticing the same behavior

e-dong avatar Jan 01 '22 17:01 e-dong

Bump. Same.

adamcee avatar Jun 03 '23 21:06 adamcee