Salesforce scratch org creation timed out in CI
Scratch org provisioning is asynchronous. The CLI polls until the org is ready or the --wait window ends. A timeout means provisioning was still in progress (or the signup was slow), not necessarily that it failed.
What this error means
Scratch org creation ends with a timeout message saying the command stopped waiting for the org to be created within the wait period.
Error (1): The scratch org did not complete within your wait time of 6 minutes. Try again with a longer wait time.Common causes
Provisioning took longer than the wait window
Signup load or a complex scratch definition can push provisioning past the default --wait, so the CLI gives up waiting.
A slow or busy signup service
Transient signup-side slowness extends provisioning time beyond a short wait.
How to fix it
Increase the wait time
- Raise
--waitso the CLI polls long enough for provisioning to finish. - If it still times out, check
sf org listto see if the org actually came up. - Retry creation if the org never appeared.
sf org create scratch \
--definition-file config/project-scratch-def.json \
--alias ci-scratch --wait 20 --duration-days 1Reconcile orgs that finished after the timeout
An org can finish provisioning right after the CLI stops waiting. List scratch orgs and reuse or delete the late one instead of creating another.
sf org list --allHow to prevent it
- Use a generous
--waitfor scratch org creation in CI. - Keep scratch definitions lean so provisioning is fast.
- Reconcile late-provisioned orgs to avoid leaking active orgs.