Cli: force:auth:sfdxurl command stopped working in January 14 release

Created on 14 Jan 2021  ยท  13Comments  ยท  Source: forcedotcom/cli

Summary

Our CI system pulls the latest tarball of SFDX and installs it during each build. Starting today, the build is failing to authorize the DevHub org via the force:auth:sfdxurl command

I have read the Release Notes for today's release and it explicitly says that the legacy commands should continue to work.

Additionally, I have read #787 but that specifically calls out issues using NPM installs of SFDX. This issue is present in the tarball install (https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz)

>sfdx force:auth:sfdxurl
 ยป   Warning: force:auth:sfdxurl is not a sfdx command.
Did you mean force:auth:logout? [y/n]: n
 ยป   Error: Run sfdx help force for a list of available commands.

Steps To Reproduce:

  • Install today's release of SFDX (either via tarball or sfdx update)
  • Run sfdx force:auth:sfdx:url

Expected result

I should be able to store an auth URL for an existing org in my SFDX client

Actual result

 ยป   Warning: force:auth:sfdxurl is not a sfdx command.
Did you mean force:auth:logout? [y/n]: n

SFDX CLI Version(to find the version of the CLI engine run sfdx --version):

>sfdx plugins --core
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.1 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.5 (core)
@oclif/plugin-update 1.3.10 (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.5 (core)
analytics 1.12.1 (core)
auth 1.4.6 (core)
config 1.2.3 (core)
etcopydata 0.6.3-Beta (beta)
generator 1.1.3 (core)
salesforcedx 50.13.3 (core)
โ”œโ”€ limits 1.0.2 (core)
โ”œโ”€ user 1.0.5 (core)
โ”œโ”€ schema 1.0.3 (core)
โ”œโ”€ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
โ”œโ”€ salesforce-alm 50.13.1 (core)
โ”œโ”€ templates 50.4.0 (core)
โ”œโ”€ apex 0.1.4 (core)
โ””โ”€ custom-metadata 1.0.11 (core)
sfdx-cli 7.84.2 (core)

Windows 10 Pro and Ubuntu 18

regression

Most helpful comment

It's not that we don't have a workaround, it's that we have tooling and scripts and some are not as easily changed as others. This change was supposed to be phased in as the Release Notes indicate.

All 13 comments

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.

@daveespo isn't the command force:auth:sfdxurl:store?

Granted, if you used to do force:auth:sfdxurl you would get help and now it errors, but why would you be getting the help in CI?

Is the alias broken in the recent update? I cant no longer use sfdx force:auth:jwt:grant, however sfdx auth:jwt:grant works.

@amphro -- my bad .. yes, it's force:auth:sfdxurl:store that we use in CI/CD and that's also broken:

vagrant@tl-devops:~/sfdx-cli-v7.83.0-eba9c6a927-linux-x64$ sfdx force:auth:sfdxurl:store
 โ€บ   Warning: force:auth:sfdxurl:store is not a sfdx command.
Did you mean auth:sfdxurl:store? [y/n]: y

Perhaps it's really the tarball that's messed up.

If I unpack the tarball and ./install, the force:auth:sfdxurl:store returns the error above

This is what's installed after the installer finishes:

sfdx plugins --core
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.4 (core)
@oclif/plugin-update 1.3.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.4.3 (core)
alias 1.1.3 (core)
analytics 1.12.1 (core)
auth 1.3.0 (core)
config 1.2.1 (core)
generator 1.1.3 (core)
salesforcedx 50.9.1 (core)
โ”œโ”€ schema 1.0.1 (core)
โ”œโ”€ limits 1.0.0 (core)
โ”œโ”€ salesforce-alm 50.9.0 (core)
โ”œโ”€ templates 50.1.0 (core)
โ”œโ”€ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
โ”œโ”€ custom-metadata 1.0.10 (core)
โ””โ”€ apex 0.1.4 (core)
sfdx-cli 7.83.0 (core)

But if I sfdx update after installing, it picks up a new version of the CLI and dependent packages and I'm able to properly use the force:auth:sfdxurl:store

This is what gets installed after sfdx update

```
vagrant@tl-devops:~/sfdx-cli-v7.83.0-eba9c6a927-linux-x64$ sfdx plugins --core
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.1 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.5 (core)
@oclif/plugin-update 1.3.10 (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.5 (core)
analytics 1.12.1 (core)
auth 1.4.6 (core)
config 1.2.3 (core)
generator 1.1.3 (core)
salesforcedx 50.13.3 (core)
โ”œโ”€ user 1.0.5 (core)
โ”œโ”€ schema 1.0.3 (core)
โ”œโ”€ limits 1.0.2 (core)
โ”œโ”€ salesforce-alm 50.13.1 (core)
โ”œโ”€ templates 50.4.0 (core)
โ”œโ”€ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
โ”œโ”€ custom-metadata 1.0.11 (core)
โ””โ”€ apex 0.1.4 (core)
sfdx-cli 7.84.2 (core)
````

@daveespo the most recent release of the CLI has moved force:auth commands to the auth namespace ... i.e. drop the force: https://github.com/forcedotcom/cli/blob/main/releasenotes/README.md#50133-january-14-2021---cli-7842
This fixed it for me.

It's not that we don't have a workaround, it's that we have tooling and scripts and some are not as easily changed as others. This change was supposed to be phased in as the Release Notes indicate.

I am facing similar issue with user namespace not available as well.

Using just auth instead of force:auth seems to solve that problem, but then I get a different error
"auth:sfdxurl:store: Invalid sfdx auth url. Must be in the format force://<clientId>:<clientSecret>:<refreshToken>@<loginUrl>. The instanceUrl must not have the protocol set"
Same sfdx auth url works in the previous version. Did the format of the sdfx auth url also changed with the release? I recreated it with force:org:display --verbose but got the same error.

We are also facing similar issue,

sfdx force:auth:jwt:grant
errors out for us with following message-

โ€บ Warning: force:auth:jwt:grant is not a sfdx command.
Did you mean auth:jwt:grant? [y/n]:

It seems salesforce expects the command to be sfdx auth:jwt grant instead of sfdx force:auth:jwt grant.

Please see #811 - we will make sure this is addressed in the next release.

I will track the sfdxurl:store error in #805.

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

The sfdx auth:sfdxurl:store and sfdx force:auth:sfdxurl:store commands are both present in version sfdx-cli/7.84.2

Was this page helpful?
0 / 5 - 0 ratings