ruimarinho / gsts

Obtain and store AWS STS credentials to interact with Amazon services by authenticating via G Suite SAML.
MIT License
219 stars 38 forks source link

FYI: Workaround for AWS Cli V2 #33

Closed nikking closed 4 years ago

nikking commented 4 years ago

Just an FYI in case others run into the same issue. I was running into an issue with the V2 AWS CLI, which I was able to resolve by unsetting LD_LIBRARY_PATH in credential_process.

Workaround

[profile default]
region = us-east-1
credential_process = bash -c "unset LD_LIBRARY_PATH; gsts --aws-role-arn arn:aws:iam::1234:role/Admin --sp-id 1234--idp-id       AB12--username foo@bar.com --aws-profile default --json"

Error

Error when retrieving credentials from custom-process: Error: Failed to launch the browser process!
/home/nik/.nvm/versions/node/v14.4.0/lib/node_modules/gsts/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: /usr/local/aws-cli/v2/2.0.34/dist/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libcups.so.2)
/home/nik/.nvm/versions/node/v14.4.0/lib/node_modules/gsts/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: /usr/local/aws-cli/v2/2.0.34/dist/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libgio-2.0.so.0)
/home/nik/.nvm/versions/node/v14.4.0/lib/node_modules/gsts/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: /usr/local/aws-cli/v2/2.0.34/dist/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libpng16.so.16)
/home/nik/.nvm/versions/node/v14.4.0/lib/node_modules/gsts/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: /usr/local/aws-cli/v2/2.0.34/dist/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libpng16.so.16)
/home/nik/.nvm/versions/node/v14.4.0/lib/node_modules/gsts/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: symbol lookup error: /lib/x86_64-linux-gnu/libpng16.so.16: undefined symbol: inflateReset2, version ZLIB_1.2.3.4

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

    at onClose (/home/nik/.nvm/versions/node/v14.4.0/lib/node_modules/gsts/node_modules/puppeteer/lib/Launcher.js:750:14)
    at Interface.<anonymous> (/home/nik/.nvm/versions/node/v14.4.0/lib/node_modules/gsts/node_modules/puppeteer/lib/Launcher.js:739:50)
    at Interface.emit (events.js:327:22)
    at Interface.EventEmitter.emit (domain.js:485:12)
    at Interface.close (readline.js:424:8)
    at Socket.onend (readline.js:202:10)
    at Socket.emit (events.js:327:22)
    at Socket.EventEmitter.emit (domain.js:485:12)
    at endReadableNT (_stream_readable.js:1224:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
ruimarinho commented 4 years ago

Thank you @nikking! Added a note on the README in case it's helpful for others in the future (922f8ac).