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

Fail to authenticate with JWT #20

Closed
yongabyte opened this issue Jan 14, 2021 · 7 comments · Fixed by #21
Closed

Fail to authenticate with JWT #20

yongabyte opened this issue Jan 14, 2021 · 7 comments · Fixed by #21
Labels
bug Something isn't working

Comments

@yongabyte
Copy link

Orb Version
The version number of the orb
2.1.0 and 2.0.0

Describe the bug

Workflows started failing around noon EST.

Workflows with the default - sfdx/install flag failed to authenticate to Dev orgs. The reason we found was that
the force:auth:jwt:grant command is dead on sfdx-cli versioned 7.83 (the current default version).

To Reproduce
In the workflow:

  1. uses the default sfdx install option- sfdx/install
  2. uses JWT as authentication method
  3. see error
 ›   Warning: force:auth:jwt:grant is not a sfdx command.
Did you mean auth:jwt:grant? [y/n]: 

Expected behavior

The workflow will error out on any command in the run step if the workflow looks something like this

jobs:
  install_authenticate:
    executor: sfdx/default
    steps:
      - checkout
      - sfdx/install
      - sfdx/auth:
          defaultusername: x
      - run:
          command: 
            any sfdx cli commands

For us it was verify the default user name with sfdx force:config:set defaultusername=x and we got following error.

ERROR running config:set:  No AuthInfo found for name x

Additional context

Current workaround is to specify the sfdx-cli version installed with the orb.

      - sfdx/install:
          version: '7.82.0'
@yongabyte yongabyte added the bug Something isn't working label Jan 14, 2021
@yongabyte yongabyte changed the title Fail to authenticate against it with JWT Fail to authenticate with JWT Jan 14, 2021
@pushyka
Copy link

pushyka commented Jan 15, 2021

Seeing this too. Thanks for suggesting the workaround @yongabyte
See also: forcedotcom/cli#787

@engineerakki
Copy link

Facing same issue.

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

@paulca99
Copy link

We're using AWS Codebuild in a pipeline , and using wget https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz to download sfdx. How do we get the previous version ?

@gmemstr
Copy link
Contributor

gmemstr commented Jan 15, 2021

Interesting - taking a look folks.

@gmemstr
Copy link
Contributor

gmemstr commented Jan 15, 2021

According to https://github.com/forcedotcom/cli/blob/main/releasenotes/README.md#50133-january-14-2021---cli-7842, the command was not removed, but is no longer aliased. Working on a fix.

@engineerakki
Copy link

engineerakki commented Jan 15, 2021

Hi @paulca99
We use CircleCI SFDX orb and it seems that even our CircleCI orb pulls https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz

We moved to
sfdx auth:jwt:grant from

sfdx force:auth:jwt:grant

in our workflow and things started to run for us.

@pushyka
Copy link

pushyka commented Jan 17, 2021

Looks like over the weekend https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz has been reverted to 7.82.0 version

forcedotcom/cli#811

--2021-01-17 00:05:32--  https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz
Resolving developer.salesforce.com (developer.salesforce.com)... 151.101.201.145
Connecting to developer.salesforce.com (developer.salesforce.com)|151.101.201.145|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22101004 (21M) [application/x-tar]
Saving to: 'sfdx-linux-amd64.tar.xz'

sfdx-linux-amd64.ta 100%[===================>]  21.08M  --.-KB/s    in 0.1s    

2021-01-17 00:05:32 (207 MB/s) - 'sfdx-linux-amd64.tar.xz' saved [22101004/22101004]

sfdx installed to /usr/local/bin/sfdx
sfdx-cli/7.82.0-3d0c527ac6 linux-x64 node-v12.18.3
CircleCI received exit code 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants