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

Intermittent INVALID_LOGIN when accessing a newly created scratch org #720

Open
shrkmz opened this issue Mar 19, 2024 · 2 comments
Open

Comments

@shrkmz
Copy link

shrkmz commented Mar 19, 2024

In my CI process, I create a scratch org and immediately after I use this module to authenticate and get an access token using the username, password, session_token and domain. Intermittently, I receive an INVALID_LOGIN message.

This is more of a salesforce-side issue where DNS propagation (or some record propagation) takes time to complete and the scratch org isnt available except via the direct MyDomain URL for a while. Attempting to access it using the default front door https://test.salesforce.com yields INVALID_LOGIN errors.

To resolve this on my end, I am using these couple of lines of edits in login.py on line 220:

    if instance_url is not None:
        soap_url = f'{instance_url}/services/Soap/u/{sf_version}'
    else:
        soap_url = f'https://{domain}.salesforce.com/services/Soap/u/{sf_version}'

This allows me to pass the direct URL to the scratch org for a significantly higher success rate. Would you consider incorporating this change into the package?

@panos1b
Copy link

panos1b commented Apr 7, 2024

Good Morning.
Do you mind if I work on this? Clear up the code, add a custom scratch domain in as an argument and update the documentation; then make a pull request? Or are you going to.

@shrkmz
Copy link
Author

shrkmz commented Apr 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants