Nextcloud download issue
Hey everyone,
I'm hitting a wall with a very specific Nextcloud issue on my self-hosted setup and need some advanced eyes on it. The Nextcloud web interface works flawlessly (both desktop and mobile browser can download files perfectly), but the Nextcloud Android app completely refuses to download files, while paradoxically being able to upload its own app logs.
- The Setup & Environment
Server OS: Ubuntu/Debian based Linux Mint
Deployment: Docker / Docker Compose (nextcloud-app-1, nextcloud-db-1)
Networking: Accessing remotely via a Tailscale VPN
Nextcloud Version: latest i can run
-Timeline & Trigger Events
The server was deployed on this hardware (Acer laptop) and was working fine initially.
I downloaded and enabled additional apps directly through the WebUI, specifically Collabora Online (Built-in CODE) and Whiteboard.
During this process, I encountered application/database ID mismatch issues which forced me to manually skip IDs/app-validation flags to successfully complete the Nextcloud upgrade.
Shortly after these application upgrades and database schema adjustments, the Android client must have broke down.
-What the Nextcloud Android App Logs Show
I exported the app logs immediately after a failed download attempt, and noticed a few critical errors:
The WebDAV/Download Workers fail: The worker initializes a download stream for files (e.g., a .docx university document), but throws an immediate execution exception.
HTTP 404 on Assets: The app is repeatedly throwing 404 Not Found when attempting to fetch previews and thumbnails (/core/preview), despite the file existing on disk.
The log shows the app repeatedly initializing under an "anonymous@nohost" scheme before transitioning to the authenticated user, indicating a possible token/handshake fragmentation error as far i can guess.
Network Eligibility-> Logs throw a ConnectivityServiceImpl; cannot check network status, connectivity is not eligible warning when parsing the Tailscale connection.
❌️ Everything I've Tried So Far (That didn't work at the end)
i have spent hours debugging the server-side logic and verified the actual data is healthy, ruling out basic permission/storage errors:
File Cache & Storage Verification: Ran php occ files:scan --all. Nextcloud successfully indexes all 599 files with 0 errors. A curl request inside the server terminal pulls the file via WebDAV perfectly.
Database Clears: Purged oc_bruteforce_attempts, oc_ratelimit_entries, and dropped the oc_filecache table for the user before rescanning to regenerate clean internal IDs.
Session Purges: Executed php occ user:auth-tokens:delete to force-kill all active security tokens.
Config.php Tweaks: * Explicitly set overwritehost and overwrite.cli.url to match the Tailscale IP and port exactly.
Whitelisted the Tailscale subnet: 'auth.bruteforce.whitelist' => array('IP')
Added Docker gateways to trusted_proxies.
Client-Side Wipes: Performed multiple full uninstalls, deep cleared Android Storage/Cache, and disabled Android Private DNS.
❓ The Problem
If curl can pull the file from the WebDAV endpoint and the server is perfectly healthy, why is the Android client specifically failing with an unhandled exception or rate-limiting error?
Did the Collabora/Whiteboard integration inject database or middleware changes that break raw HTTP data streams to mobile clients? Is Android aggressively blocking the internal download engine over an unencrypted non-standard Tailscale port (:PORT), even though it lets the app send log payloads?
Appreciate any insight or advanced troubleshooting ideas you guys have
PS: indeed i wrote some of this with ai, mostly because i dont understand WHY the specific issues happen and i'd rather have it write the error down exactly than me describe it bad.