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

make org delete scratch handle expired orgs #2045

Closed
mshanemc opened this issue Apr 7, 2023 — with Slack · 4 comments
Closed

make org delete scratch handle expired orgs #2045

mshanemc opened this issue Apr 7, 2023 — with Slack · 4 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

Copy link
Contributor

mshanemc commented Apr 7, 2023

If I have a scratch org that expires, why is it an error if I execute org delete scratch?

If I execute sfdx org delete scratch , I get the following error:
Error (1): Attempting to delete an expired or deleted org
If I execute sf org delete scratch , then I get the following error:

        No authorization information found for <mailto:[email protected]|[email protected]>.
See more help with --help```
The old behavior is that it would simply clean up the reference and move on.

And that behavior seems inconsistent with what happens when you execute `sf org list --all --clean` which does simply clean up the reference to the expired scratch org.

[Slack Message](https://salesforce-external.slack.com/archives/C02R1NEG2G3/p1680867956695259?thread_ts=1680867956.695259&cid=C02R1NEG2G3)
@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label Apr 7, 2023 — with Slack
@git2gus
Copy link

git2gus bot commented Apr 7, 2023

This issue has been linked to a new work item: W-12992139

@Julian88Tex
Copy link

Not sure if this is the same or a different issue. I'm getting a different error now on version @salesforce/cli/1.70.0 darwin-x64 node-v18.14.2

Error (1): Parsing --target-org 
        The org cannot be found
See more help with --help

Try this:

Verify that the org still exists',
If your org is newly created, wait a minute and run your command again',
If you deployed or updated the org's My Domain, logout from the CLI and authenticate again",
If you are running in a CI environment with a DNS that blocks external IPs, try setting SFDX_DISABLE_DNS_CHECK=true'

@WillieRuemmele
Copy link
Member

Hey @Julian88Tex - I believe this should've been fixed in 2.6.10 of plugin-org, which is part of the latest-rc version of sf, @salesforce/cli/1.74.7 darwin-arm64 node-v18.7.0

@Julian88Tex
Copy link

Julian88Tex commented Apr 18, 2023

@WillieRuemmele thanks! For some reason sf update seemed to think I was updated but I wasn't. Uninstall and reinstall did the trick.

Was able to git rid of all orgs with connection status DomainNotFoundError but having issues with no connected status or RefreshTokenAuthError orgs.

Errors I receive:

For RefreshTokenAuthError attempt to sf org delete scratch -o <alias>

Error (1): Unable to associate this scratch org with a DevHub.

For RefreshTokenAuthError attempt to sf org delete scratch -o <username>

Error (1): The Dev Hub org cannot be deleted.

For empty connected status attempt to sf org delete scratch -o <alias>

Error (1): Attempting to delete an expired or deleted org

For empty connected status attempt to sf org delete scratch -o <alias>

Error (1): No authorization information found for [email protected].

Also tried using sandbox instead with each command and now luck.

sf org list --clean doesn't hide any of these orgs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug
Projects
None yet
Development

No branches or pull requests

3 participants