Android client does not reconnect after IMAP backend outage
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
### ⚠️ Before posting ⚠️
- [X] This is a **bug**, not a question or an enhancement.
- [X] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Steps to reproduce
1. Setup server using an IMAP backend for logins
2. Setup Android app to connect with server
3. Have IMAP server outage long enough for Android app to notice
4. Try using Android client after server back on line
5. Android client will be reset, ready for a new server connection to be made (see image in actual behaviour below)
### Expected behaviour
After IMAP backend is available, Android client should reconnect to server with previously provided credentials
### Actual behaviour
After IMAP backend is available, Android client asks for connection details as if it is a fresh install:

### Android version
14
### Device brand and model
Samsung Galaxy A15 5G (SM-A156E/N)
### Stock or custom OS?
Stock
### Nextcloud android app version
3.29.2
### Nextcloud server version
29.0.7
### Using a reverse proxy?
Yes
### Android logs
[logcatOutput2.txt](https://github.com/user-attachments/files/17122877/logcatOutput2.txt)
### Server error logs
```bash
[user_external] Error: ERROR: IMAP Login failed via curl: Login denied
POST /index.php
from 10.71.74.206 by -- at 25 Sept 2024, 10:07:24 am
```
### Additional information
I have encountered this issue for years, across many versions of the app, server, android version, phone brand, etc. Previously I always fixed it for my family users. But now that some of them are dispersing I'm reporting it so that it is correctly handled by the app for them.
Contributor guide
Assessment
This issue has not been assessed yet.