You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Model Name: Iphone 14
Software Version: 18.3.2
App version: 2025.2
Home Assistant Core Version: 2025.3.4
The official Home Assistant iOS app fails to connect when outside the local network via a Cloudflare Tunnel setup, despite successful access through web browsers (both desktop and mobile) under the same conditions. The app allows login with username and password, followed by a successful two-factor authentication (2FA) step where the code from the authenticator app is entered. Immediately after successfully submitting the 2FA code, the app displays the error: "The data couldn’t be read because it isn’t in the correct format." with Error Code: NSCocoaErrorDomain 3840. The app connects successfully when the iOS device is on the local Wi-Fi network.
To Reproduce
Set up a Home Assistant container and a cloudflared container on the same machine.
Configure a Cloudflare Tunnel to expose the Home Assistant instance to a public domain.
Ensure remote access to the Home Assistant instance via a web browser (both on desktop and a mobile device outside the local network) is working through the Cloudflare Tunnel, including successful 2FA if enabled in your browser setup.
Open the official Home Assistant iOS app while the iOS device is not connected to the local Wi-Fi network.
Enter the correct username and password on the login screen.
If 2FA is enabled, enter the correct code from your authenticator app on the subsequent screen.
Observe the error message: "The data couldn’t be read because it isn’t in the correct format." with Error Code: NSCocoaErrorDomain 3840 appearing immediately after successfully submitting the 2FA code.
Expected behavior
The Home Assistant iOS app should successfully connect to the Home Assistant instance when outside the local network via the Cloudflare Tunnel after entering the correct credentials and completing the 2FA process, similar to the successful web browser access. The user should be able to access the Home Assistant dashboard and control their devices.
Additional context
Home Assistant is running in a Docker container.
The cloudflared tunnel container is configured on the same machine as the Home Assistant container.
Accessing Home Assistant via a web browser (both desktop and mobile) through the Cloudflare Tunnel works without any issues when outside the local network, including successful 2FA if enabled.
The iOS app connects successfully when the device is on the local Wi-Fi network (using the local IP address or hostname).
The issue seems to occur specifically during the data loading phase after successful authentication and 2FA completion within the iOS app when connected remotely via the Cloudflare Tunnel.
The text was updated successfully, but these errors were encountered:
Thanks for reporting the issue, just to double check, when you say "2FA" you mean Home Assistant 2FA right (like in the image below)? Not another layer of protection from cloudflare, correct?
Model Name: Iphone 14
Software Version: 18.3.2
App version: 2025.2
Home Assistant Core Version: 2025.3.4
The official Home Assistant iOS app fails to connect when outside the local network via a Cloudflare Tunnel setup, despite successful access through web browsers (both desktop and mobile) under the same conditions. The app allows login with username and password, followed by a successful two-factor authentication (2FA) step where the code from the authenticator app is entered. Immediately after successfully submitting the 2FA code, the app displays the error: "The data couldn’t be read because it isn’t in the correct format." with Error Code: NSCocoaErrorDomain 3840. The app connects successfully when the iOS device is on the local Wi-Fi network.
To Reproduce
Set up a Home Assistant container and a cloudflared container on the same machine.
Configure a Cloudflare Tunnel to expose the Home Assistant instance to a public domain.
Ensure remote access to the Home Assistant instance via a web browser (both on desktop and a mobile device outside the local network) is working through the Cloudflare Tunnel, including successful 2FA if enabled in your browser setup.
Open the official Home Assistant iOS app while the iOS device is not connected to the local Wi-Fi network.
Enter the correct username and password on the login screen.
If 2FA is enabled, enter the correct code from your authenticator app on the subsequent screen.
Observe the error message: "The data couldn’t be read because it isn’t in the correct format." with Error Code: NSCocoaErrorDomain 3840 appearing immediately after successfully submitting the 2FA code.
Expected behavior
The Home Assistant iOS app should successfully connect to the Home Assistant instance when outside the local network via the Cloudflare Tunnel after entering the correct credentials and completing the 2FA process, similar to the successful web browser access. The user should be able to access the Home Assistant dashboard and control their devices.
Additional context
Home Assistant is running in a Docker container.
The cloudflared tunnel container is configured on the same machine as the Home Assistant container.
Accessing Home Assistant via a web browser (both desktop and mobile) through the Cloudflare Tunnel works without any issues when outside the local network, including successful 2FA if enabled.
The iOS app connects successfully when the device is on the local Wi-Fi network (using the local IP address or hostname).
The issue seems to occur specifically during the data loading phase after successful authentication and 2FA completion within the iOS app when connected remotely via the Cloudflare Tunnel.
The text was updated successfully, but these errors were encountered: