Storage upload progress is too sparse to be useful

未关闭
#8,722 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
1-2 天
新手友好度
57/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
android, java
领域
backend, mobile

调研方向

Start in firebase-storage/src/main/java/com/google/firebase/storage/UploadTask.java, especially the cited sections around chunk sizing and progress updates. Trace when progress is emitted for a 48 MB upload and check for related tests in the storage module. Done means large Android uploads report progress often enough to avoid long gaps while preserving correct progress values.

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

描述

api: storage
[READ] Step 1: Are you in the right place?
[REQUIRED] Step 2: Describe your environment
  • Android Studio version: Rabbit
  • Firebase Component: Storage
  • Component version: 22.0.1
[REQUIRED] Step 3: Describe the problem

When users upload larger files, progress updates from firebase seem to stop, which causes the user to think the upload is stuck. The reason for this seems to be:

  1. The Android implementation of StorageTask only emits progress when a chunk finishes
  2. The chunk size doubles until it reaches 32mb

So a ~64mb file gets a final update around 32mb, then no further progress updates until the upload finishes. That's not an ideal user experience.

I haven't seen this behavior on iOS, so I assume there progress is based on fixed byte sizes or is time based, rather than the total size of the chunk.

Steps to reproduce:

Upload a 48mb file on Android

Relevant Code:

https://github.com/firebase/firebase-android-sdk/blob/f71ec348f8fe73abe630a7813a94e5636eb81983/firebase-storage/src/main/java/com/google/firebase/storage/UploadTask.java#L247-L254

https://github.com/firebase/firebase-android-sdk/blob/f71ec348f8fe73abe630a7813a94e5636eb81983/firebase-storage/src/main/java/com/google/firebase/storage/UploadTask.java#L489
https://github.com/firebase/firebase-android-sdk/blob/f71ec348f8fe73abe630a7813a94e5636eb81983/firebase-storage/src/main/java/com/google/firebase/storage/UploadTask.java#L60
https://github.com/firebase/firebase-android-sdk/blob/f71ec348f8fe73abe630a7813a94e5636eb81983/firebase-storage/src/main/java/com/google/firebase/storage/UploadTask.java#L484
https://github.com/firebase/firebase-android-sdk/blob/f71ec348f8fe73abe630a7813a94e5636eb81983/firebase-storage/src/main/java/com/google/firebase/storage/UploadTask.java#L575
https://github.com/firebase/firebase-android-sdk/blob/f71ec348f8fe73abe630a7813a94e5636eb81983/firebase-storage/src/main/java/com/google/firebase/storage/UploadTask.java#L601

主要语言
Java
星标
2.6k
派生
733
平均合并
2 天 15 小时
30 天内合并 PR
72

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

firebase/firebase-android-sdk 的其他 Issue

查看 firebase/firebase-android-sdk 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

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