Versent / saml2aws

CLI tool which enables you to login and retrieve AWS temporary credentials using a SAML IDP

Home Page:https://github.com/Versent/saml2aws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

saml2aws login is broken for me

rijintv opened this issue · comments

0

I've been using saml2aws for a while now, but recently, it broke for me. Now, when I run the command listed bellow, I get the following error:

$ saml2aws login --force --download-browser-driver
Using IdP Account default to access Browser https://aws-account-address/
To use saved password just hit enter.
? Username me@me.com
? Password **************

Authenticating as me@me.com ...
Downloading driver to /Users/me/Library/Caches/ms-playwright-go/1.20.0-beta-1647057403000
Downloaded driver successfully

/Users/me/Library/Caches/ms-playwright-go/1.20.0-beta-1647057403000/package/lib/cli/cli.js:263
    require(playwrightTestPackagePath).addTestCommand(_commander.program);
                                       ^

TypeError: require(...).addTestCommand is not a function
    at Object.<anonymous> (/Users/me/Library/Caches/ms-playwright-go/1.20.0-beta-1647057403000/package/lib/cli/cli.js:263:40)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47
Error authenticating to IdP.: could not install driver: could not install browsers: could not install browsers: exit status 1

I removed the sensitive bits, and I've confirmed that I'm using the right web address and credentials and such for the AWS authentication.

Note: This same issue has been opened and documented here.
#1098

And, another note: I've downloaded the newest version (2.36.11) and the issue seems to have been resolved. I'm going to close out #1098 .

@rijintv Are you still experiencing the issue? has using a newer version helped?

HI @tinaboyce Thanks for the update, I can login now, the issue is resolved,
Thanks a-lot
Rijin

The below commands resovled my issue

brew upgrade saml2aws
saml2aws login --download-browser-driver

Let me know if this should be created as a second issue, but, we're now seeing this error, once every three or four runs:

INFO[0021] waiting ...                                   provider=browser
INFO[0051] clean up browser                              provider=browser
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x10049efa7]
 
goroutine 1 [running]:
github.com/versent/saml2aws/v2/pkg/provider/browser.glob..func1({0x100b93a80, 0xc0001a6140}, 0xc00012e4d0)
        github.com/versent/saml2aws/v2/pkg/provider/browser/browser.go:98 +0x207
github.com/versent/saml2aws/v2/pkg/provider/browser.(*Client).Authenticate(0xc000012c78, 0xc00012e4d0)
        github.com/versent/saml2aws/v2/pkg/provider/browser/browser.go:78 +0x287
github.com/versent/saml2aws/v2/cmd/saml2aws/commands.Login(0xc000024f00)
        github.com/versent/saml2aws/v2/cmd/saml2aws/commands/login.go:105 +0x610
main.main()
        github.com/versent/saml2aws/v2/cmd/saml2aws/main.go:191 +0x7668

This command occasionally seems to fix it, but not always:
go run github.com/playwright-community/playwright-go/cmd/playwright@v0.3500.0 install --with-deps