Connect device through the proxy server. I used Charles Proxy;
Using proxy tool apply the following rewrite rule 20mb_404_fail.zip. It is for Charles. It makes 404 http error to be returned on each request to 20 mb file.
Launch simple app and start downloading;
Observe batch 1 starts downloading, while batch 2 is queued;
Force stop the app through the device settings menu;
Launch it again and go to downloads screen.
Expected: Download queue restored and actual download statuses are displayed.
Actual: Sometimes download queue doesn't restore properly, no statuses are displayed, impossible to start downloads again.
Notice, that error behavior may not reproduce on the first try and you may need to force stop and restart app again.
While investigating this bug I found out that download queue actually gets restored on app restart i.e. downloadBatchMap is getting filled with correct data. But executor inside LiteDownloadManager or LiteDownloadManagerDownloader just gets stuck and all submit calls just hang in its queue forever.
UPDATE Found in release branch (efecb182c7c9f849f5d6a3e938a293c837ded03a). Can't reproduce in develop or latest release.
Steps to reproduce:
Expected: Download queue restored and actual download statuses are displayed. Actual: Sometimes download queue doesn't restore properly, no statuses are displayed, impossible to start downloads again.
Notice, that error behavior may not reproduce on the first try and you may need to force stop and restart app again.
While investigating this bug I found out that download queue actually gets restored on app restart i.e.
downloadBatchMap
is getting filled with correct data. Butexecutor
insideLiteDownloadManager
orLiteDownloadManagerDownloader
just gets stuck and allsubmit
calls just hang in its queue forever.UPDATE Found in release branch (efecb182c7c9f849f5d6a3e938a293c837ded03a). Can't reproduce in develop or latest release.