Skip to content
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 push disables all 'Advanced Google Services' #171

Closed
msmialow opened this issue May 16, 2018 · 3 comments
Closed

clasp push disables all 'Advanced Google Services' #171

msmialow opened this issue May 16, 2018 · 3 comments

Comments

@msmialow
Copy link

Expected Behavior

clasp push has no effect of the on/off state of Advanced Google Services.

Actual Behavior

clasp push turns all enabled advanced services to 'off'.

Steps to Reproduce the Problem

1.Enable any Advanced Google Service in script
2.clasp push changes to script
3.Advanced Services are all turned off

Specifications

  • Node version (node -v) - 9.9.0
  • Version (npm list -g | grep clasp) - 1.1.5
  • OS (Mac/Linux/Windows) - Linux Mint 18.3 - 4.15.0-20-generic

Notes

This is a super annoying bug as every single change pushed to the script using clasp requires you to go into the Advanced Google Services and re-enable the one(s) that you are using before you can run related code. Not sure if this is something related to my specific environment or if it impacts others. I originally noticed this using the Admin Directory API, but further testing shows that it disables anything that is turned on, so I doubt it is a factor.

clasp-push-bug

@grant
Copy link
Contributor

grant commented May 16, 2018

Thanks for the gif.
If you modify the project in the online editor, you must clasp pull to update your local environment.
clasp push overrides the content in the online editor.

View > Show manifest file to see your Advanced Services like this:

{
  "timeZone": "America/Los_Angeles",
  "dependencies": {
    "enabledAdvancedServices": [{
      "userSymbol": "AdminDirectory",
      "serviceId": "admin",
      "version": "directory_v1"
    }, {
      "userSymbol": "AdminReports",
      "serviceId": "admin",
      "version": "reports_v1"
    }, {
      "userSymbol": "AndroidBuildInternal",
      "serviceId": "androidbuildinternal",
      "version": "v2beta1"
    }, {
      "userSymbol": "AdSense",
      "serviceId": "adsense",
      "version": "v1.4"
    }, {
      "userSymbol": "AppsAssistant",
      "serviceId": "appsassistant-pa",
      "version": "v1"
    }]
  },
  "exceptionLogging": "STACKDRIVER"
}

Are things still broken if you clasp pull first?

@msmialow
Copy link
Author

Thanks. User error on my part

It works properly when pulling first. I didn't realise that Advanced Services were in scope for clasp. After pull, I now see dependencies in appsscript.json and pushing changes no longer resets services.

Makes sense in retrospect. Perhaps it would be helpful to document which changes in the online editor are included in the manifest and would thus require a pull?

Thanks for the speedy reply BTW.

@grant
Copy link
Contributor

grant commented May 16, 2018

Yeah, it's not at all intuitive. I think the manifest file should not be hidden from the script.google.com UI.

Pulling before pushing is usually a good habit like with git. Maybe we can add a note somewhere about manifests. PRs/issues welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants