3

Can't connect any org under Linux Mint via sfdx force:auth:web:login
Neither via sfdx force:auth:web:login -r https://test.salesforce.com -a foo
nor sfdx force:auth:web:login -r https://foo.my.salesforce.com -a foo
nor sfdx force:auth:web:login -r https://cs100.salesforce.com -a foo
Browser opens --> username/pw --> …foo.my.salesforce.com/setup/secur/RemoteAccessAuthorizationPage.apexp …
I'm redirected to the RemoteAccessAuthorizationPage and there I'm stuck in a white screen.

On refresh Firefox gives me:
OAUTH_APPROVAL_ERROR_GENERIC : An unexpected error has occured during authentication. Please try again.

And Brave:
localhost didn’t send any data. ERR_EMPTY_RESPONSE

Same command on Mac OS works without any issues, org authenticated after seconds.
So I think it is an issue on the Linux machine.

This is what I've tried already:

  • turned off firewall on device
  • changed default browser
  • cleared browser chach
  • disabled pihole dns server
  • connected via different network (mobile)
  • tried test.salesforce, cs100.salesforce, mydomain.salesforce

    The org I'm trying to connect right now is a Sandbox. But same behaviour with dev or prod.
    There I've used a workaround via sfdx force:auth:device:login – but https://login.salesforce.com/setup/connect isn't working with a sandbox and neither is https://test.salesforce.com/setup/connect.

    Port 1717 seams to open up correctly on the command:
$ netstat -tulpn
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 xxx.x.x.x:1717          0.0.0.0:*               LISTEN      11880/node 

Any ideas what the problem is and how to overcome it?
4
  • 2
    what is your sfdx version ?
    – Badbaxx
    Jan 30, 2021 at 12:06
  • sfdx-cli/7.84.2-a2868a68d5 linux-x64 node-v12.18.3
    – Heiko
    Jan 30, 2021 at 14:23
  • @Badbaxx I've updated auth with sfdx plugins:install auth@latest it on v1.4.7.
    – Heiko
    Jan 30, 2021 at 14:25
  • It could be related to that case : github.com/forcedotcom/cli/issues/767
    – Badbaxx
    Jan 30, 2021 at 15:54

3 Answers 3

2

I was able to use OP's workaround in a Sandbox with the instanceurl option:

sfdx force:auth:device:login --instanceurl https://test.salesforce.com --setdefaultusername

I also used a "my" domain successfully.

1

same with sfdx-cli/7.82.1-0 linux-x64 node-v10.19.0, installed with npm, I install a new Ubuntu 20.04.1 LTS, visual studio , sfdx cli, chrome(firefox never works), and works fine. the link of @Badbaxx , its very useful , i resolved downgrade using sudo npm -g i sfdx-cli@7.74.1 . The problem i think its there.

1

I wasn't able to downgrade, was running into an other error there. I've tried login via myDomain and device code without success. My setup was maybe special, dev org created from isv instance .. wasn't trying to hard to fix this as it was for personal testing only.

Anyway, I've just updated my Salesforce CLI to version 7.91.0-6a6ed69ebe – and everything is working as expected again.

So if anyone runs into the same issue again and is under version 7.91, I recommend an upgrade instead of a downgrade.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.