1

I have trawled the net on this one and cannot find a resolution.

I have deployed an EC2 instance from a AWS RHEL 8 AMI.

I have installed all the pre-requisites for aws-azure-login but cannot connect to my accounts over SAML. (https://github.com/sportradar/aws-azure-login)

The config file has been created with parameters. When running aws-azure-login it returns the username, I press enter and then it hangs for minutes and returns the following error: Unable to recognize page state! A screenshot has been dumped to aws-azure-login-unrecognized-state.png. If this problem persists, try running with --mode=gui or --mode=debug

After running in debug i get the following output:

Logging in with profile 'default'... Using AWS SAML endpoint https://signin.aws.amazon.com/saml Error: Failed to launch the browser process! [13527:13527:1220/050718.762168:ERROR:browser_main_loop.cc(1409)] Unable to open X display.

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

at onClose (/usr/lib/node_modules/aws-azure-login/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
at Interface.<anonymous> (/usr/lib/node_modules/aws-azure-login/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
at Interface.emit (events.js:412:35)
at Interface.emit (domain.js:475:12)
at Interface.close (readline.js:530:8)
at Socket.onend (readline.js:254:10)
at Socket.emit (events.js:412:35)
at Socket.emit (domain.js:475:12)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)

Node version = v14.18.2

Any pointers would be greatly appreciated.

Omar
  • 25
  • 2
  • 6

4 Answers4

0

Note: on Linux you will likely need to disable the Puppeteer sandbox or Chrome will fail to launch:

aws-azure-login --no-sandbox

If not check Unable to open X display when trying to run google-chrome on Centos (Rhel 7.5)

Sully
  • 14,672
  • 5
  • 54
  • 79
0

I bumped into same issue on CentOS7

aws-azure-login --profile <profile_name> --no-prompt --no-sandbox --enable-chrome-network-service --no-verify-ssl

worked for me, hope I helped anyone

Yossi
  • 1
  • 1
0

I was getting the same error but then I end up recreating a new profile name. This time, I made sure that my profile name was one word, all lower case, and only characters was used. Example: automation

  • 1
    This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/30924458) – theherk Feb 01 '22 at 19:52
0

First try with GUI and see you are able to login using following command

aws-azure-login --mode gui
ravthiru
  • 8,878
  • 2
  • 43
  • 52