Summary
sf agent test run --wait fails during status polling with:
INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRY
Steps To Reproduce
sf agent test create --spec specs/test.yaml --api-name MyTest -o <org>
sf agent test run --api-name MyTest -o <org> --wait 5 --json
Expected result
Test polls and returns results
Actual result
Crashes with RETRY enum error
Additional information
Stack trace
{
"name": "INTERNAL_SERVER_ERROR",
"message": "The specified enum type has no constant with the specified name: RETRY",
"exitCode": 1,
"context": "AgentTestRun",
"data": {
"errorCode": "INTERNAL_SERVER_ERROR",
"message": "The specified enum type has no constant with the specified name: RETRY"
},
"stack": "INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRY\n at SfCommandError.from (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/SfCommandError.js:48:16)\n at AgentTestRun.catch (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/sfCommand.js:332:47)\n at AgentTestRun.catch (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-agent/lib/commands/agent/test/run.js:117:27)\n at AgentTestRun._run (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/command.js:186:29)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Config.runCommand (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:446:25)\n at async run (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:97:16)\n at async file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/bin/run.js:15:1",
"cause": "INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRY\n at HttpApi.getError (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@jsforce/jsforce-node/lib/http-api.js:315:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async /opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@jsforce/jsforce-node/lib/http-api.js:127:33\n at async AgentTester.results (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/agents/lib/agentTester.js:127:25)\n at async Object.poll (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/agents/lib/agentTester.js:89:45)\n at async doPoll (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/core/lib/status/pollingClient.js:62:26) {\n data: {\n errorCode: 'INTERNAL_SERVER_ERROR',\n message: 'The specified enum type has no constant with the specified name: RETRY'\n },\n errorCode: 'INTERNAL_SERVER_ERROR'\n}",
"warnings": [],
"code": "1",
"status": 1,
"commandName": "AgentTestRun"
}
Root Cause
TestStatus type in @salesforce/agents/src/types.ts doesn't include 'RETRY':
type TestStatus = 'NEW' | 'IN_PROGRESS' | 'COMPLETED' | 'ERROR' | 'TERMINATED'
But the API returns status: "RETRY" during polling.
Impact
- Blocks ALL agent testing via CLI
- No workaround available
- Affects both stable and nightly builds
--api-version flag doesn't help
System Information
CLI:
@salesforce/cli/2.129.2 darwin-x64 node-v20.19.3
Plugin Version:
@oclif/plugin-autocomplete 3.2.41 (core)
@oclif/plugin-commands 4.1.40 (core)
@oclif/plugin-help 6.2.38 (core)
@oclif/plugin-not-found 3.2.75 (core)
@oclif/plugin-plugins 5.4.59 (core)
@oclif/plugin-search 1.2.39 (core)
@oclif/plugin-update 4.7.23 (core)
@oclif/plugin-version 2.2.38 (core)
@oclif/plugin-warn-if-update-available 3.1.55 (core)
@oclif/plugin-which 3.2.44 (core)
@salesforce/cli 2.129.2 (core)
agent 1.32.5 (core)
apex 3.9.13 (core)
api 1.3.11 (core)
auth 4.3.1 (core)
code-analyzer 5.10.2 (user)
data 4.0.80 (core)
deploy-retrieve 3.24.16 (core)
info 3.4.111 (core)
limits 3.3.80 (core)
marketplace 1.3.10 (core)
org 5.9.72 (core)
packaging 2.25.10 (core)
schema 3.3.98 (core)
settings 2.4.60 (core)
signups 2.6.56 (user)
sobject 1.4.86 (core)
telemetry 3.8.3 (core)
templates 56.11.0 (core)
trust 3.7.114 (core)
user 3.8.0 (core)
asp 0.0.0 (link) /Users/gimli/Documents/dev/workspace/altify-qa-deployment/asp
SF ENV. VARS.
SF_AUTOUPDATE_DISABLE,true
SF_DISABLE_AUTOUPDATE,true
SF_UPDATE_INSTRUCTIONS,Use "npm update --global @salesforce/cli" to update npm-based installations.
Windows: false
Shell: zsh
Channel: stable
Diagnostics
✅ pass - salesforcedx plugin isn’t installed
❌ fail - you have at least one linked plugin
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/
✅ pass - using latest or latest-rc CLI version
❌ warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
✅ pass - can access: https://test.salesforce.com
✅ pass - can access: https://appexchange.salesforce.com/services/data
✅ pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
❌ fail - [@salesforce/plugin-auth] CLI supports v2 crypto
Summary
sf agent test run --waitfails during status polling with:INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRYSteps To Reproduce
sf agent test create --spec specs/test.yaml --api-name MyTest -o <org>sf agent test run --api-name MyTest -o <org> --wait 5 --jsonExpected result
Test polls and returns results
Actual result
Crashes with RETRY enum error
Additional information
Stack trace
{
"name": "INTERNAL_SERVER_ERROR",
"message": "The specified enum type has no constant with the specified name: RETRY",
"exitCode": 1,
"context": "AgentTestRun",
"data": {
"errorCode": "INTERNAL_SERVER_ERROR",
"message": "The specified enum type has no constant with the specified name: RETRY"
},
"stack": "INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRY\n at SfCommandError.from (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/SfCommandError.js:48:16)\n at AgentTestRun.catch (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/sfCommand.js:332:47)\n at AgentTestRun.catch (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-agent/lib/commands/agent/test/run.js:117:27)\n at AgentTestRun._run (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/command.js:186:29)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Config.runCommand (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:446:25)\n at async run (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:97:16)\n at async file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/bin/run.js:15:1",
"cause": "INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRY\n at HttpApi.getError (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@jsforce/jsforce-node/lib/http-api.js:315:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async /opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@jsforce/jsforce-node/lib/http-api.js:127:33\n at async AgentTester.results (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/agents/lib/agentTester.js:127:25)\n at async Object.poll (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/agents/lib/agentTester.js:89:45)\n at async doPoll (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/core/lib/status/pollingClient.js:62:26) {\n data: {\n errorCode: 'INTERNAL_SERVER_ERROR',\n message: 'The specified enum type has no constant with the specified name: RETRY'\n },\n errorCode: 'INTERNAL_SERVER_ERROR'\n}",
"warnings": [],
"code": "1",
"status": 1,
"commandName": "AgentTestRun"
}
Root Cause
TestStatustype in@salesforce/agents/src/types.tsdoesn't include 'RETRY':type TestStatus = 'NEW' | 'IN_PROGRESS' | 'COMPLETED' | 'ERROR' | 'TERMINATED'But the API returns
status: "RETRY"during polling.Impact
--api-versionflag doesn't helpSystem Information
Diagnostics
✅ pass - salesforcedx plugin isn’t installed
❌ fail - you have at least one linked plugin
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/
✅ pass - using latest or latest-rc CLI version
❌ warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
✅ pass - can access: https://test.salesforce.com
✅ pass - can access: https://appexchange.salesforce.com/services/data
✅ pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
❌ fail - [@salesforce/plugin-auth] CLI supports v2 crypto