ruimarinho / gsts

Obtain and store AWS STS credentials to interact with Amazon services by authenticating via G Suite SAML.
MIT License
212 stars 37 forks source link

ERR_CONNECTION_CLOSED #63

Closed heydonovan closed 1 year ago

heydonovan commented 2 years ago

We have a user on macOS Monterey that is unable to initiate the headless chrome browser:

$ gsts --version
4.0.1
$ gsts --clean --idp-id=REDACTED --sp-id=REDACTED --verbose
ℹ Cleaning directory /Users/REDACTED/Library/Application Support/gsts
ℹ Attempting to retrieve session expiration credentials
ℹ Credentials file does not exist at /Users/REDACTED/.aws/credentials
ℹ Allowing request to "https://accounts.google.com/o/saml2/initsso?idpid=REDACTED&spid=REDACTED&forceauthn=false"
ℹ Request to "https://accounts.google.com/o/saml2/initsso?idpid=REDACTED&spid=REDACTED&forceauthn=false" has failed
ℹ An error ocurred while browsing to the initsso page page.goto: net::ERR_CONNECTION_CLOSED at https://accounts.google.com/o/saml2/initsso?idpid=REDACTED&spid=REDACTED&forceauthn=false
=========================== logs ===========================
navigating to "https://accounts.google.com/o/saml2/initsso?idpid=REDACTED&spid=REDACTED&forceauthn=false", waiting until "load"
============================================================
    at /usr/local/Cellar/gsts/4.0.1/libexec/lib/node_modules/gsts/index.js:349:32 {
  name: 'Error'
}

Let me know if any additional logs are needed, that URL loads fine in a regular browser.

ruimarinho commented 1 year ago

@heydonovan can you try with --engine=firefox and see if it's still an issue? I suspect a problem with HTTPS and some versions of Chromium. You can try uninstalling and installing v4.1.0 to fetch the latest playwright version as well.

ruimarinho commented 1 year ago

A new major version will be released soon (based on https://github.com/ruimarinho/gsts/pull/82) so you may want to give that a try.