ERROR running force:source:deploy: Unexpected element {http://soap.sforce.com/2006/04/metadata}id during simple type deserialization
See original GitHub issueSummary
When deploying using Quick Deploy ID, the following error is thrown as follows but the deployment technically works. No change was made to pipeline (pulling latest version). This means we cannot parse the results from the deploy and use them in the CICD progress afterwards
PS C:\workspace\sfdc> Write-Host "DeploymentID: $deploymentId"
DeploymentID: 0Af2D00000f3vYGSAY
PS C:\workspace\sfdc> sfdx force:source:deploy -q $deploymentId -u devevo
Job ID | [object Object]
ERROR running force:source:deploy: Unexpected element {http://soap.sforce.com/2006/04/metadata}id during simple type deserialization
Steps To Reproduce:
Repository to reproduce: dreamhouse-lwc
NOTE: If your issue is not reproducable by dreamhouse-lwc, i.e. requires specific metadata or files, we require a link to a simple Salesforce project repository with a script to setup a scratch org that reproduces your problem.
- Successfully run validation with tests
- Retrieve Deploy ID
- Attempt to quick deploy using
sfdx force:source:deploy -q $deploymentId -u devevo
- Check salesforce org and see that the deployment actually did pass so the command is assumed to be correct but the CLI throw error.
Expected result
Updates with Job deployment should be pushed to CLI
Actual result
firstly, it seems something is not parsing the deployment Id since it says [object Object], but I assume this is the same issue throwing the error.
PS C:\workspace\sfdc> Write-Host "DeploymentID: $deploymentId"
DeploymentID: 0Af2D00000f3vYGSAY
PS C:\workspace\sfdc> sfdx force:source:deploy -q $deploymentId -u devevo
Job ID | [object Object]
ERROR running force:source:deploy: Unexpected element {http://soap.sforce.com/2006/04/metadata}id during simple type deserialization
Additional information
SFDX CLI Version: sfdx-cli/7.88.4 win32-x64 node-v15.5.1
SFDX plugin Version: @oclif/plugin-autocomplete 0.3.0 (core) @oclif/plugin-commands 1.3.0 (core) @oclif/plugin-help 3.2.2 (core) @oclif/plugin-not-found 1.2.4 (core) @oclif/plugin-plugins 1.9.5 (core) @oclif/plugin-update 1.4.0-2 (core) @oclif/plugin-warn-if-update-available 1.7.0 (core) @oclif/plugin-which 1.0.3 (core) @salesforce/sfdx-trust 3.6.0 (core) alias 1.1.7 (core) auth 1.4.8 (core) config 1.2.5 (core) generator 1.1.5 (core) salesforcedx 51.0.4 (core) ├─ limits 1.0.4 (core) ├─ schema 1.0.4 (core) ├─ user 1.1.2 (core) ├─ custom-metadata 1.0.11 (core) ├─ templates 51.2.0 (core) ├─ apex 0.1.4 (core) ├─ salesforce-alm 51.0.2 (core) └─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core) sfdx-cli 7.88.4 (core) sfdx-git-delta 4.2.1 sfpowerkit 2.6.5 telemetry 1.1.1 (core)
OS and version: Windows 10 AND Ubuntu 20
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (1 by maintainers)
@DougMidgley You mean the version I reverted to?
I did this in our pipeline:
sudo npm install sfdx-cli@7.86.3 --global
as that was the latest previous version that worked for us.So version 7.86.3.
Hey man, we added two reports of the same issue almost at the same time.
Just so you know, I managed to temporarily work around the issue by forcing sfdx-cli to a previous version, rather than latest. This allows you to run the pipeline while this is being fixed.