Storage upload timeout doesn't trigger call to OnFailureListener.onFailure()
[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:
- For general technical questions, post a question on StackOverflow with the firebase tag.
- For general Firebase discussion, use the firebase-talk google group.
- For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Android Studio version: 3.3___
- Firebase Component: Storage___ (Database, Firestore, Storage, Functions, etc)
- Component version: 16.1.0___
[REQUIRED] Step 3: Describe the problem
Once maxUploadRetryTimeMillis is reached, upload will halt, but it should also trigger a call to OnFailureListener.onFailure(). Otherwise there's no way for the mobile app to know that the timeout happened.
Steps to reproduce:
- Start uploading a file to Firebase storage using UploadTask
- Add OnFailureListener to UploadTask to log any failures during upload
- Once a few chunks were uploaded, turnoff internet connection on computer
- Wait for timeout (default is 10 minutes, but can be customized by using FirebaseStorage.getInstance().getReference().getStorage().setMaxUploadRetryTimeMillis(1000L))
- Restore internet connection on the computer
- Notice the upload doesn't continue, but there are no failures logged by the OnFailureListener
What happened? How can we make the problem occur? This could be a description, log/console output, etc.
Relevant Code:
// TODO(you): code here to reproduce the problem
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Thanks for the bug report. I'm not sure when we'll be able to investigate this, but if anybody wants to put together a Pull Request, we'd be happy to take a look. Thanks!
OMG, To me also the same thing happened. Even my question looks like. How can I lower the timeout in uploading a file to Firebase and in which listener I detect it? . I tried it by setting the firebaseStorage.setMaxUploadRetryTimeMillis (5000) method (5 seconds) but it does not seem to work.
Thanks for your patience. Please feel free to reopen if you have a PR that can help address this.