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:auth:jwt:grant failing after 14/01 release #806

Closed
anderg4 opened this issue Jan 15, 2021 · 14 comments
Closed

sfdx force:auth:jwt:grant failing after 14/01 release #806

anderg4 opened this issue Jan 15, 2021 · 14 comments
Labels
investigating We're actively investigating this issue

Comments

@anderg4
Copy link

anderg4 commented Jan 15, 2021

Summary

Our AWS pipeline which has been working for months has just started failing to deploy to Production with a strange error message "No org configuration found for name".

Steps To Reproduce:

  1. Setup JWT Auth
  2. Use sfdx force:auth:jwt:grant

Expected result

Successful connect

Actual result

Error message and pipeline failure.

Additional information

sfdx installed to ·[38;5;104m/usr/local/bin/sfdx

sfdx-cli/7.83.0-eba9c6a927 linux-x64 node-v12.18.3
CMD= /usr/local/bin/sfdx force:auth:jwt:grant --clientid (redacted) --jwtkeyfile /tmp/server.key --username (redacted) --instanceurl https://login.salesforce.com
› Warning: force:auth:jwt:grant is not a sfdx command.
Did you mean auth:jwt:grant? [y/n]: {
"status": 1,
"name": "NoOrgFound",
"message": "No org configuration found for name (redacted)",
"exitCode": 1,
"commandName": "SourceDeployCommand",
"stack": "NoOrgFound: No org configuration found for name (redacted)\n at Function.create (/usr/local/lib/sfdx/node_modules/@salesforce/core/lib/sfdxError.js:160:16)\n at AuthInfo.loadAuthFromConfig (/usr/local/lib/sfdx/node_modules/@salesforce/core/lib/authInfo.js:682:49)",
"warnings": [
"The error message "NoOrgFound" has been deprecated and will be removed in v46 or later. It will become "NamedOrgNotFound"."
]
}

@anderg4 anderg4 added the investigating We're actively investigating this issue label Jan 15, 2021
@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.

@anderg4 anderg4 changed the title sfdx:force:auth:jwt:grant failing after 14/01 release sfdx force:auth:jwt:grant failing after 14/01 release Jan 15, 2021
@sifer
Copy link

sifer commented Jan 15, 2021

Hey, I'm reading that they changed auth into its own component.
https://github.com/forcedotcom/cli/blob/main/releasenotes/README.md
So the new syntax should be sfdx auth:jwt:grant

@anderg4
Copy link
Author

anderg4 commented Jan 15, 2021

Hi @sifer, i'm aware of that change - however the command has been aliased for now so it "should" continue to work as before was my understanding?

@anderg4
Copy link
Author

anderg4 commented Jan 15, 2021

Update: changing our pipeline configuration to use "sfdx auth:jwt:grant" works - so it would appear to be the alias which is broken?

@FabienTaillon
Copy link

Same here, we have several CIs broken, alias doesn't seem to work.

@ImJohnMDaniel
Copy link

I just took a look at our CI builds. Our builds update the CLI installation on the Docker image before working on the build. When I just checked on a build, it is upgrading to v7.84.2-a2868a68d5 .... not v7.83.0-eba9c6a927 that @anderg4.

Has Salesforce already fixed this? It is odd because npmjs.com is still showing v7.83.1 as the "latest" (re: npmjs.com entry on 'sfdx-cli')

@mshanemc
Copy link
Contributor

Release process: an npm package goes at as latest-rc and then promoted to latest a week later.

For example, right now sfdx plugins:install salesforcedx@latest-rc will give you 7.85.0.

@ImJohnMDaniel
Copy link

@mshanemc -- Understood, but how is my sfdx update command picking up v7.84.2-a2868a68d5 then? I don't see that on any of the npmjs aliases.

@anderg4
Copy link
Author

anderg4 commented Jan 15, 2021

Sorry, we're not using npm. Our pipelines use wget to download the latest via:
wget https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz
which currently results in sfdx-cli/7.83.0-eba9c6a927 linux-x64 node-v12.18.3

We've changed to use the non-aliased command
sfdx auth:jwt:grant
and the pipeline is working again. It's definitely something in the aliased command - but we can live with it as we've now change syntax.

@anderg4 anderg4 closed this as completed Jan 15, 2021
@anderg4
Copy link
Author

anderg4 commented Jan 18, 2021

CLI has been rolled back - see #811

@anderg4 anderg4 reopened this Feb 8, 2021
@anderg4
Copy link
Author

anderg4 commented Feb 8, 2021

Exact same issue has been re-introduced.

Warning: force:auth:jwt:grant is not a sfdx command. { "status": 1, "name": "NoOrgFound", "message": "No org configuration found for name ***", "exitCode": 1, "commandName": "SourceDeployCommand", "stack": "NoOrgFound: No org configuration found for name ***\n at Function.create (/usr/local/lib/sfdx/node_modules/@salesforce/core/lib/sfdxError.js:160:16)\n at AuthInfo.loadAuthFromConfig (/usr/local/lib/sfdx/node_modules/@salesforce/core/lib/authInfo.js:682:49)", "warnings": [ "The error message \"NoOrgFound\" has been deprecated and will be removed in v46 or later. It will become \"NamedOrgNotFound\"." ] } Did you mean auth:jwt:grant? [y/n]:

@anderg4
Copy link
Author

anderg4 commented Feb 8, 2021

sfdx retrieved into github action via:

wget https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz

@anderg4
Copy link
Author

anderg4 commented Feb 8, 2021

the above results in sfdx-cli-v7.83.0-eba9c6a927-linux-x64 which appears to be the original non-working version from above rather than the correct repackaged version from Feb 5

@mshanemc mshanemc closed this as completed Dec 6, 2021
@mshanemc
Copy link
Contributor

mshanemc commented Dec 6, 2021

also note that we changed the URLs in early 2021, so you don't want to use that URLs discussed on this issue.

ex: https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.gz

You can always check the docs https://developer.salesforce.com/docs/atlas.en-us.232.0.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm#sfdx_setup_install_cli_macos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

5 participants