commerce-on-lightning icon indicating copy to clipboard operation
commerce-on-lightning copied to clipboard

Getting "The requested resource does not exist" when using sfdx commerce:store:create --store-name teststore -u testCC

Open lucam75 opened this issue 2 years ago • 9 comments

I'm having the below problem when running sfdx commerce:store:create --store-name teststore -u testCC

ERROR running StoreQuickstartSetup:  {
    "code": 1,
    "context": "Create",
    "commandName": "Create",
    "message": "The requested resource does not exist",
    "name": "NOT_FOUND",
    "status": 1,
    "stack": "NOT_FOUND: The requested resource does not exist\n    at HttpApi.getError (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/jsforce/lib/http-api.js:252:12)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async /opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/jsforce/lib/http-api.js:122:23\n    at async Connection.create (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/jsforce/lib/connection.js:796:133)\n    at async Create.run (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-data/lib/commands/data/create/record.js:23:24)\n    at async Create._run (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/command.js:117:22)\n    at async Config.runCommand (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:314:25)\n    at async run (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:89:16)",
    "exitCode": 1,
    "warnings": [
        "The \"-u\" flag has been deprecated. Use \"--target-org | -o\" instead.",
        "The \"--apiversion\" flag has been deprecated. Use \"--api-version\" instead."
    ],
    "command": "sfdx force:data:record:create -u \"[email protected]\" -s \"ShippingConfigurationSet\" -v \"TargetRecordId=0ZE8G0000008aRyWAI\" --json --apiversion=59.0"
}
ERROR running commerce:store:create:  StoreQuickstartSetup failed

Running in isolation the failed command responds with the same error.

I'm running this in my local environment over the develop branch.

lucam75 avatar Oct 26 '23 21:10 lucam75

I have the same issue. I do not have this object on my scratch org.

AVATOR avatar Jan 16 '24 13:01 AVATOR

The same case((((

mishapapash avatar Jan 16 '24 14:01 mishapapash

I have the same issue...

ihor-shchepilov avatar Jan 16 '24 14:01 ihor-shchepilov

Same for me: SFDX CLI Version: @salesforce/cli/2.23.20 darwin-x64 node-v20.10.0 @salesforce/[email protected]

ViraOsinaCT avatar Jan 16 '24 14:01 ViraOsinaCT

@lucam75 @AVATOR @mishapapash @ihor-shchepilov @ViraOsinaCT Thank you for expressing your issue. I know where this issue is coming from. "ShippingConfigurationSet" is a new entity that has been introduced in salesforce api version 60. Your scratchorg version is likely older than that. If you are just working with a devhub in a steam environment just create a new scratchorg using the plugin. Please use the latest release, 250.1.0. If you want to use a current scratchorg you already have, make sure the version is updated (I think this would be automatically handled with salesforce). If you are still having issues, let me know.

tarcang avatar Jan 16 '24 15:01 tarcang

@tarcang I've tried creating a store with @salesforce/[email protected] as suggested. It does not show an error that ShippingConfigurationSet does not exist, but the object itself is missing:

"code": 1, "context": "DataSoqlQueryCommand", "commandName": "DataSoqlQueryCommand", "message": "\nSELECT Id FROM ShippingConfigurationSet\n ^\nERROR at Row:1:Column:16\nsObject type 'ShippingConfigurationSet' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names."

Moreover, 250.1.0 triggers another error:

{ "status": 1, "name": "SfdxError", "message": "{\n "code": 1,\n "context": "DataSoqlQueryCommand",\n "commandName": "DataSoqlQueryCommand",\n "message": "The requested resource does not exist",\n "name": "NOT_FOUND",\n "status": 1,\n "stack": "NOT_FOUND: The requested resource does not exist\n at HttpApi.getError (/usr/local/lib/sf/node_modules/jsforce/lib/http-api.js:252:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async /usr/local/lib/sf/node_modules/jsforce/lib/http-api.js:122:23\n at async Query._execute (/usr/local/lib/sf/node_modules/jsforce/lib/query.js:413:18)\n at async /usr/local/lib/sf/node_modules/jsforce/lib/query.js:346:9",\n "exitCode": 1,\n "warnings": [\n "The \"-u\" flag has been deprecated. Use \"--target-org | -o\" instead.",\n "The \"--apiversion\" flag has been deprecated. Use \"--api-version\" instead."\n ],\n "command": "sfdx force:data:soql:query -u \"test_b2с@test.com\" -q \"SELECT Id FROM WebStore WHERE Name='TestStore' LIMIT 1\" --json --apiversion=60.0"\n}", "exitCode": 1, "commandName": "StoreCreate", "stack": "SfdxError: {\n "code": 1,\n "context": "DataSoqlQueryCommand",\n "commandName": "DataSoqlQueryCommand",\n "message": "The requested resource does not exist",\n "name": "NOT_FOUND",\n "status": 1,\n "stack": "NOT_FOUND: The requested resource does not exist\n at HttpApi.getError (/usr/local/lib/sf/node_modules/jsforce/lib/http-api.js:252:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async /usr/local/lib/sf/node_modules/jsforce/lib/http-api.js:122:23\n at async Query._execute (/usr/local/lib/sf/node_modules/jsforce/lib/query.js:413:18)\n at async /usr/local/lib/sf/node_modules/jsforce/lib/query.js:346:9",\n "exitCode": 1,\n "warnings": [\n "The \"-u\" flag has been deprecated. Use \"--target-org | -o\" instead.",\n "The \"--apiversion\" flag has been deprecated. Use \"--api-version\" instead."\n ],\n "command": "sfdx force:data:soql:query -u \"test_b2с@test.com\" -q \"SELECT Id FROM WebStore WHERE Name='TestStore' LIMIT 1\" --json --apiversion=60.0"\n}\n at shellJsonSfdx (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/lib/utils/shell.js:111:23)\n at forceDataSoql (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/lib/utils/sfdx/forceDataSoql.js:19:38)\n at StoreCreate.getStoreId (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/create.js:50:59)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async StoreCreate.waitForStoreId (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/create.js:94:17)\n at async StoreCreate.createCommunity (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/create.js:207:13)\n at async StoreCreate.createCommunity (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/create.js:215:13)\n at async StoreCreate.createCommunity (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/create.js:215:13)\n at async StoreCreate.createCommunity (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/create.js:215:13)\n at async StoreCreate.createCommunity (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/create.js:215:13)", "warnings": [ "apiVersion configuration overridden at "60.0"" ] }

ViraOsinaCT avatar Jan 17 '24 11:01 ViraOsinaCT

@ViraOsinaCT Would you mind creating a new scratch org in api version 60 using the plugin? Your scratch org may be missing a feature permission. If you want to keep the same scratchorg, check the scratch definition file we are using and compare the features and settings.

tarcang avatar Jan 17 '24 14:01 tarcang

@tarcang I've created a new scratch org in api 60: { "status": 0, "result": { "scratchOrgCreated": true }, "warnings": [ "apiVersion configuration overridden at "60.0"" ] }

But when I proceed to create a new Store in this org I still get the same error:

{ "status": 1, "name": "SfdxError", "message": "{\n "code": 1,\n "context": "DataSoqlQueryCommand",\n "commandName": "DataSoqlQueryCommand",\n "message": "The requested resource does not exist",\n "name": "NOT_FOUND",\n "status": 1,\n "stack": "NOT_FOUND: The requested resource does not exist\n at HttpApi.getError (/usr/local/lib/sf/node_modules/jsforce/lib/http-api.js:252:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async /usr/local/lib/sf/node_modules/jsforce/lib/http-api.js:122:23\n at async Query._execute (/usr/local/lib/sf/node_modules/jsforce/lib/query.js:413:18)\n at async /usr/local/lib/sf/node_modules/jsforce/lib/query.js:346:9",\n "exitCode": 1,\n "warnings": [\n "The \"-u\" flag has been deprecated. Use \"--target-org | -o\" instead.",\n "The \"--apiversion\" flag has been deprecated. Use \"--api-version\" instead."\n ],\n "command": "sfdx force:data:soql:query -u \"test_b2с@test.com\" -q \"SELECT Type FROM WebStore WHERE Name = 'b2cTestStore'\" --json --apiversion=60.0"\n}", "exitCode": 1, "commandName": "StoreQuickstartSetup", "stack": "SfdxError: {\n "code": 1,\n "context": "DataSoqlQueryCommand",\n "commandName": "DataSoqlQueryCommand",\n "message": "The requested resource does not exist",\n "name": "NOT_FOUND",\n "status": 1,\n "stack": "NOT_FOUND: The requested resource does not exist\n at HttpApi.getError (/usr/local/lib/sf/node_modules/jsforce/lib/http-api.js:252:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async /usr/local/lib/sf/node_modules/jsforce/lib/http-api.js:122:23\n at async Query._execute (/usr/local/lib/sf/node_modules/jsforce/lib/query.js:413:18)\n at async /usr/local/lib/sf/node_modules/jsforce/lib/query.js:346:9",\n "exitCode": 1,\n "warnings": [\n "The \"-u\" flag has been deprecated. Use \"--target-org | -o\" instead.",\n "The \"--apiversion\" flag has been deprecated. Use \"--api-version\" instead."\n ],\n "command": "sfdx force:data:soql:query -u \"test_b2с@test.com\" -q \"SELECT Type FROM WebStore WHERE Name = 'b2cTestStore'\" --json --apiversion=60.0"\n}\n at shellJsonSfdx (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/lib/utils/shell.js:111:23)\n at forceDataSoql (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/lib/utils/sfdx/forceDataSoql.js:19:38)\n at StoreQuickstartSetup.getStoreType (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/quickstart/setup.js:63:64)\n at StoreQuickstartSetup.run (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/quickstart/setup.js:85:48)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async StoreQuickstartSetup._run (/Users/viraosina/.local/share/sf/node_modules/@salesforce/command/lib/sfdxCommand.js:81:40)\n at async StoreCreate.pushStoreSources (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/create.js:259:21)\n at async StoreCreate.run (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/create.js:180:9)\n at async StoreCreate._run (/Users/viraosina/.local/share/sf/node_modules/@salesforce/command/lib/sfdxCommand.js:81:40)\n at async Config.runCommand (/Users/viraosina/.local/share/sf/client/2.23.20-50cd2d8/node_modules/@oclif/core/lib/config/config.js:417:25)", "warnings": [ "apiVersion configuration overridden at "60.0"" ] } { "status": 1, "name": "SfdxError", "message": "StoreQuickstartSetup failed", "exitCode": 1, "commandName": "StoreCreate", "stack": "SfdxError: StoreQuickstartSetup failed\n at StoreCreate.pushStoreSources (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/create.js:261:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async StoreCreate.run (/Users/viraosina/.local/share/sf/node_modules/@salesforce/commerce/lib/commands/commerce/store/create.js:180:9)\n at async StoreCreate._run (/Users/viraosina/.local/share/sf/node_modules/@salesforce/command/lib/sfdxCommand.js:81:40)\n at async Config.runCommand (/Users/viraosina/.local/share/sf/client/2.23.20-50cd2d8/node_modules/@oclif/core/lib/config/config.js:417:25)\n at async run (/Users/viraosina/.local/share/sf/client/2.23.20-50cd2d8/node_modules/@oclif/core/lib/main.js:85:16)", "warnings": [ "apiVersion configuration overridden at "60.0"" ] }

ViraOsinaCT avatar Jan 17 '24 16:01 ViraOsinaCT

Can you try using the https://www.npmjs.com/package/@salesforce/commerce/v/248.1.3 version of the plugin? This one doesn't have the source files that have ShippingConfigurationSet. Older scratch orgs need to use the older version of the plugin.

tarcang avatar Jan 25 '24 22:01 tarcang