hardisgroupcom / sfdx-hardis

Swiss-army-knife Toolbox for Salesforce. Orchestrates base commands and assist users with interactive wizards to make much more than native sfdx + Allows you to define a complete CI/CD Pipeline and Schedule a daily Metadata backup & monitoring of your orgs
https://sfdx-hardis.cloudity.com
GNU Affero General Public License v3.0
194 stars 35 forks source link

Can't create scratch org pool #560

Closed raphaelbarreiros closed 4 months ago

raphaelbarreiros commented 7 months ago

I tried creating scratch org pools with REDIS and Salesforce as database, but always get the very same errors. Please find the full log:

$ sfdx hardis:scratch:pool:refresh
 ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis][command] sfdx force:org:display --targetusername DevHub_drivemate --json
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis] You are already connected as rbarreiros@forciit.com on org https://forciit.my.salesforce.com
[sfdx-hardis][command] sfdx config:set defaultdevhubusername=rbarreiros@forciit.com --json
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis] Pool config: {"maxScratchOrgsNumber":1,"storageService":"salesforce"}
[sfdx-hardis] SOQL REST: SELECT Id,Name,ValueText__c FROM SfdxHardisKeyValueStore__c WHERE Name='ScratchOrgPool_drivemate' LIMIT 1 on https://forciit.my.salesforce.com
[sfdx-hardis] Creating 1 scratch orgs...
[sfdx-hardis][pool] hardis:scratch:create (0) started
[sfdx-hardis][pool] hardis:scratch:create (0) exited with code 0
Error parsing stdout (0): [sfdx-hardis][command] sfdx force:org:display --targetusername DevHub_drivemate --json
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis] You are already connected as rbarreiros@forciit.com on org https://forciit.my.salesforce.com
[sfdx-hardis][command] sfdx config:set defaultdevhubusername=rbarreiros@forciit.com --json
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis][command] sfdx config:get restDeploy --json
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis][command] sfdx config:set restDeploy=false --global
[sfdx-hardis][command] sfdx force:org:list --json
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis][command] sfdx force:org:create --setdefaultusername --definitionfile ./config/user/project-scratch-def-PO-2xCI-root-ci-cd-setup_20240217_1032.json --setalias PO-2xCI-root-ci-cd-setup_20240217_1032 --wait 15 --targetdevhubusername DevHub_drivemate -d 30 --json
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis][command] sfdx force:user:password:generate --targetusername rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com --json
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis][command] sfdx force:org:display -u PO-2xCI-root-ci-cd-setup_20240217_1032 --verbose --json
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis][command] sfdx force:org:open --urlonly --json
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis][command] sfdx force:data:record:get -s User -w "Username=rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com" -u PO-2xCI-root-ci-cd-setup_20240217_1032 --json
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis] {
  "status": 0,
  "result": [],
  "warnings": [
    "The \"-u\" flag has been deprecated. Use \"--target-org | -o\" instead."
  ]
}
[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.
[sfdx-hardis] Install all packages 0:00:07.040
[sfdx-hardis] Create and initialize scratch org 0:01:04.284
{
  "status": 0,
  "result": {
    "status": 0,
    "scratchOrgAlias": "PO-2xCI-root-ci-cd-setup_20240217_1032",
    "scratchOrgInfo": {
      "username": "rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com",
      "scratchOrgInfo": {
        "attributes": {
          "type": "ScratchOrgInfo",
          "url": "/services/data/v60.0/sobjects/ScratchOrgInfo/2SRP4000000C3yDOAS"
        },
        "Id": "2SRP4000000C3yDOAS",
        "OwnerId": "0057Q000003CVscQAG",
        "IsDeleted": false,
        "Name": "00000041",
        "CreatedDate": "2024-02-17T22:32:11.000+0000",
        "CreatedById": "0057Q000003CVscQAG",
        "LastModifiedDate": "2024-02-17T22:32:26.000+0000",
        "LastModifiedById": "0057Q000003hZRvQAM",
        "SystemModstamp": "2024-02-17T22:32:26.000+0000",
        "LastViewedDate": "2024-02-17T22:32:11.000+0000",
        "LastReferencedDate": "2024-02-17T22:32:11.000+0000",
        "Edition": "Enterprise",
        "Username": "rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com",
        "AdminEmail": "rbarreiros@forciit.com",
        "OrgName": "PO-2xCI-root-ci-cd-setup_20240217_1032",
        "DurationDays": 30,
        "ConnectedAppConsumerKey": "PlatformCLI",
        "ConnectedAppCallbackUrl": "http://localhost:1717/OauthRedirect",
        "Namespace": "DriveMate",
        "Features": "EnableSetPasswordInApi",
        "Snapshot": null,
        "Country": null,
        "Language": "en_US",
        "Instance": null,
        "Package2AncestorIds": null,
        "SourceOrg": null,
        "HasSampleData": false,
        "Release": "Current",
        "SignupUsername": "rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com",
        "Status": "Active",
        "ErrorCode": null,
        "ScratchOrg": "00DQI0000028BWb",
        "SignupInstance": "SWE28S",
        "AuthCode": "aPrxt3maZqIfAabrHXk_EKugXCeyStYeHaPkbQEZhfR4EysMFUihL15uxUrPRZPLr.TVltXPgg==",
        "SignupCountry": "LU",
        "SignupLanguage": "en_US",
        "SignupEmail": "rbarreiros@forciit.com",
        "SignupTrialDays": 30,
        "LoginUrl": "https://platform-inspiration-4018.scratch.my.salesforce.com",
        "Description": null,
        "ExpirationDate": "2024-03-18",
        "LastLoginDate": null,
        "DeletedBy": null,
        "DeletedDate": null
      },
      "authFields": {
        "accessToken": "ACCESS-TOKENHIDDDEN",
        "instanceUrl": "https://platform-inspiration-4018.scratch.my.salesforce.com",
        "orgId": "00DQI0000028BWb2AM",
        "username": "rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com",
        "loginUrl": "https://platform-inspiration-4018.scratch.my.salesforce.com",
        "refreshToken": "REFRESH-TOKENHIDDDEN",
        "clientId": "PlatformCLI",
        "isDevHub": false,
        "namespacePrefix": "DriveMate",
        "devHubUsername": "rbarreiros@forciit.com",
        "created": "1708209131000",
        "expirationDate": "2024-03-18",
        "createdOrgInstance": "SWE28S",
        "isScratch": true,
        "isSandbox": false,
        "instanceApiVersion": "60.0",
        "instanceApiVersionLastRetrieved": "2/17/2024, 10:32:28 PM",
        "tracksSource": true
      },
      "warnings": [],
      "orgId": "00DQI0000028BWb2AM"
    },
    "scratchOrgUsername": "rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com",
    "scratchOrgPassword": "PASSWORD-HIDDDEN",
    "scratchOrgSfdxAuthUrl": "force://PlatformCLI::5Aep861Ug4YpivOGgmupfjKwvbOi2rKZkJREF3gQcrooujby5qpC7B9Kkr0OBmENvcYiNxxBnfP4FRN.25ZuGSH@platform-inspiration-4018.scratch.my.salesforce.com",
    "authFileJson": {
      "status": 0,
      "result": {
        "id": "00DQI0000028BWb2AM",
        "devHubId": "rbarreiros@forciit.com",
        "apiVersion": "60.0",
        "accessToken": "TOKEN-HIDDDEN",
        "instanceUrl": "https://platform-inspiration-4018.scratch.my.salesforce.com",
        "username": "rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com",
        "clientId": "PlatformCLI",
        "password": "PASSWORD-HIDDDEN",
        "status": "Active",
        "expirationDate": "2024-03-18",
        "createdBy": "rbarreiros@forciit.com",
        "edition": "Enterprise",
        "namespace": "DriveMate",
        "orgName": "PO-2xCI-root-ci-cd-setup_20240217_1032",
        "createdDate": "2024-02-17T22:32:11.000+0000",
        "signupUsername": "rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com",
        "sfdxAuthUrl": "force://PlatformCLI::5Aep861Ug4YpivOGgmupfjKwvbOi2rKZkJREF3gQcrooujby5qpC7B9Kkr0OBmENvcYiNxxBnfP4FRN.25ZuGSH@platform-inspiration-4018.scratch.my.salesforce.com",
        "alias": "PO-2xCI-root-ci-cd-setup_20240217_1032"
      },
      "warnings": [
        "The \"-u\" flag has been deprecated. Use \"--target-org | -o\" instead.",
        "This command will expose sensitive information that allows for subsequent activity using your current authenticated session.\nSharing this information is equivalent to logging someone in under the current credential, resulting in unintended access and escalation of privilege.\nFor additional information, please review the authorization section of the https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm."
      ]
    },
    "outputString": "Created and initialized scratch org"
  }
}
[sfdx-hardis] hardis:scratch:create execution time 0:01:18.845
[sfdx-hardis] SOQL REST: SELECT Id,Name,ValueText__c FROM SfdxHardisKeyValueStore__c WHERE Name='ScratchOrgPool_drivemate' LIMIT 1 on https://forciit.my.salesforce.com
[pool] Scratch org creation error: 
{"status":1,"rawLog":"[sfdx-hardis][command] sfdx force:org:display --targetusername DevHub_drivemate --json\n[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.\n\n[sfdx-hardis] You are already connected as rbarreiros@forciit.com on org https://forciit.my.salesforce.com\n[sfdx-hardis][command] sfdx config:set defaultdevhubusername=rbarreiros@forciit.com --json\n[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.\n\n[sfdx-hardis][command] sfdx config:get restDeploy --json\n[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.\n\n[sfdx-hardis][command] sfdx config:set restDeploy=false --global\n[sfdx-hardis][command] sfdx force:org:list --json\n[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.\n\n[sfdx-hardis][command] sfdx force:org:create --setdefaultusername --definitionfile ./config/user/project-scratch-def-PO-2xCI-root-ci-cd-setup_20240217_1032.json --setalias PO-2xCI-root-ci-cd-setup_20240217_1032 --wait 15 --targetdevhubusername DevHub_drivemate -d 30 --json\n[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.\n\n[sfdx-hardis][command] sfdx force:user:password:generate --targetusername rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com --json\n[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.\n\n[sfdx-hardis][command] sfdx force:org:display -u PO-2xCI-root-ci-cd-setup_20240217_1032 --verbose --json\n[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.\n\n[sfdx-hardis][command] sfdx force:org:open --urlonly --json\n[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.\n\n[sfdx-hardis][command] sfdx force:data:record:get -s User -w \"Username=rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com\" -u PO-2xCI-root-ci-cd-setup_20240217_1032 --json\n[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.\n\n[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.\n\n[sfdx-hardis] {\n  \"status\": 0,\n  \"result\": [],\n  \"warnings\": [\n    \"The \\\"-u\\\" flag has been deprecated. Use \\\"--target-org | -o\\\" instead.\"\n  ]\n}\n\n[sfdx-hardis][WARNING] stderr:  ›   Warning: @salesforce/cli update available from 2.27.6 to 2.28.6.\n\n[sfdx-hardis] Install all packages 0:00:07.040\n[sfdx-hardis] Create and initialize scratch org 0:01:04.284\n{\n  \"status\": 0,\n  \"result\": {\n    \"status\": 0,\n    \"scratchOrgAlias\": \"PO-2xCI-root-ci-cd-setup_20240217_1032\",\n    \"scratchOrgInfo\": {\n      \"username\": \"rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com\",\n      \"scratchOrgInfo\": {\n        \"attributes\": {\n          \"type\": \"ScratchOrgInfo\",\n          \"url\": \"/services/data/v60.0/sobjects/ScratchOrgInfo/2SRP4000000C3yDOAS\"\n        },\n        \"Id\": \"2SRP4000000C3yDOAS\",\n        \"OwnerId\": \"0057Q000003CVscQAG\",\n        \"IsDeleted\": false,\n        \"Name\": \"00000041\",\n        \"CreatedDate\": \"2024-02-17T22:32:11.000+0000\",\n        \"CreatedById\": \"0057Q000003CVscQAG\",\n        \"LastModifiedDate\": \"2024-02-17T22:32:26.000+0000\",\n        \"LastModifiedById\": \"0057Q000003hZRvQAM\",\n        \"SystemModstamp\": \"2024-02-17T22:32:26.000+0000\",\n        \"LastViewedDate\": \"2024-02-17T22:32:11.000+0000\",\n        \"LastReferencedDate\": \"2024-02-17T22:32:11.000+0000\",\n        \"Edition\": \"Enterprise\",\n        \"Username\": \"rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com\",\n        \"AdminEmail\": \"rbarreiros@forciit.com\",\n        \"OrgName\": \"PO-2xCI-root-ci-cd-setup_20240217_1032\",\n        \"DurationDays\": 30,\n        \"ConnectedAppConsumerKey\": \"PlatformCLI\",\n        \"ConnectedAppCallbackUrl\": \"http://localhost:1717/OauthRedirect\",\n        \"Namespace\": \"DriveMate\",\n        \"Features\": \"EnableSetPasswordInApi\",\n        \"Snapshot\": null,\n        \"Country\": null,\n        \"Language\": \"en_US\",\n        \"Instance\": null,\n        \"Package2AncestorIds\": null,\n        \"SourceOrg\": null,\n        \"HasSampleData\": false,\n        \"Release\": \"Current\",\n        \"SignupUsername\": \"rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com\",\n        \"Status\": \"Active\",\n        \"ErrorCode\": null,\n        \"ScratchOrg\": \"00DQI0000028BWb\",\n        \"SignupInstance\": \"SWE28S\",\n        \"AuthCode\": \"aPrxt3maZqIfAabrHXk_EKugXCeyStYeHaPkbQEZhfR4EysMFUihL15uxUrPRZPLr.TVltXPgg==\",\n        \"SignupCountry\": \"LU\",\n        \"SignupLanguage\": \"en_US\",\n        \"SignupEmail\": \"rbarreiros@forciit.com\",\n        \"SignupTrialDays\": 30,\n        \"LoginUrl\": \"https://platform-inspiration-4018.scratch.my.salesforce.com\",\n        \"Description\": null,\n        \"ExpirationDate\": \"2024-03-18\",\n        \"LastLoginDate\": null,\n        \"DeletedBy\": null,\n        \"DeletedDate\": null\n      },\n      \"authFields\": {\n        \"accessToken\": \"ACCESS-TOKENHIDDDEN\",\n        \"instanceUrl\": \"https://platform-inspiration-4018.scratch.my.salesforce.com\",\n        \"orgId\": \"00DQI0000028BWb2AM\",\n        \"username\": \"rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com\",\n        \"loginUrl\": \"https://platform-inspiration-4018.scratch.my.salesforce.com\",\n        \"refreshToken\": \"REFRESH-TOKENHIDDDEN\",\n        \"clientId\": \"PlatformCLI\",\n        \"isDevHub\": false,\n        \"namespacePrefix\": \"DriveMate\",\n        \"devHubUsername\": \"rbarreiros@forciit.com\",\n        \"created\": \"1708209131000\",\n        \"expirationDate\": \"2024-03-18\",\n        \"createdOrgInstance\": \"SWE28S\",\n        \"isScratch\": true,\n        \"isSandbox\": false,\n        \"instanceApiVersion\": \"60.0\",\n        \"instanceApiVersionLastRetrieved\": \"2/17/2024, 10:32:28 PM\",\n        \"tracksSource\": true\n      },\n      \"warnings\": [],\n      \"orgId\": \"00DQI0000028BWb2AM\"\n    },\n    \"scratchOrgUsername\": \"rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com\",\n    \"scratchOrgPassword\": \"PASSWORD-HIDDDEN\",\n    \"scratchOrgSfdxAuthUrl\": \"force://PlatformCLI::5Aep861Ug4YpivOGgmupfjKwvbOi2rKZkJREF3gQcrooujby5qpC7B9Kkr0OBmENvcYiNxxBnfP4FRN.25ZuGSH@platform-inspiration-4018.scratch.my.salesforce.com\",\n    \"authFileJson\": {\n      \"status\": 0,\n      \"result\": {\n        \"id\": \"00DQI0000028BWb2AM\",\n        \"devHubId\": \"rbarreiros@forciit.com\",\n        \"apiVersion\": \"60.0\",\n        \"accessToken\": \"TOKEN-HIDDDEN\",\n        \"instanceUrl\": \"https://platform-inspiration-4018.scratch.my.salesforce.com\",\n        \"username\": \"rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com\",\n        \"clientId\": \"PlatformCLI\",\n        \"password\": \"PASSWORD-HIDDDEN\",\n        \"status\": \"Active\",\n        \"expirationDate\": \"2024-03-18\",\n        \"createdBy\": \"rbarreiros@forciit.com\",\n        \"edition\": \"Enterprise\",\n        \"namespace\": \"DriveMate\",\n        \"orgName\": \"PO-2xCI-root-ci-cd-setup_20240217_1032\",\n        \"createdDate\": \"2024-02-17T22:32:11.000+0000\",\n        \"signupUsername\": \"rbarreiros@hardis-scratch-po-2xci-root-ci-cd-setup_20240217_1032.com\",\n        \"sfdxAuthUrl\": \"force://PlatformCLI::5Aep861Ug4YpivOGgmupfjKwvbOi2rKZkJREF3gQcrooujby5qpC7B9Kkr0OBmENvcYiNxxBnfP4FRN.25ZuGSH@platform-inspiration-4018.scratch.my.salesforce.com\",\n        \"alias\": \"PO-2xCI-root-ci-cd-setup_20240217_1032\"\n      },\n      \"warnings\": [\n        \"The \\\"-u\\\" flag has been deprecated. Use \\\"--target-org | -o\\\" instead.\",\n        \"This command will expose sensitive information that allows for subsequent activity using your current authenticated session.\\nSharing this information is equivalent to logging someone in under the current credential, resulting in unintended access and escalation of privilege.\\nFor additional information, please review the authorization section of the https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm.\"\n      ]\n    },\n    \"outputString\": \"Created and initialized scratch org\"\n  }\n}\n[sfdx-hardis] hardis:scratch:create execution time 0:01:18.845\n"}

When I run sfdx hardis:scratch:pool:view to view the pool:

$ sfdx hardis:scratch:pool:view
[sfdx-hardis] Pool config: {
  "maxScratchOrgsNumber": 1,
  "storageService": "salesforce"
}
[sfdx-hardis] SOQL REST: SELECT Id,Name,ValueText__c FROM SfdxHardisKeyValueStore__c WHERE Name='ScratchOrgPool_drivemate' LIMIT 1 on https://forciit.my.salesforce.com
[sfdx-hardis] Pool storage: {}
[sfdx-hardis] There are 0 available scratch orgs
[sfdx-hardis] hardis:scratch:pool:view execution time 0:00:00.680
raphaelbarreiros commented 4 months ago

fixed in one of the latests releases