Skip to main content

Monday, after returning from a week of PTO, when attempting to create a "dev" scratch org I was initially getting some weird errors complaining about its inability to access the dev scratch org.  The "cci org list" showed no "dev" org, but it was throwing messages like it believed there was one.  After an attempt to create a "dev" scratch org, another run of cci org list showed a dev org that was 14 out of 30 days old, but moments earlier there was no Dev org in the “cci org list” results.  

 

Within one of the error messages I received, there was a suggestion to run "cci org remove dev".  After running that, I was able to successfully create, open, and use the scratch org.  

 

Tuesday and ever since, when I try to open that org using “cci org browser –org dev”, I'm getting error: "No information for scratch org with ID 00D22000000EQgJ found in Dev Hub shannon@companyemail.com."

 

“cci org list” shows the org, with the appropriate number of days.

                                                                                                                                                                             

One of the lines of the error says, "First check that you can access your Dev Hub. Then check that the ScratchOrgInfo standard object in your Dev Hub contains a record for your scratch org. In Setup, navigate to the Dev Hub page and click the Scratch Org Infos tab. If you find your scratch org, try again."

 

I can access our Dev Hub.  I can see a scratch record in the dev hub relating to this scratch org, including the correct org ID "00D22000000EQgJ".  But I can't access the org via "cci org browser dev"

 

I've invoked the following commands in an effort to ensure proper connection with Dev Hub.  

cci service connect devhub --project" 

 

sfdx config:set defaultusername=shannon@companyemail.com defaultdevhubusername=shannon@companyemail.com

 

I have also regenerated my GitHub personal access token and have applied it via “cci service connect github”. 

 

Still, after those efforts, I cannot access the scratch org via “cci org browser --org dev”, nor can I create a new scratch org.

 

Attempts to create a new scratch org lead to the following error: “ERROR running force:org:create:  Error authenticating with the refresh token due to: expired access/refresh token”  

 

One interesting note about this, the details when running “cci flow run dev_org --org qa” show different email addresses for Target Dev Hub User and Admin Email.  Admin Email is a personal email address associated with a dev hub once used for Trailhead exercises, whereas Target Dev Hub User relates to my companies Dev Hub username.

 

C:\Users\Shannon\.local\bin\cci flow run dev_org --org qa

[07/14/22 10:18:57] Fetching from GitHub: SalesforceFoundation/NPSP @ 89aeb86f00f5725102a3606e9f3a190a5f493c33

[07/14/22 10:20:15] ============================================================

Initializing flow: FlowCoordinator (dev_org)

[07/14/22 10:20:16] Set up an org as a development environment for unmanaged metadata

============================================================

Verifying and refreshing credentials for the specified org: qa.

Creating scratch org with command: sfdx force:org:create -f orgs/dev.json -w 120 --targetdevhubusername shannon@companyemail.com -n

--durationdays 7 -a Fund-360__qa adminEmail=shannon@personalemail.com

Error: Failed to create scratch org:

ERROR running force:org:create: Error authenticating with the refresh token due to: expired access/refresh token

Do I have a connection with a Trailhead Dev Hub org interfering with my companies Dev Hub?  How might I sort that out?

5 Antworten
  1. 14. Juli 2022, 18:17

    Hi, Shannon. Can you create scratch orgs directly with SFDX? We've seen similar reports recently based on a new version of SFDX, which have been resolved by rolling the version back. 

0/9000