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

Log if aiohttp hits error during IndieAuth #21780

merged 2 commits into from Mar 8, 2019


None yet
5 participants
Copy link

commented Mar 8, 2019

So a user came to me the other day with a very interesting bug around IndieAuth. They were trying to auth with the iOS app but kept getting invalid client_id. I helped them through adding some debug logging around IndieAuth. We finally determined that the client_id lookup was entirely failing most likely due to an IPv6 issue. The error was getting eaten by this except-pass though.

This PR adds a log error if we hit an error during redirect_uri lookup.

Thanks to Yeitso for identifying this issue and working with me to determine where exactly it happened.

@robbiet480 robbiet480 requested a review from home-assistant/core as a code owner Mar 8, 2019

@ghost ghost assigned robbiet480 Mar 8, 2019

@ghost ghost added the in progress label Mar 8, 2019


balloob approved these changes Mar 8, 2019


This comment has been minimized.

Copy link

commented Mar 8, 2019

Yeitso here, the issue was related to my installation.
I was using macOS with python3.6 without a virtualenv and had forgotten to run the file:

/Applications/Python\ 3.6/Install\ Certificates.command

Python3.6 does not have any root certificates by default on macOS so running that command after installation is essential.

So learn from my mistake and either install via Homebrew (this installs the certificates automaticlly) or if you install python3.6 manually. Run that command :)

Add content of redirect_url into error log
Co-Authored-By: awarecan <>

@ghost ghost assigned awarecan Mar 8, 2019


balloob approved these changes Mar 8, 2019

@balloob balloob merged commit 31a4187 into dev Mar 8, 2019

9 of 10 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Hound No violations found. Woof!
Python 3.5 - lints Python 3.5 - lints
Python 3.5 - tests Python 3.5 - tests
Python 3.6 - tests Python 3.6 - tests
Python 3.7 - tests Python 3.7 - tests
Pyton 3.5 - typing Pyton 3.5 - typing
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/push The Travis CI build passed
coverage/coveralls Coverage increased (+0.002%) to 92.753%

@ghost ghost removed the in progress label Mar 8, 2019

@delete-merged-branch delete-merged-branch bot deleted the log-indieauth-failings branch Mar 8, 2019

mxworm added a commit to mxworm/home-assistant that referenced this pull request Mar 9, 2019

Merge branch 'dev' into current
* dev: (82 commits)
  Add ClearPass Policy Manger device tracker (home-assistant#21673)
  Better cloud check (home-assistant#21875)
  Bump quirks for ZHA and handle resulting battery % change (home-assistant#21869)
  Only commit if need. (home-assistant#21848)
  Fix authorization header in cors (home-assistant#21662)
  Introduce Entity.async_write_ha_state() to not miss state transition (home-assistant#21590)
  Fix TypeError (home-assistant#21734)
  Update to read current humidity for US Thermostats (home-assistant#21728)
  Override http.trusted_networks by auth_provider.trusted_networks (home-assistant#21844)
  mobile_app improvements (home-assistant#21607)
  Fixed a misspelling in a docstring (home-assistant#21846)
  Update dependencies to receive data on webhook callbacks (home-assistant#21838)
  Fix config entry exception in Ambient PWS (home-assistant#21836)
  Updated to pyeconet 0.0.10 (home-assistant#21837)
  fix empty TOPIC_BASE issue (home-assistant#21740)
  Synology sensor quick return if attr is null (home-assistant#21709)
  Add support for Cisco Mobility Express (home-assistant#21531)
  Log if aiohttp hits error during IndieAuth (home-assistant#21780)
  Resolve auth_store loading race condition (home-assistant#21794)
  Load logger and system_log components as soon as possible (home-assistant#21799)

@balloob balloob referenced this pull request Mar 20, 2019


0.90.0 #22216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.