Uploads created through a third-party SAF write stay in "Waiting to upload" with no stated reason

未关闭
#18,059 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
46/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
android, kotlin

调研方向

Start by tracing the upload status handling for DELAYED_FOR_WIFI in the Android app, beginning with the log entries from UploadsStorageManager and AutoUpload. Check how the upload list turns stored statuses into user visible text and how queued uploads resume when network constraints change. Done means the UI explains the Wi-Fi wait and the upload resumes, or offers a manual start, after the constraint is satisfied.

由索引模型根据 Issue 内容生成。

描述

Steps to reproduce
  1. Another app creates a file through the storage access framework in a folder served by the Nextcloud app (ACTION_CREATE_DOCUMENT + write via ContentResolver.openOutputStream), e.g. a ~60 MB backup file.
  2. Nextcloud creates the document on the server (0 bytes) and hands out a write handle; the writing app then writes the full content.
  3. Wait with the device on mobile data.
Actual behaviour
  • The full content lands in the local cache file of the Nextcloud app (the file is complete and valid there).
  • The upload is queued and the upload list shows Warte auf Hochladen ("Waiting to upload") for days, without any error or explanation.
  • The file on the server stays at 0 bytes.
  • Force-stopping and restarting the app does not start the queue.
  • Only logcat shows the reason: Upload Finished | RemoteCode: DELAYED_FOR_WIFI, i.e. the upload waits for a Wi-Fi constraint. The UI never says so.
Expected behaviour
  • The upload list should show that the upload waits for a network constraint, not a generic "waiting" state.
  • The queue should resume by itself once the constraint is satisfied (or the user should be able to start it manually).
  • A pending SAF write should not leave a 0-byte file on the server indefinitely without any visible warning in the file list.
Relevant logs
UploadsStorageManager: updateUpload returns with: 1 for file: .../noop-backup-20261116-223951.noopbak
UploadsStorageManager: Updating ... with status:UPLOAD_FAILED and result:DELAYED_FOR_WIFI
🔄📤AutoUpload: upload failed ... (DELAYED_FOR_WIFI)
SyncedFolderProvider: Updating /storage/emulated/0/Documents/NOOP-Backups with enabled=true

The same "waiting" state was visible in the upload list for eight files written this way between Nov 11 and Nov 16, while the server kept 0-byte placeholders for all of them.

Environment data
  • Nextcloud Android app version: 35.0.2 (com.nextcloud.client), installed 2026-10-29
  • Device: Pixel 9 Pro
  • Android version: 17 (SDK 37)
  • Server: Nextcloud 35.0.2.2 (AIO), self-hosted
  • Network at the time: mobile data (LTE), device in the battery optimisation allow list
主要语言
Kotlin
星标
5.7k
派生
2.1k
平均合并
2 天 7 小时
30 天内合并 PR
149

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/android 的其他 Issue

查看 nextcloud/android 的全部 Issue

相似的 Issue

更多 Kotlin Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。