topicuskeyhub / aws-keyhub Goto Github PK
View Code? Open in Web Editor NEWLogin on AWS cli via KeyHub
License: Apache License 2.0
Login on AWS cli via KeyHub
License: Apache License 2.0
Usually on the first login of the day, the following error is thrown. Does not occur the rest of the day, until next morning.
at Promise (/Users/xxxx/.npm-packages/lib/node_modules/aws-keyhub/node_modules/puppeteer/lib/Connection.js:202:56)
at new Promise (<anonymous>)
at CDPSession.send (/Users/xxxx/.npm-packages/lib/node_modules/aws-keyhub/node_modules/puppeteer/lib/Connection.js:201:12)
at ExecutionContext.evaluateHandle (/Users/xxxx/.npm-packages/lib/node_modules/aws-keyhub/node_modules/puppeteer/lib/ExecutionContext.js:73:75)
at _documentPromise._contextPromise.then (/Users/xxxx/.npm-packages/lib/node_modules/aws-keyhub/node_modules/puppeteer/lib/FrameManager.js:345:38)
at process._tickCallback (internal/process/next_tick.js:68:7)
message: 'Protocol error (Runtime.evaluate): Target closed.' }
(node:2033) UnhandledPromiseRejectionWarning: Error: Protocol error: Connection closed. Most likely the page has been closed.
at assert (/Users/xxxx/.npm-packages/lib/node_modules/aws-keyhub/node_modules/puppeteer/lib/helper.js:282:11)
at Page.close (/Users/xxxx/.npm-packages/lib/node_modules/aws-keyhub/node_modules/puppeteer/lib/Page.js:921:5)
at exit (/Users/xxxx/.npm-packages/lib/node_modules/aws-keyhub/src/login.js:194:20)
at Object.login (/Users/xxxx/.npm-packages/lib/node_modules/aws-keyhub/src/login.js:68:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:2033) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:2033) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
By adding such a security token, the Puppeteer flow breaks, as the headless Chromium instance will ask for confirmation by security key rather than verification token.
The error looks as follows:
aws-keyhub
Error: verification code field not found
at askAndFillVerificationCodeIfFieldExists (/Users/eriksteenman/.nvm/versions/node/v15.14.0/lib/node_modules/aws-keyhub/src/login.js:150:15)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async Object.login (/Users/eriksteenman/.nvm/versions/node/v15.14.0/lib/node_modules/aws-keyhub/src/login.js:68:17)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.