-
Notifications
You must be signed in to change notification settings - Fork 82
Description
Summary
I've used SF CLI to create and refresh sandboxes in my CI/CD pipeline successfully. Something broke down around 2 weeks ago. Create/refresh progress started freezing at the last step - Authenticating.
Steps To Reproduce
- Refresh an existing developer sandbox using:
sf org refresh sandbox --definition-file developer-sandbox-def.json --target-org prodOrgAlias --wait 600 --no-prompt. developer-sandbox-def.json is as follows:
{ "sandboxName": "sbxName" }
- Notice that the
Refreshing orgstage finishes andAuthenticatingkeeps running forever.
Expected result
I'd expect that the Authenticating... stage finishes quickly and my pipeline gets authenticated to the new org. It was the case in the past.
Actual result
The Authenticating... stage keeps running for a few hours until my pipeline times out.
Running sf org resume sandbox --job-id 0GRW60000000YT7OAM -o prodOrgAlias lists the entire progress but it still doesn't authenticate to the org.
Additional information
I think I haven't changed anything in my pipeline recently so I'd suspect that something broke down due to Summer '25 release or because we enabled API Access Control - link in prod org. I'm not sure how API Access Control would block the Authorization stage?
Here's a full log from my CI/CD pipeline that should have refreshed a dev sandbox. I cut some Refreshing org... lines and replaced with ellipsis.
$ sf org refresh sandbox --definition-file developer-sandbox-def.json --target-org prodOrgAlias --wait 600 --no-prompt
───── Sandbox Refresh ─────
Stages:
1. Creating new sandbox
2. Refreshing org
3. Authenticating
◯ Creating new sandbox - Skipped
▶ Refreshing org…
Copy progress: 0%
Status: Pending
Status: Processing
Copy progress: 5%
Copy progress: 9%
▶ Refreshing org…
Copy progress: 10%
Copy progress: 11%
▶ Refreshing org…
Copy progress: 12%
Copy progress: 14%
▶ Refreshing org…
...
▶ Refreshing org…
Copy progress: 16%
Copy progress: 24%
Copy progress: 25%
▶ Refreshing org…
...
▶ Refreshing org…
Copy progress: 26%
▶ Refreshing org…
...
▶ Refreshing org…
Copy progress: 27%
▶ Refreshing org…
...
▶ Refreshing org…
Copy progress: 28%
Copy progress: 47%
▶ Refreshing org…
Copy progress: 54%
▶ Refreshing org…
Copy progress: 55%
▶ Refreshing org…
...
▶ Refreshing org…
Copy progress: 56%
▶ Refreshing org…
Copy progress: 58%
...
Copy progress: 71%
▶ Refreshing org…
...
▶ Refreshing org…
Copy progress: 86%
Copy progress: 94%
▶ Refreshing org…
...
▶ Refreshing org…
Copy progress: 95%
Status: Activating
▶ Refreshing org…
...
▶ Refreshing org…
✔ Refreshing org (5h 42m)
▶ Authenticating…
Status: Completed
Copy progress: 100%
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
▶ Authenticating…
✔ Authenticating (4h 18m)
Status: Completed
Copy progress: 100%
Elapsed time: 10h 0m
Warning: The wait time for the sandbox refresh has been exhausted. See the results below for more information.
Run "sf org resume sandbox --job-id 0GRW60000000YT7OAM -o [MASKED]" to check for status.
If the org is ready, checking the status also authorizes the org for use with Salesforce CLI.
Next, I run another pipeline that invokes sf org resume and sf org list to see if the org has been authenticated:
$ sf org resume sandbox --job-id 0GRW60000000YT7OAM -o $ORG_ALIAS || true
Warning: Could not find a cache entry for 0GRW60000000YT7OAM.
If you are resuming a sandbox operation from a different machine note that we cannot set the alias/set-default flag values as those are saved locally.
───── Resume Sandbox ─────
Stages:
1. Creating new sandbox
2. Refreshing org
3. Authenticating
▶ Creating new sandbox…
Copy progress: 0%
Name: sbxName
ID: 0GRW60000000YT7OAM
Status: Completed
✔ Creating new sandbox (395ms)
Copy progress: 100%
✔ Refreshing org (0ms)
▶ Authenticating…
▶ Authenticating (244ms)
Status: Completed
Copy progress: 100%
Elapsed time: 641ms
Run "sf org resume sandbox --job-id 0GRW60000000YT7OAM -o [MASKED]" to check for status.
If the org is ready, checking the status also authorizes the org for use with Salesforce CLI.
$ sf org list
Type Alias Username Org Id Status
---------------------------------------------------------------------------------
🍁 DevHub production [MASKED] 00D1i000000xxxxxx Connected
Legend: 🌳=Default DevHub, 🍁=Default Org Use --all to see expired and deleted scratch orgs
System Information
I'm using Bash.
$ sf version --verbose --json
{
"architecture": "linux-x64",
"cliVersion": "@salesforce/cli/2.94.6",
"nodeVersion": "node-v22.16.0",
"osVersion": "Linux 6.8.0-1021-aws",
"rootPath": "/usr/local/lib/nodejs/lib/node_modules/@salesforce/cli",
"shell": "bash",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.30 (core)",
"@oclif/plugin-commands 4.1.26 (core)",
"@oclif/plugin-help 6.2.29 (core)",
"@oclif/plugin-not-found 3.2.57 (core)",
"@oclif/plugin-plugins 5.4.41 (core)",
"@oclif/plugin-search 1.2.25 (core)",
"@oclif/plugin-update 4.6.43 (core)",
"@oclif/plugin-version 2.2.30 (core)",
"@oclif/plugin-warn-if-update-available 3.1.41 (core)",
"@oclif/plugin-which 3.2.36 (core)",
"@salesforce/cli 2.94.6 (core)",
"agent 1.23.0 (core)",
"apex 3.6.19 (core)",
"api 1.3.3 (core)",
"auth 3.7.2 (core)",
"data 4.0.39 (core)",
"deploy-retrieve 3.22.26 (core)",
"info 3.4.67 (core)",
"limits 3.3.57 (core)",
"marketplace 1.3.8 (core)",
"org 5.8.3 (core)",
"packaging 2.16.0 (core)",
"schema 3.3.68 (core)",
"settings 2.4.32 (core)",
"sobject 1.4.61 (core)",
"telemetry 3.6.45 (core)",
"templates 56.3.51 (core)",
"trust 3.7.99 (core)",
"user 3.6.26 (core)",
"@salesforce/sfdx-scanner 4.12.0 (user) published 58 days ago (Tue Apr 29 2025)",
"sfdx-git-delta 6.14.0 (user) published 0 days ago (Thu Jun 26 2025)"
]
}Thanks in advance, because I'm running out of ideas.