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

sfdx force:org:display is incorrectly showing a sandbox as a scratch org #1667

Closed
azlam-abdulsalam opened this issue Aug 15, 2022 · 6 comments
Labels
investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer stale

Comments

@azlam-abdulsalam
Copy link

Summary

Running sfdx force:org:display against a particular sandbox is displaying additional details, which should only be displayed for scratch orgs. This is resulting in some plugins such as sfdmu (https://github.com/forcedotcom/SFDX-Data-Move-Utility) preventing to connect to this org due to the 'Deleted' Connection status. I am only seeing this across only one of our sandboxes

I checked the username.json file in .sfdx folder and it is incorrectly having "devHubUsername" key, this inturn is causing the org display command to classify this sandbox in the scratch org group and show expiry details etc.

=== Org Description

 KEY             VALUE                                                                                                            
 ─────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
 Access Token    XXXX
 Alias           staging                                                                                                
 Client Id       PlatformCLI                                                                                                      
 Created By      integrationuser@<undisclosed>                                                                               
 Created Date    2021-04-09T18:19:32.000+0000                                                                                     
 Dev Hub Id      aabdulsalam@<undisclosed>                                                                                       
 Edition         Enterprise                                                                                                       
 Expiration Date 2021-04-11                                                                                                       
 Id              00D2O000000AjLkUAK                                                                                               
 Instance Url    https://<undisclosed>--staging.my.salesforce.com                                                                          
 Org Name        <undisclosed> Limited                                                                                                     
 Status          Deleted                                                                                                          
 Username        aabdulsalam@<undisclosed>.com.au.staging      

Steps To Reproduce:

Expected result

Should display the org with Expiration Date and the status should be connected

 KEY              VALUE                                                                                                            
 ──────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
 Access Token     XXX 
 Alias            staging                                                                                                   
 Client Id        PlatformCLI                                                                                                      
 Connected Status Connected                                                                                                        
 Id               00D2O000000AjLkUAK                                                                                               
 Instance Url     https://<undisclosed>--staging.my.salesforce.com                                                                          
 Username         aabdulsalam@<undisclosed>.com.au.staging

I went into .sfdx folder and removed the key 'devhubUserName' from the associated json file. The result was back to normal. Looks like somehow the auth fields are receiving devhubUserName flag

Actual result

Describe what actually happened.

System Information

  • Which shell/terminal are you using? (e.g. bash, zsh, powershell 5, powershell 7, cmd.exe, etc.) zsh
    Version Info
{
  "cliVersion": "sfdx-cli/7.163.0",
  "architecture": "darwin-x64",
  "nodeVersion": "node-v18.2.0",
  "pluginVersions": [
    "@dxatscale/sfpowerscripts 18.9.0 (link) /Users/azlam.abdulsalam/projects/sfpowerscripts/packages/sfpowerscripts-cli",
    "@jayree/sfdx-plugin-prettier 1.1.0 (user)",
    "@oclif/plugin-autocomplete 1.3.0 (core)",
    "@oclif/plugin-commands 2.2.0 (core)",
    "@oclif/plugin-help 5.1.12 (core)",
    "@oclif/plugin-not-found 2.3.1 (core)",
    "@oclif/plugin-plugins 2.1.0 (core)",
    "@oclif/plugin-update 3.0.0 (core)",
    "@oclif/plugin-version 1.1.1 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.4 (core)",
    "@oclif/plugin-which 2.1.0 (core)",
    "@rocko1204/packaging-helper 0.1.1 (user)",
    "alias 2.1.0 (core)",
    "apex 1.1.0 (core)",
    "auth 2.2.3 (core)",
    "community 2.0.0 (core)",
    "config 1.4.17 (core)",
    "custom-metadata 2.0.0 (core)",
    "data 2.1.1 (core)",
    "generator 2.0.2 (core)",
    "info 2.0.1 (core)",
    "limits 2.0.1 (core)",
    "org 2.0.7 (core)",
    "schema 2.1.1 (core)",
    "signups 1.2.0 (core)",
    "source 2.0.11 (core)",
    "telemetry 2.0.0 (core)",
    "templates 55.1.0 (core)",
    "trust 2.0.3 (core)",
    "user 2.1.0 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.0.0 (core)",
    "apexlink 2.3.2 (user)",
    "salesforce-alm 54.7.1 (core)",
    "sfdmu 4.15.1 (user)",
    "sfdx-browserforce-plugin 2.6.3 (user)",
    "sfdx-hardis 2.90.0 (user)",
    "sfdx-jayree 4.0.3 (user)",
    "sfpowerkit 4.2.10 (link) /Users/azlam.abdulsalam/projects/sfpowerkit",
    "texei-sfdx-plugin 1.11.0 (user)"
  ],
  "osVersion": "Darwin 21.6.0"
}

Additional information

Feel free to attach a screenshot.

@azlam-abdulsalam azlam-abdulsalam added the investigating We're actively investigating this issue label Aug 15, 2022
@github-actions
Copy link

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.

@mdonnalley
Copy link
Contributor

@azlam-abdulsalam thanks for filing the issue. Are you able to provide steps to reproduce the problem?

@mdonnalley mdonnalley added the more information required Issue requires more information or a response from the customer label Aug 16, 2022
@azlam-abdulsalam
Copy link
Author

@mdonnalley This happens only on one particular sandbox. So I am not sure about the reproduction steps.

That being said, I figured this only happens if the devhub is authenticated before authenticating to the sandbox. If the sandbox is authenticated before production, the error disappears

@github-actions
Copy link

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

@github-actions github-actions bot added the stale label Sep 30, 2022
@cristiand391
Copy link
Member

cristiand391 commented Sep 30, 2022

Hey @azlam-abdulsalam sorry for the late reply

I'm not able to repro this with sfdx-cli/7.170.0 , what command are you using to authenticate to that sbx? It might be related to this bug:
#1718 (comment)

@github-actions
Copy link

github-actions bot commented Oct 8, 2022

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer stale
Projects
None yet
Development

No branches or pull requests

3 participants