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

Failed to login to instance with "lightning" word in instance name #2241

Closed
Jojolam44 opened this issue Jun 21, 2023 · 6 comments
Closed

Failed to login to instance with "lightning" word in instance name #2241

Jojolam44 opened this issue Jun 21, 2023 · 6 comments
Labels
bug Issue or pull request that identifies or fixes a bug validated Version information for this issue has been validated

Comments

@Jojolam44
Copy link

Summary

When our company migrated from classic to lightning, we created a new instance with the "-lightning" keyword in it.
We can't login with sfdx-cli because it trigger the "lightning domain" URL check error.

Steps To Reproduce

sfdx org:login:web --instance-url="https://mycompanyname-lightning.my.salesforce.com"

Expected result

Allow to login sfdx-cli to our instance

Actual result

$ sfdx org:login:web --instance-url="https://mycompany-lightning.my.salesforce.com"
Error (1): Invalid instance URL. It should NOT be a lightning domain.

Try this:

If you specify an --instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file.

To specify a My Domain URL, use the format https://yourcompanyname.my.salesforce.com.

To specify a sandbox, set --instance-url to https://MyDomainName--SandboxName.sandbox.my.salesforce.com.

System Information

Shell used : bash for windows

{
  "cliVersion": "sfdx-cli/7.205.6",
  "architecture": "win32-x64",
  "nodeVersion": "node-v18.12.1",
  "osVersion": "Windows_NT 10.0.19045",
  "shell": "C:\\Users\\myuser\\AppData\\Local\\Programs\\Git\\usr\\bin\\bash.exe",
  "rootPath": "C:\\Users\\myuser\\AppData\\Roaming\\node\\node_modules\\sfdx-cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.0 (core)",
    "@oclif/plugin-commands 2.2.15 (core)",
    "@oclif/plugin-help 5.2.9 (core)",
    "@oclif/plugin-not-found 2.3.24 (core)",
    "@oclif/plugin-plugins 3.1.2 (core)",
    "@oclif/plugin-search 0.0.17 (core)",
    "@oclif/plugin-update 3.1.17 (core)",
    "@oclif/plugin-version 1.3.4 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.37 (core)",
    "@oclif/plugin-which 2.2.22 (core)",
    "apex 2.3.3 (core)",
    "auth 2.8.1 (core)",
    "community 2.3.1 (core)",
    "custom-metadata 2.1.25 (core)",
    "data 2.3.22 (core)",
    "deploy-retrieve 1.11.7 (core)",
    "info 2.6.19 (core)",
    "limits 2.3.18 (core)",
    "org 2.9.8 (core)",
    "packaging 1.19.0 (core)",
    "schema 2.3.12 (core)",
    "settings 1.4.11 (core)",
    "signups 1.4.21 (core)",
    "source 2.10.14 (core)",
    "telemetry 2.2.0 (core)",
    "templates 55.4.20 (core)",
    "trust 2.4.20 (core)",
    "user 2.3.17 (core)",
    "sfdmu 4.28.0 (user)",
    "sfdx-cli 7.205.6 (core)",
    "sfdx-essentials 2.12.0 (user)",
    "sfdx-git-delta 5.22.0 (user)",
    "sfdx-hardis 3.18.1 (user)",
    "sfpowerkit 4.2.13 (user)",
    "texei-sfdx-plugin 1.17.3 (user)"
  ]
}

Additional information

@Jojolam44 Jojolam44 added the investigating We're actively investigating this issue label Jun 21, 2023
@github-actions
Copy link

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.

@Jojolam44 Jojolam44 changed the title Failed to log to instance with "lightning" word in instance name Failed to login to instance with "lightning" word in instance name Jun 21, 2023
@github-actions github-actions bot added the validated Version information for this issue has been validated label Jun 21, 2023
@WillieRuemmele WillieRuemmele added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Jun 21, 2023
@git2gus
Copy link

git2gus bot commented Jun 21, 2023

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

@WillieRuemmele
Copy link
Member

Hi @Jojolam44 - I just confirmed the fixed, this will be availble in the nightly build tonight, latest-rc on wed/thurs and latest in 2 weeks

@shetzel
Copy link
Contributor

shetzel commented Jul 5, 2023

Closing this as it's fixed in latest releases

@shetzel shetzel closed this as completed Jul 5, 2023
@tecfu
Copy link

tecfu commented Oct 18, 2023

@shetzel Can you please state which version has been tested for a fix?

  • I see this issue in 2.13.9
  • Per your release notes 2.13.9 was published on October 18, 2023

I am seeing this issue in the following env:

@salesforce/cli/2.13.9 linux-x64 node-v18.15.0

Given:

  • That I run in docker
docker run -it salesforce/cli:latest-rc-slim
  • That I use the following command to authenticate
sfdx force:auth:device:login --instance-url https://company--md04.sandbox.lightning.force.com -d -a devhub --json

@shetzel
Copy link
Contributor

shetzel commented Oct 18, 2023

@tecfu - you're using a lightning domain, which is different from the OP in this issue, and should not be used as the instance-url. As part of the error message (in your case in the JSON) it should state:

Error (1): Invalid instance URL. It should NOT be a lightning domain.

Try this:

If you specify an --instance-url value, this value overrides the sfdcLoginUrl value in your sfdx-project.json file.

To specify a My Domain URL, use the format https://yourcompanyname.my.salesforce.com/.

To specify a sandbox, set --instance-url to https://mydomainname--sandboxname.sandbox.my.salesforce.com/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

4 participants