> For the complete documentation index, see [llms.txt](https://docs.defguard.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.defguard.net/support-1/troubleshooting-guides/mobile-client/android-failed-host-lookup-error.md).

# Android "Failed host lookup" error

When connecting to a location that uses an external OpenID provider, the Android app shows:

```
DioException [connection error]: The connection errored: Failed host lookup
```

<figure><img src="/files/bHUQJzchp1dAW9sx58XR" alt="" width="236"><figcaption></figcaption></figure>

This is caused by aggressive battery optimization on the Android device. When the app is in the background, the system restricts its network access, which breaks DNS resolution during the OpenID authentication flow.

### Fix

1. Go to **Settings** on your Android device.
2. Navigate to **Apps → App management → Defguard**.
3. Open **Battery usage**.
4. Enable **Allow background activity**.

The app will now retain network access while in the background during OpenID authentication.
