home-assistant / iOS

:iphone: Home Assistant for Apple platforms
https://companion.home-assistant.io
Other
1.59k stars 311 forks source link

Can’t log into HA App on iOS - NSURLErrorDomain -1003 #2050

Open itkama opened 2 years ago

itkama commented 2 years ago

iOS device model, version and app version

Model Name: iPhone 11 Pro Software Version: 14.8.1 App version: Newest?

Home Assistant Core Version core-2021.12.10

Describe the bug Hello there, So far I only used the Android App without any problems. But now I need to integrate three users with iphones. So far so good. The App found the IP used and they could login. Now I switched over the instance to use Let’s Encrypt and the “NGINX Home Assistant SSL proxy”. On android I just switched over from the IP to the now used URL without any problems. On iOS I get an “NSURLErrorDomain -1003” error and can’t login. The URL (and it’s DNS) is only available within a specific network that all these devices are in. Using Safari I can easily get to the website and also login. So what is the app doing differently?

To Reproduce

Expected behavior

Screenshots

image

Additional context

2022-01-23_12.45.22+0100.logs.zip

zacwest commented 2 years ago

Try opening this full URL in Safari. Does it work?

https://control.maschinendschungel.de/auth/authorize?response_type=code&client_id=https://home-assistant.io/iOS&redirect_uri=homeassistant://auth-callback

itkama commented 2 years ago

Sorry for the delay, always takes some time until I can get my hand on an iPhone. The links loads without any problems: image

AbidingOhmsLaw commented 2 years ago

I had a similar issue with using the iOS app but not with the Let’s Encrypt. I was having this error because the issuing CA was not trusted by the iOS device, Let’s Encrypt did have a root CA cert expire about 6mo ago. Normally the root CA store is updated when iOS is updated so check to see if you need an update to the iOS. Let’s Encrypt says you need iOS 10 or greater.

https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

itkama commented 2 years ago

Hi mppkll, will try to see if that can help!

ChrLipp commented 2 years ago

I have exactly the same issues. Every now and then, the application cannot log in. I have configured an internal and an external URL, currently I am connected with my WiFi (which accesses the server with http, so no certificates are used). Still: -1003

When I query my name server (Synology - the same is used on the phone) on my Windows machine with the server name, it can be resolved.

10 minutes later everything works again. I am able to open doors with the app, the app loves to stop working when I am outside and want to enter my house :-)

franz82 commented 2 years ago

Hi all, same issue here:

image

Safari can browse HA without issues:

image

Any hints? Thanks, -f

richard-scott commented 2 years ago

I have the same issue, but mine seems to be DNS caching of the IP for the hostname that HA is running on. I have split DNS so on WiFi at home, or 4G Mobile the same HA hostname has a different IP. Strangely enough, if I connect to HA via 4G, and then flip over to WiFi it still works, but if I open the app while on WiFi it doesn't connect.

kevinpainchaud commented 2 months ago

I have the same problem on macOS and iOS apps :/