1

I'm trying to connect to a Salesforce using the command line sfdx force:auth:web:login -d -a DevHub, that's works well, I'm entering the user and password on the login page, then enter the user name and password, in the next step I allow access to Salesforce CLI, but then open this URL in the browser: http://localhost:1717/OauthRedirect?code=aPrxdHf6aiCQy.jawcyGQ1Jm7AQyFzi2miCj3IHITODyct55KD_n8SDj6LWibvOdgUQ4dy6C9g%3D%3D&state=7c836b07ab0a and show me this message:

This is most likely not an error with the Salesforce CLI. Please ensure all information is accurate and try again.

I'm searching on the internet and trying many possible solutions but it's not working and I am stuck and can't use SFDX, because I can connect my local project to an ORG in Salesforce.

Did anyone face this problem before with SFDX and the local machine?

enter image description here

enter image description here

UPDATE:

I think it's solved but I don't know the reason. I uninstall sfdx and reinstalling but when I run SFDX shows me this message Warning: Use "npm update --global sfdx-CLI" to update npm-based installations. and recommended uninstall sfdx and re-installing give me a different link I used before, so I uninstalled sfdx and installed from this URL, run the line sfdx force:auth:web:login -d -a DevHub and it's working, I check the .sf folder and in the config.json is the key "target-dev-hub" with the value "DevHub"

6
  • What version is your sfdx CLI? Commented Jun 12, 2022 at 14:29
  • The last version, I ran sfdx update to get the last version Commented Jun 12, 2022 at 14:39
  • Might be related to this. Are you on Apple? Commented Jun 12, 2022 at 15:06
  • I restarted the sfdx to see if that solve the issue, but not, the error is still there. I'm using Windows and the error is very similar but in another line and the message is different too Commented Jun 12, 2022 at 15:20
  • 2
    I think it's solved but I don't know the reason. I uninstall sfdx and reinstalling but when I run SFDX shows me this message Warning: Use "npm update --global sfdx-CLI" to update npm-based installations. and recommended uninstall sfdx and re-installing give me a different link I used before, so I uninstalled sfdx and installed from this URL, run the line sfdx force:auth:web:login -d -a DevHub and it's working, I check the .sf folder and in the config.json is the key "target-dev-hub" with the value "DevHub" Commented Jun 12, 2022 at 15:57

2 Answers 2

0

Try removing all org config json from the folder path C:\Users\YourName.sfdx and delete the alias and key configs too.

1
0

Another place to check for this is the .sf folder in your Visual Studio Code project. In my case I had extra characters from a merge conflict which was causing the error message.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .