Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sfdx force:mdapi:deploy does nothing #1531

Closed
james-hafer opened this issue May 19, 2022 · 12 comments
Closed

sfdx force:mdapi:deploy does nothing #1531

james-hafer opened this issue May 19, 2022 · 12 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue

Comments

@james-hafer
Copy link

james-hafer commented May 19, 2022

Summary

We use the sfdx force:mdapi:deploy command to deploy to our packaging org. We have been following #1508 and trying workaround steps as well as upgrading version 7.151.1 and the result is still the same. When viewing the log file we receive this:

{"name":"sfdx","hostname":"Jamess-MacBook-Pro.local","pid":39488,"log":"SfdxProjectJson","level":40,"msg":"The config file: /Users/jameshafer/.sfdx/sfdx-project.json is not schema valid\nDue to: Validation errors:\n#/required: must have required property 'packageDirectories'","time":"2022-05-19T16:09:13.067Z","v":0}

This seems to be searching for a sfdx-project.json at a global level rather than the project level.

Steps To Reproduce:

  1. sfdx force:source:convert -d build
  2. sfdx force:mdapi:deploy -u PackagingOrg -d build -w 10

I am cannot provide the repository.

Expected result

The latest changes are deployed to the packaging org.

Actual result

Nothing happens, it does not attempt to deploy or provide an error.

System Information

{
"cliVersion": "sfdx-cli/7.151.1",
"architecture": "darwin-x64",
"nodeVersion": "node-v14.17.0",
"pluginVersions": [
"@oclif/plugin-autocomplete 0.3.0 (core)",
"@oclif/plugin-commands 1.3.0 (core)",
"@oclif/plugin-help 3.3.1 (core)",
"@oclif/plugin-not-found 1.2.6 (core)",
"@oclif/plugin-plugins 1.10.11 (core)",
"@oclif/plugin-update 1.5.0 (core)",
"@oclif/plugin-warn-if-update-available 1.7.3 (core)",
"@oclif/plugin-which 1.0.4 (core)",
"@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
"alias 2.0.0 (core)",
"apex 0.11.0 (core)",
"auth 2.0.2 (core)",
"community 1.1.4 (core)",
"config 1.4.6 (core)",
"custom-metadata 1.1.0 (core)",
"data 2.0.0 (core)",
"generator 2.0.1 (core)",
"info 2.0.0 (core)",
"limits 2.0.0 (core)",
"org 1.13.1 (core)",
"salesforce-alm 54.4.0 (core)",
"schema 2.1.0 (core)",
"sfdx-cli 7.151.1 (core)",
"signups 1.1.0 (core)",
"source 1.9.8 (core)",
"telemetry 2.0.0 (core)",
"templates 54.7.0 (core)",
"trust 1.1.0 (core)",
"user 1.7.1 (core)"
],
"osVersion": "Darwin 21.1.0"
}

Additional information

Please let me know if you need any other information as this is blocking us from releasing a new package, thank you!

@james-hafer james-hafer added the investigating We're actively investigating this issue label May 19, 2022
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@shetzel
Copy link
Contributor

shetzel commented May 19, 2022

There can be a sfdx-project.json set at the global level for things that should apply to all projects. This is not commonly used, but that's also just a warning and not causing any problems.

Just to confirm, the convert happened successfully right? I.e., the contents of the build dir looks correct?

For the deploy command, please append --dev-debug and see if there is something in the output that provides more clues.

As a workaround, you might want to try using sfdx force:source:deploy -u PackagingOrg, which should do the same thing.

@james-hafer
Copy link
Author

james-hafer commented May 20, 2022

Yes, the convert is successful and the build dir looks correct.

I'm not seeing anything that shows any detail to why it is failing when running the debug.

The workaround did work, however, it also has some strange behavior. In order to use that command you need to re auth to the org each time you need to deploy. If you don't you receive the following error:

The encrypted data is not properly formatted.
*** Internal Diagnostic ***

InvalidEncryptedFormatError: The encrypted data is not properly formatted.
at AuthInfoCrypto.decrypt (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/source-deploy-retrieve/node_modules/@salesforce/core/lib/crypto.js:112:19)
at AuthInfoCrypto.crypt (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/source-deploy-retrieve/node_modules/@salesforce/core/lib/authInfo.js:135:45)
at AuthInfoCrypto.decryptFields (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/source-deploy-retrieve/node_modules/@salesforce/core/lib/authInfo.js:124:21)
at AuthInfo.refreshFn (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/source-deploy-retrieve/node_modules/@salesforce/core/lib/authInfo.js:693:48)
at SessionRefreshDelegate.refresh (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/source-deploy-retrieve/node_modules/jsforce/lib/http-api.js:283:15)
at /usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/source-deploy-retrieve/node_modules/jsforce/lib/http-api.js:91:23
at tryCallOne (/usr/local/lib/node_modules/sfdx-cli/node_modules/promise/lib/core.js:37:12)
at /usr/local/lib/node_modules/sfdx-cli/node_modules/promise/lib/core.js:123:15
at flush (/usr/local/lib/node_modules/sfdx-cli/node_modules/asap/raw.js:50:29)
at processTicksAndRejections (internal/process/task_queues.js:77:11)

This same error occurs when using the legacy deploy. With the workaround this is not as urgent but I would still like to help get this fixed for the future, please let me know if you need anything else.

@gdman
Copy link

gdman commented May 23, 2022

I don't know if this is exactly the same issue but I get the same thing - running sfdx force:mdapi:deploy does absolutely nothing.

No output on stdOut or stdErr. Nothing in the log. Tried --dev-debug and there is nothing obviously wrong. We've used the exact same command for years.

Using the legacy command does work so we've updated all of our build tooling to use the legacy versions but we do need to get to the bottom of why this isn't working. Very concerned that a release has gone out where the main deploy command doesn't work at all and no tests have caught it...

The command we are running is as follows:
sfdx force:mdapi:deploy --apiversion=54.0 --targetusername=ALIASHERE --checkonly --testlevel=RunLocalTests --ignorewarnings --deploydir=temp/deployMain --wait=-1

@sankeerth999
Copy link

I have the same issue, absolutely nothing in the deployment status screen as well

@Julian88Tex
Copy link

This appears to be the same issue as #1508. Downgrading sfdx CLI worked as a workaround for us.

@gdman
Copy link

gdman commented May 23, 2022

I don't think it's exactly the same as no deployment is even initiated in this case

@sankeerth999
Copy link

This worked for me sfdx force:mdapi:legacy:deploy

@rajanraj
Copy link

Thanks @sankeerth999 , Its helped me a lot

@sfnmro
Copy link

sfnmro commented May 25, 2022

same for me

@cromwellryan cromwellryan added the bug Issue or pull request that identifies or fixes a bug label May 26, 2022
@uip-robot-zz
Copy link

This issue has been linked to a new work item: W-11209280

@shetzel
Copy link
Contributor

shetzel commented Jul 14, 2022

This issue was fixed with CLI v7.156.1

@shetzel shetzel closed this as completed Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

9 participants