Yesterday, my Travis CI builds started to fail on a scratch org creation step:
$ sfdx force:auth:jwt:grant --clientid $CONSUMERKEY --jwtkeyfile server.key --username $USERNAME --setdefaultdevhubusername -a HubOrg
Successfully authorized [secure] with org ID 00D6A000001jFciUAE
$ sfdx force:org:create -v HubOrg -s -f config/project-scratch-def.json -a ciorg
ERROR: Socket timeout occurred while listening for results.
At the same time I can successfully create the scratch org from my local machine using the same commands. Was there any kind of security update of Salesforce platform? Is it possible to debug this kind of issue?
UPD: it seems that the scratch org is actually created (at least it appears inside DebHub's 'Scratch Org Infos' tab) but still unavailable to the sfdx commands. If I add --json
option, I can see more details though it doesn't become any clearer
{"message":"Socket timeout occurred while listening for results.","status":1,"stack":"genericTimeoutMessage: Socket timeout occurred while listening for results.\n at ALMError (/home/travis/.local/share/sfdx/client/node_modules/salesforce-alm/dist/lib/almError.js:35:19)\n at OrgCreateCommand._streamingCallback (/home/travis/.local/share/sfdx/client/node_modules/salesforce-alm/dist/lib/scratchOrgCreateCommand.js:155:31)\n at asyncStatusClient.subscribe (/home/travis/.local/share/sfdx/client/node_modules/salesforce-alm/dist/lib/scratchOrgCreateCommand.js:203:81)\n at Timeout.timeout.setTimeout (/home/travis/.local/share/sfdx/client/node_modules/salesforce-alm/dist/lib/status.js:126:17)\n at ontimeout (timers.js:475:11)\n at tryOnTimeout (timers.js:310:5)\n at Timer.listOnTimeout (timers.js:270:5)","name":"genericTimeoutMessage","warnings":[],"action":"Use command \"sfdx force:data:soql:query -q \"SELECT Status FROM ScratchOrgInfo WHERE Id='2SR6A000000GnLQWA0'\"\" to retry. You may consider increasing --wait parameter value to increase timeout."}
Executing sfdx force:org:list --all
after creation attempt shows only DevHub