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

Can't delete versions #224

Open
marcosscriven opened this issue Jun 20, 2018 · 17 comments
Open

Can't delete versions #224

marcosscriven opened this issue Jun 20, 2018 · 17 comments
Labels
API support needed A lack of a Google API feature blocks this issue

Comments

@marcosscriven
Copy link

marcosscriven commented Jun 20, 2018

Expected Behavior

Can delete versions

Actual Behavior

Get an error saying "You cannot delete this version because it is used by a label”

screen shot 2018-06-20 at 13 29 50

Found this issue in Stackoverflow, but there's no answer.

There's also no mention on this error in the documentation.

Steps to Reproduce the Problem

  1. clasp version "New version"
  2. clasp open
  3. File->Manage versions
  4. Delete version
@grant grant added the API support needed A lack of a Google API feature blocks this issue label Jun 20, 2018
@grant
Copy link
Contributor

grant commented Jun 20, 2018

@marcosscriven
Copy link
Author

Thanks @grant - the issue was I couldn’t seem to delete it in the UI either. There doesn’t seem to be any explanation as to what a label is in this context, but I’m guess it’s a description?

@grant
Copy link
Contributor

grant commented Jun 20, 2018

I've just verified the UI instructions work. Press the "X" next to a version ID.

@marcosscriven
Copy link
Author

marcosscriven commented Jun 20, 2018

@grant for some of them it does - not all. Some must have some link to something called a 'label'. Those ones I've never been able to delete.

Looking at the response in Chrome console network tab to the XHR POST shows the same message:

//EX[2, 0, -1, 1, ["i", "You cannot delete this version because it is used by a label."], 1, 7]

This is just a standalone script. Here's a little capture:

error

@grant
Copy link
Contributor

grant commented Jun 20, 2018

Can you take a picture and describe the type of script (add-on, standalone, web app)?

@marcosscriven
Copy link
Author

@grant - we crossed posts, have posted further details just prior.

@shai
Copy link

shai commented Jun 22, 2018

@grant I had the same issue, and I'm the one the OP referenced to the post in Stackoverflow with no answer to date. A reply there asked about the type of script, and for me it wasn't standalone but rather a web app. Just FYI.

I'm unclear how this could be related to clasp since this happens in the UI and is obviously something internal to GAS.

@marcosscriven
Copy link
Author

@shai - Agree it's probably a server side issue. I mentioned it here because personally I'd only ever created versions with clasp, and also because since the folks here develop the client, they may well be able to help figure out the error (which I've not seen solved anywhere).

@shai
Copy link

shai commented Jun 22, 2018

@marcosscriven let's cross fingers .. perhaps they would be able to assist in this mystery :)

@shai
Copy link

shai commented Jun 24, 2018

Ok .. I was playing around with issue #63 and after I used clasp deploy twice, I saw the two new deployments in the WEB UI and lo and behold, I was not able to delete them and got this same OP message.

Furthermore, after I used clasp undeploy xxxxxx to try and do just that, clasp said that it undeployed my deployment, but it is still showing in the WEB UI.

Also, trying to undeploy again that same deployment yields Unable to delete read-only deployment.

@russellkt
Copy link

Having the same issue. I was able to delete some using the ui but there are about 10 versions that I am unable to deploy. Using clasp undeploy I get Unable to delete read-only deployment. In the ui, I get You cannot delete this version because it is being used by a label

@grant
Copy link
Contributor

grant commented Aug 17, 2018

Please upvote or comment on this Apps Script bug and I'll let the team know about it so they can fix it:
https://issuetracker.google.com/issues/110285291

Again, this error is not related to clasp, but Apps Script itself.

@nitrocode
Copy link

Same issue. I starred @grant's link. My workaround for now...

clasp push
clasp open

and then manually publish a new version.

@grant grant added this to the Requires API Changes milestone Oct 29, 2018
@Novack
Copy link

Novack commented Jan 11, 2019

Same here. For versions created from clasp deployments, I cannot delete the version, reglardless of having removed all deployments. Working on a webapp.

Hope to not bump into some limit for number of versions, as the number of deployments has.

Also commented on the GAS issuetracker.

@darul75
Copy link

darul75 commented Apr 18, 2019

Would be great to get this feature available to delete some existing versions.

@bostefan
Copy link

I am surprised to find this issue still not solved.
I hoped that I found a workaround : go to Publish => Deploy from manifest... and you would see the clasp-created deployment in the entries. After deleting it successfully, it still did not reflect on the inability to deleted the version connected to it.

@dustinkerstein
Copy link

I think this issue may end up being higher in priority now that Google is enforcing a 200 version limit as 6/1/2024. I seem to have broken our production Apps Script project by trying to undeploy --all (with >200 versions) and now I can't delete those undeployed/archived versions in the Web UI (and can't deploy any new version...) I created a new issue #1015 but it's likely the same underlying issue. I also added some notes to the Google Issue Tracker bug - https://issuetracker.google.com/issues/110285291 - Also see relevant discussion here - https://stackoverflow.com/questions/78392922/how-do-i-delete-old-deployments-versions-in-google-apps-script-when-i-have-ove - Any possible workaround (beyond creating an entirely new Apps Script project) would be greatly appreciated. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API support needed A lack of a Google API feature blocks this issue
Projects
None yet
Development

No branches or pull requests

9 participants