question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

save-failure-html always gives TypeError

See original GitHub issue

I always get this when trying to use the --save-failure-html argument:

$ aws-google-auth --role-arn arn:aws:iam::666666666:role/sso/sso-xxxxxxxx --duration 43200 --profile xx-xxxx --keyring --save-failure-html
Failed to import U2F libraries, U2F login unavailable. Other methods can still continue.
Open the Google App, and tap 'Yes' on the prompt to sign in ...
SAML lookup failed, storing failure page to 'saml.html' to assist with debugging.
Traceback (most recent call last):
  File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/google.py", line 284, in parse_saml
    saml_element = parsed.find('input', {'name': 'SAMLResponse'}).get('value')
AttributeError: 'NoneType' object has no attribute 'get'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/max.williams/Library/Python/3.6/bin/aws-google-auth", line 11, in <module>
    sys.exit(main())
  File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/__init__.py", line 232, in main
    cli(cli_args)
  File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/__init__.py", line 66, in cli
    process_auth(args, config)
  File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/__init__.py", line 192, in process_auth
    saml_xml = google_client.parse_saml()
  File "/Users/max.williams/Library/Python/3.6/lib/python/site-packages/aws_google_auth/google.py", line 290, in parse_saml
    out.write(self.session_state.text.encode('utf-8'))
TypeError: write() argument must be str, not bytes

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
stevemac007commented, Mar 27, 2019

Merging the fix to master - it looks like it was a defect with python3 and the save flag fix.

0reactions
max-rocket-internetcommented, Jul 2, 2019

This was fixed. Thanks @stevemac007!

Read more comments on GitHub >

github_iconTop Results From Across the Web

The aws-google-auth from cevoaustralia - Coder Social Home
Provides AWS STS credentials based on Google Apps SAML SSO auth (what a jumble!) ... --save-failure-html Write HTML failure responses to file for ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found