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

Segementation faults on Apple MacBook Pro M1 #1139

Closed
kbarlowgw opened this issue Oct 9, 2023 · 5 comments
Closed

Segementation faults on Apple MacBook Pro M1 #1139

kbarlowgw opened this issue Oct 9, 2023 · 5 comments

Comments

@kbarlowgw
Copy link
Contributor

Hiyas,

I've used homebrew to install saml2aws on an Apple MacBook Pro (M1 chip) and keep receiving the following segmentation fault:

`Using IdP Account default to access Browser ******************************************************
Authenticating as @****** ...
INFO[0001] opening browser URL="******************************************************" provider=browser
INFO[0002] waiting ... provider=browser
INFO[0032] clean up browser provider=browser
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x60 pc=0x104e1e8d8]

goroutine 1 [running]:
github.com/versent/saml2aws/v2/pkg/provider/browser.glob..func1({0x1054fcc98, 0x14000548000}, 0x140000b04d0)
github.com/versent/saml2aws/v2/pkg/provider/browser/browser.go:98 +0x1b8
github.com/versent/saml2aws/v2/pkg/provider/browser.(*Client).Authenticate(0x1400000e7c8, 0x140000b04d0)
github.com/versent/saml2aws/v2/pkg/provider/browser/browser.go:78 +0x214
github.com/versent/saml2aws/v2/cmd/saml2aws/commands.Login(0x14000020f00)
github.com/versent/saml2aws/v2/cmd/saml2aws/commands/login.go:105 +0x458
main.main()
github.com/versent/saml2aws/v2/cmd/saml2aws/main.go:191 +0x6ddc`

Is there anyway to remedy this? It was working fine on my old macbook which had intel hardware... do I have to build from scratch?

@kbarlowgw
Copy link
Contributor Author

kbarlowgw commented Oct 13, 2023

As noted in the other post on this issue, this is indeed hitting the 30s timeout in the playwrite API https://playwright.dev/docs/api/class-page#page-wait-for-request.

I was able to apply a patch locally and can confirm it fixes this issue:

	var timeout float64 = 300000
	r, _ := page.WaitForRequest(signin_re, playwright.PageWaitForRequestOptions{Timeout: &timeout})

I should add the steps to reproduce were to use the browser option to perform a login:

saml2aws login --download-browser-driver --skip-prompt

against an Okta instance. (Probably doesn't need to be okta specifically given the error.)

@bsamartins
Copy link

Is there a fix for this?
Getting the same issue with another provider

[signal SIGSEGV: segmentation violation code=0x2 addr=0x60 pc=0x1009ca8e8]

goroutine 1 [running]:
github.com/versent/saml2aws/v2/pkg/provider/browser.glob..func1({0x1010a8c98, 0x14000496000}, 0x140001c24d0)
	github.com/versent/saml2aws/v2/pkg/provider/browser/browser.go:98 +0x1b8
github.com/versent/saml2aws/v2/pkg/provider/browser.(*Client).Authenticate(0x140001967b0, 0x140001c24d0)
	github.com/versent/saml2aws/v2/pkg/provider/browser/browser.go:78 +0x214
github.com/versent/saml2aws/v2/cmd/saml2aws/commands.Login(0x140001b6e80)
	github.com/versent/saml2aws/v2/cmd/saml2aws/commands/login.go:105 +0x458
main.main()
	github.com/versent/saml2aws/v2/cmd/saml2aws/main.go:191 +0x6ddc

@kbarlowgw
Copy link
Contributor Author

I've created a pull request to apply my fix - a fixed 5m timeout: #1153

@gliptak
Copy link
Contributor

gliptak commented Nov 14, 2023

is this fixed in current build? artifacts.zip at bottom of https://github.com/Versent/saml2aws/actions/runs/6855210834?pr=1162

@mapkon
Copy link
Contributor

mapkon commented Apr 17, 2024

This was fixed

@mapkon mapkon closed this as completed Apr 17, 2024
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

4 participants