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:legacy:deploy quick deploy fails to find authorisation information 7.115.1 #1577

Closed
gdman opened this issue Jun 17, 2022 · 6 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@gdman
Copy link

gdman commented Jun 17, 2022

Summary

sfdx force:mdapi:legacy:deploy quick deploy fails to find authorisation information

Error:

Using alias:
% sfdx force:mdapi:legacy:deploy --apiversion=54.0 --targetusername=demo:qa --wait=-1 --validateddeployrequestid=0Af4J00000ngY65SAE WARNING: The command "MdapiDeployCommand" has been deprecated and will be removed in v56.0 or later. Use "force:mdapi:deploy" instead. ERROR running force:mdapi:legacy:deploy: No authorization information found for demo:qa.

Using username:
% sfdx force:mdapi:legacy:deploy --apiversion=54.0 --targetusername=xxx --wait=-1 --validateddeployrequestid=0Af4J00000ngY65SAE WARNING: The command "MdapiDeployCommand" has been deprecated and will be removed in v56.0 or later. Use "force:mdapi:deploy" instead. ERROR running force:mdapi:legacy:deploy: No authorization information found for demo:qa.

The exact same command has been working in previous releases, our build script tests failed when running against 7.115.1.

The same error is received for two different authentications - Web (locally on MacOS) and JWT (running in a Docker container running Alpine)

Steps To Reproduce:

  1. Kick off a validation using sfdx force:mdapi:legacy:deploy with check only
  2. Attempt to deploy using sfdx force:mdapi:legacy:deploy with --validateddeployrequestid to run a quick deploy for the previous validation

Expected result

Quick deploy is initiated

Actual result

Fails with error that it can't find authorisation information

System Information

{
"cliVersion": "sfdx-cli/7.155.1",
"architecture": "darwin-x64",
"nodeVersion": "node-v16.15.1",
"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.1 (core)",
"apex 0.13.0 (core)",
"auth 2.1.0 (core)",
"community 2.0.0 (core)",
"config 1.4.12 (core)",
"custom-metadata 2.0.0 (core)",
"data 2.0.3 (core)",
"generator 2.0.1 (core)",
"info 2.0.1 (core)",
"limits 2.0.1 (core)",
"org 1.13.2 (core)",
"salesforce-alm 54.5.1 (core)",
"schema 2.1.1 (core)",
"sfdx-cli 7.155.1 (core)",
"signups 1.1.2 (core)",
"source 1.10.2 (core)",
"telemetry 2.0.0 (core)",
"templates 54.8.0 (core)",
"trust 2.0.0 (core)",
"user 2.0.2 (core)"
],
"osVersion": "Darwin 20.5.0"
}

@gdman gdman added the investigating We're actively investigating this issue label Jun 17, 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.

@gdman
Copy link
Author

gdman commented Jun 17, 2022

Here is the debug debug:

`ERROR running force:mdapi:legacy:deploy: No authorization information found for demo:qa.
*** Internal Diagnostic ***

NamedOrgNotFound: No authorization information found for demo:qa.
at Messages.createError (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@salesforce/core/lib/messages.js:446:16)
at AuthInfo.init (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@salesforce/core/lib/org/authInfo.js:558:28)
at async Function.create (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@salesforce/kit/lib/creatable.js:57:9)
at async Object.getMetadataConnection (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/salesforce-alm/dist/lib/mdapi/mdApiUtil.js:58:19)
at async Object.mdapiDeployRecentValidation (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/salesforce-alm/dist/lib/mdapi/mdApiUtil.js:67:24)
at async MdDeployApi._doDeployRecentValidation (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/salesforce-alm/dist/lib/mdapi/mdapiDeployApi.js:267:30)
at async MdapiDeployCommand.execLegacyCommand (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/salesforce-alm/dist/ToolbeltCommand.js:149:29)
at async MdapiDeployCommand._run (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@salesforce/command/lib/sfdxCommand.js:89:40)
at async Config.runCommand (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@oclif/config/lib/config.js:173:24)
at async SfdxMain.run (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@oclif/command/lib/main.js:27:9)
at async SfdxMain._run (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@oclif/command/lib/command.js:43:20)
at async Object.run (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/dist/cli.js:162:47)


sf:MdapiDeployCommand ERROR [
sf:MdapiDeployCommand '\x1B[1mERROR running force:mdapi:legacy:deploy: \x1B[22m',
sf:MdapiDeployCommand '\x1B[31mNo authorization information found for demo:qa.\x1B[39m',
sf:MdapiDeployCommand '\x1B[31m\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m*** Internal Diagnostic \x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31mNamedOrgNotFound: No authorization information found for demo:qa.\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at Messages.createError (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@salesforce/core/lib/messages.js:446:16)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at AuthInfo.init (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@salesforce/core/lib/org/authInfo.js:558:28)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at async Function.create (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@salesforce/kit/lib/creatable.js:57:9)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at async Object.getMetadataConnection (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/salesforce-alm/dist/lib/mdapi/mdApiUtil.js:58:19)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at async Object.mdapiDeployRecentValidation (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/salesforce-alm/dist/lib/mdapi/mdApiUtil.js:67:24)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at async MdDeployApi._doDeployRecentValidation (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/salesforce-alm/dist/lib/mdapi/mdapiDeployApi.js:267:30)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at async MdapiDeployCommand.execLegacyCommand (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/salesforce-alm/dist/ToolbeltCommand.js:149:29)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at async MdapiDeployCommand._run (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@salesforce/command/lib/sfdxCommand.js:89:40)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at async Config.runCommand (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@oclif/config/lib/config.js:173:24)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at async SfdxMain.run (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@oclif/command/lib/main.js:27:9)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at async SfdxMain._run (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/node_modules/@oclif/command/lib/command.js:43:20)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m at async Object.run (/Users/andrew.goodman/.local/share/sfdx/client/7.155.1-a22fcb0/dist/cli.js:162:47)\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m
***\x1B[39m\n' +
sf:MdapiDeployCommand '\x1B[31m\x1B[39m'
sf:MdapiDeployCommand ] +361ms`

Not sure if it's relevant but it's interesting that the error message references the alias even when specifying the username directly without any mention of the alias:
No authorization information found for demo:qa

@shetzel shetzel added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Jun 17, 2022
@shetzel
Copy link
Contributor

shetzel commented Jun 17, 2022

I think you're spot on with the alias being used as the username. If you run the command with --verbose it displays the mixup. Thanks for reporting. The fix will be in the RC.

@shetzel
Copy link
Contributor

shetzel commented Jun 20, 2022

@gdman - if you are able to, can you retry your steps after:
sfdx plugins:install salesforce-alm@latest
Then uninstall that plugin version with:
sfdx plugins:uninstall salesforce-alm
and let me know if that fixed it for you?

@gdman
Copy link
Author

gdman commented Jun 21, 2022

Thanks for fixing. I'm out of the office for a few days but I'll be sure to give it a go on Monday.

@gdman
Copy link
Author

gdman commented Jun 29, 2022

This is working again the most recent version - thanks

@gdman gdman closed this as completed Jun 29, 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
Projects
None yet
Development

No branches or pull requests

2 participants