4

Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. Please use SF_JSON_TO_STDOUT instead. (Use node --trace-warnings ... to show where the warning was created) Warning: The "force org open" command has been deprecated. Use "org open" instead. Error (1): Only absolute URLs are supported 14:52:35.666 sfdx force:org:open ended with exit code 1 While using sfdx:open default org in the VS code I am getting the above error please help me out of this?

Trying to open my default salesforce development org but failed to do so.

JVSPS MADHAV
  • 41
  • 1
  • 3

6 Answers6

3

I did the same thing, just try this command:

sfdx org:login:web --instance-url [your url]

You can find the correct url by clicking on View Profile button (top right) as in the following figure:

enter image description here

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
  • 1
    This one worked for me. Does anyone knows why it has stopped working in the new sfdx cli, which now falls back to the 'sf-cli'. For some SF-Orgs it works as expected, but for others it doesn't? Does change in the password might affect that? – Искрен Станиславов Aug 01 '23 at 09:48
  • It also worked to me. It looks like the default command of login used via VS Code brings this bug for some sandboxes. Others sandboxes, it didn't happen to me. very weird! THIS WAY CAUSES ERROR sfdx force:auth:web:login --setalias ALIAS_NAME --instanceurl https://test.salesforce.com --setdefaultusername – Olavo Alexandrino Aug 15 '23 at 14:18
1

None of those solution worked for me. I suspect that migration from enhanced domain caused the issue. To solve the issue, I log out from vs code using the following sfdx command :

sfdx auth:logout

Then after that , I reauthenticate to my org. Then after that I had to close my vs code and restart it. If I do not close my vs code , the error where persisting. After that, It worked well.

vanessen
  • 1,125
  • 1
  • 12
  • 19
1

Running the usual, "SFDX: Authorize an Org", command from the VsCode Command Palette, then closing and re-opening Vscode fixes this issue.

Plinderman
  • 26
  • 3
0

Try to reauthorize the org. Use the following command on the terminal:

sfdx org:login:web --instance-url [your url]

do not add 'www' should just be https://yourdomain.salesforce.com

0

I tried updating sfdx-project.json file and it worked: Old:

{
  "packageDirectories": [
    { 
    "path": "force-app"
    }
  ],
  "name": "SelfMainOrg",
  "namespace": "",
  "sfdcLoginUrl": "https://login.salesforce.com",
  "sourceApiVersion": "57.0"
}

New:

{
  "packageDirectories": [
    { "path": "force-app", "default": true },
     
    { "path" : "manifest" }
  ],
  "name": "SelfMainOrg",
  "namespace": "",
  "sfdcLoginUrl": "https://login.salesforce.com",
  "sourceApiVersion": "57.0"
}

In Summary I added path for Manifest. Technically as I was retrieving or deploying a Single file by selecting it and clicking on "Deploy Source to Org", adding Manifest path is irrelevant. But somehow it did work for me.

Amit
  • 1
0

I recently installed sf and removed sfdx and I was having the same problem. Here is how I solved it:

Delete the alias that wasn't working with this command:

sf org logout --target-org [alias] --no-prompt

Then I authorized an Org but not with commands, that way it didn't work out for me, I had to do it with clicks:

  1. Ctrl + Shift + P
  2. SFDX: Authorize an Org
  3. Select Custom enter image description here
  4. Add the enhanced URL with this format: https://mycompany--dev.sandbox.my.salesforce.com enter image description here
Jorge Valdés
  • 629
  • 9
  • 16