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

Protocol error/socket hang up when trying to login #215

Closed
trygveaa opened this issue Nov 10, 2021 · 3 comments
Closed

Protocol error/socket hang up when trying to login #215

trygveaa opened this issue Nov 10, 2021 · 3 comments

Comments

@trygveaa
Copy link

trygveaa commented Nov 10, 2021

I've installed and configured aws-azure-login, but when trying to run it (without any options) I get:

Logging in with profile 'default'...
Using AWS SAML endpoint https://signin.aws.amazon.com/saml
Error: Protocol error (Target.activateTarget): Session closed. Most likely the page has been closed.
    at CDPSession.send (/home/trygve/.npm-global/lib/node_modules/aws-azure-login/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:208:35)
    at Page._screenshotTask (/home/trygve/.npm-global/lib/node_modules/aws-azure-login/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1927:28)
    at /home/trygve/.npm-global/lib/node_modules/aws-azure-login/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1924:62

If I run it with --mode gui it prints an ErrorEvent with the message socket hang up.

Full output
Logging in with profile 'default'...
Using AWS SAML endpoint https://signin.aws.amazon.com/saml
ErrorEvent {
  target: WebSocket {
    _events: [Object: null prototype] { open: [Function], error: [Function] },
    _eventsCount: 2,
    _maxListeners: undefined,
    _binaryType: 'nodebuffer',
    _closeCode: 1006,
    _closeFrameReceived: false,
    _closeFrameSent: false,
    _closeMessage: '',
    _closeTimer: null,
    _extensions: {},
    _protocol: '',
    _readyState: 3,
    _receiver: null,
    _sender: null,
    _socket: null,
    _bufferedAmount: 0,
    _isServer: false,
    _redirects: 0,
    _url: 'ws://127.0.0.1:41805/devtools/browser/ff657660-58f3-4c7f-bb5e-10f7fa7757c4',
    _req: null,
    [Symbol(kCapture)]: false
  },
  type: 'error',
  message: 'socket hang up',
  error: Error: socket hang up
      at connResetException (internal/errors.js:639:14)
      at Socket.socketOnEnd (_http_client.js:499:23)
      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) {
    code: 'ECONNRESET'
  }
}

I'm running an up to date Arch Linux with nodejs-lts-fermium (so node v14.18.1, but I also tried node v16.11.1 and get the same) and I have configured kernel.unprivileged_userns_clone=1.

@trygveaa
Copy link
Author

I see that I get this issue with puppeteer outside aws-azure-login too, so I'll close this. It seems to be this issue: puppeteer/puppeteer#7455

@luismramirezr
Copy link

hey @trygveaa were you able to solve this?

@trygveaa
Copy link
Author

@luismramirezr: Yes, as mentioned here it works with puppeteer >= 12.0.0.

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