Nextcloud trying to sync when no internet is available.
- 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. Have a Nextcloud with many (10s of thousands / 100s of thousands) of files
2. Upgrade app to 3.30.6
3. Nextcloud tries to auto-sync *all* files (see #13872)
4. Disable both wifi *and* mobile data
5. Force stop and reopen app (or reboot phone)
6. See that Nextcloud is still trying to sync and giving 10s/100s of thousands of notification errors
7. If the number of files on Nextcloud is large enough, *the entire phone CPU will be consumed*. On my phone I was unable to open the settings page; I could only uninstall and reinstall the app. This obviously will vary by phone/tablet manufacturer and the number of files/notifications Nextcloud creates.
### Expected behaviour
Nextcloud should not being trying to sync when no internet is available. It may also be wise to have a "stop gap" where if X errors occur in Y seconds then the app pauses for Z seconds before restarting/continuing.
### Actual behaviour
Nextcloud still trying to two-way sync without data, giving thousands of notification errors.
### Android version
Android 14 (LineageOS 21)
### Device brand and model
Pixel 8
### Stock or custom OS?
Custom (explain in "additional information")
### Nextcloud android app version
3.30.6
### Nextcloud server version
30.0.4.1
### Using a reverse proxy?
No
### Android logs
_No response_
### Server error logs
```bash
Not submitted for length, repitition, and privacy, but apache contains thousands of lines like this:
<> - <> [02/Jan/2025:06:26:21 +0000] "PROPFIND /cloud/remote.php/dav/files/<>/<> HTTP/1.1" 207 14321 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.30.6
Nextcloud.log shows no errors.
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.