-
Notifications
You must be signed in to change notification settings - Fork 78
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
sfdx force:org:display throws error when defaultusername is set to an expired org #724
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
This should be fixed in the new open-source version. You can try it early, here: #835 |
@mshanemc I will try it tomorrow. I have an expired SO that I did not delete that I can use to test it. Thanks again. |
For anyone else wanting to test this issue, one option is to create a
sandbox, auth tot it, then delete the sandbox **from the UI** so that your
CLI doesn't know it's deleted.
Then wait a day or so until the sandbox is really gone and there's no DNS
record for it and you'll see the error on the current CLI and not on the
plugin-org
…On Mon, Feb 8, 2021 at 2:31 PM Allan Oricil ***@***.***> wrote:
@mshanemc <https://github.com/mshanemc> I will try it tomorrow. I have an
expired SO that I did not delete that I can use to test it. Thanks again.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#724 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABAQPHCFCR3FNZAO2J6RXJLS6BCYRANCNFSM4TLGHZTA>
.
|
Summary
I ran
sfdx force:org:display
with a defaultorg that was selected as defaultusername for my vscode project and I got this error that it is not treated.Then I ran
sfdx force:org:list
to see if the org was still valid, and it wasn't.I concluded that this error happens if you have an expired org selected as your defaultusername when running
sfdx force:org:display
.Basically this happened because yesterday I created an SO that I discovered it was expired today when I opened my vscode. When I opeed VSCode this org was still selected as default (defaultusername) on sfdx. So there are two small enhancements we can do, one is to treat the error message on sfdx to show to the user that the org is already expired, and the other is to check if the org status before showing the button on the VSCode Status Bar (the one that shows the local defaultusername), or if the org was expired change the state of the button as shown below by running
sfdx force:org:config defaultusername=
, because that button is listening to changes on the file.sfdx/sfdx_config.json
, so If I change sfdx defaultusername then the button changes too. We could also make sfdx set defaultusername to null automatically when the org becomes expired.Steps To Reproduce:
sfdx force:org:display
using that defaultusername and you will see the non treated error message.OBS: This will most likely happen when the user open vscode in the next day and the SO is already expired. The user will only notice it after he run display command or list command.
Expected result
sfdx force:org:display
should display an error message saying that the current selected org is expired.Actual result
sfdx force:org:display
is showing a non treated error message when it runs with a expired scratch org set asdefaultusername
Additional information
Feel free to attach a screenshot.
SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
OS and version: Windows 10
The text was updated successfully, but these errors were encountered: