Error: invalid cilent id or redirect uri

I’m getting above error message in the app.

Setup:
hassio on RPI, v0.102.3, duckdns+letsencrypt, accessible from anywhere
hassio runs on a subnet of my home network.

Phone connected to same subnet wifi.
App can’t find home assistant instance, so asks for url.
I enter the duckdns-url (as suggested by the app)
App says

Blockquote
you’re about to give Home Assistant Android - Home Assistant access to your Home Assistant instance.
Logging in with Home Assistant Local.
Error: invalid client id or redirect url

and in Home Assistant, I get a notification

Login attempt failed
Login attempt or request with invalid authentication from 192.168.0.1

The IP in the notification is the router of my home network, to which the subnet is linked.

Any assistance is appreciated

I had the same problem on my Mac setup yesterday
I fixed it by adding certificates to python
im not sure how you do it on RPI but once I added the certificates to my python3 install it all worked on the applications after that :slightly_smiling_face:

Check if your hassio can do curl -v6 https://home-assistant.io, you likely have a broken ipv6 setup on your hands or another issue preventing hass to speak to the oauth2 endpoint.

Hi Jan, this is the result of running curl:

➜  /workspace curl -v6 https://home-assistant.io
*   Trying xxxx:xxxx:xx::xxxx:181f:443...
* TCP_NODELAY set
* Immediate connect fail for xxxx:xxxx:xx::xxxx:181f: Address not available
*   Trying xxxx:xxxx:xx::xxxx:191f:443...
* TCP_NODELAY set
* Immediate connect fail for xxxx:xxxx:xx::xxxx:191f: Address not available
* Closing connection 0
curl: (7) Couldn't connect to server

Your IPv6 setup is broken. Might be as easy as restarting modem, router and hass host (in that order) to fix or you may need to figure out how to deactivate IPv6 on the hass host.

Sorry, Jan, network n00b here…
I think I need some more explanation… what does that mean, that my IPv6 setup is “broken”, how did you know what curl statement I had to run? And how do I determine what the best next steps are?
Thanks!

You’re not the first to run into this problem. What happens is your ha tries to access the web and what it does try is to use ipv6 which is not successful (as shown via the curl command).

Either you don’t have IPv6 from your isp or your home network is misconfigured somewhere or any number of reasons. It’s not quite possible for me to diagnose this for you. You can google how to disable ipv6 on your OS and that usually “fixes” the issue. Or fix the IPv6 on your network so it works. Or wait until probably the next HA version when this error will likely have been remedied by skipping the redirect url check.

Thanks Jan
I’ll be using the Ariela android app for now, as I did get that one to work