-
Notifications
You must be signed in to change notification settings - Fork 78
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
stdin functionality not working for sf org login sfdx-url
#2690
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. |
@mdonnalley I wanted to grab your attention on this, since you helped me implement this feature at the time and may have insight on why this may not be working in prod. |
@k-capehart Looks like the flag is being parsed twice in production for some reason. So it gets the correct url from stdin on the first parse but then the second parse doesn't find anything in stdin so it returns the Still getting to the bottom of this but I'll hopefully get a PR to oclif/core today to fix it |
@k-capehart I have a workaround for you - disable telemetry either by setting the The issue is that our telemetry is calling |
Oh interesting. Thank you, that at least let's me use the functionality for now. |
This issue has been linked to a new work item: W-14954770 |
This issue is fixed in version 2.28.6. |
Thanks all! I just verified that everything is working on my end now |
Is it possible the error has returned? I'm trying to get it to work inside the sf-provided docker container for cicd and it's complaining.
And they all return the error:
The sandbox production root@f4f85afa0859:/# sf version --verbose Architecture: Node Version: Plugin Version: OS and Version: Shell: Root Path: |
@tggagne - make sure the $SFALIAS doesn't have any quotes surrounding the URL... I had it in a file, with quotes, and at first it failed ➜ cat authFile.json | sf auth sfdxurl store --sfdx-url-stdin -
Error (INVALID_SFDX_AUTH_URL): Invalid SFDX authorization URL. Must be in the format "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". Note that the "instanceUrl" inside the SFDX authorization URL doesn\'t include the protocol ("https://"). Run "org display --target-org" on an org to see an example of an SFDX authorization URL.
➜ dreamhouse-lwc git:(main) ✗ hub:(GLOBAL - DevHub) scratch:([email protected])
➜ cat authFile.json | sf auth sfdxurl store --sfdx-url-stdin -
Successfully authorized [email protected] with org ID 00DDJ000000PWk22AG
once the file contained only the url, it worked |
@tggagne I just ran my own CI and confirmed it's working there as well. Here's what I have: https://github.com/k-capehart/sfdc-dev-org/blob/098ed3c79435d7248dce1e07c16d157d69a5daea/.github/workflows/main.yml#L28 |
Thank you both, @WillieRuemmele and @k-capehart . I was under the false impression that the entirety of the json should be written to the auth file or into the environment variable. It's ONLY the value of sfdxAuthUrl that's passed. Thanks. FTR -- because my desktop doesn't have
|
Summary
A few weeks ago, I helped create a new flag for the
org login sfdx-url
command calledsfdx-url-stdin
, which (in conjunction with a new oclif feature) alloows piping in a value from standard input. This new feature passed all tests during development.However, now that this is released, when attempting the above I get this error:
Error (1): Invalid SFDX auth URL. Must be in the format "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". Note that the SFDX auth URL uses the "force" protocol, and not "http" or "https". Also note that the "instanceUrl" inside the SFDX auth URL doesn't include the protocol ("https://").
When using auth file method, the same URL works as expected.
Here are the relevant PRs for reference. This still works locally, so either I'm not understanding how the releases work or something else is wrong.
Steps To Reproduce
sf org display --verbose
echo url | sf org login sfdx-url --sfdx-url-stdin -
Expected result
A successful authentication message should have appeared.
Actual result
The following error is displayed instead:
Error (1): Invalid SFDX auth URL. Must be in the format "force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>". Note that the SFDX auth URL uses the "force" protocol, and not "http" or "https". Also note that the "instanceUrl" inside the SFDX auth URL doesn't include the protocol ("https://").
System Information
Using zsh on MacOS
The text was updated successfully, but these errors were encountered: