Browser-laptop: Pause/Resume of download causes download to be cancelled

Created on 26 Jul 2018  路  5Comments  路  Source: brave/browser-laptop

Description

If you start a download, pause the download for 2-3 minutes, and then resume, your download gets cancelled. Furthermore, if you attempt to download the same item again, the download does not appear in Brave and you can see the terminal being spammed with uncaught exceptions.

Steps to Reproduce

  1. Launched c68 build (0.23.72) via terminal
  2. Went to https://www.thinkbroadband.com/download
  3. Started downloading 1GB file
  4. Paused for 2-3 minutes
  5. Attempted to resume --> download showed cancelled
  6. Removed from about:downloads (remove from Download bar)
  7. Attempted to download 1GB file again --> download does not show in Brave, terminal is being spammed with uncaught exception errors. It looked like the file was in my Downloads folder, but when I close Brave the file is not actually downloaded.

Actual result:
After resume, download shows as cancelled in UI. Here's what shows in the terminal:

An uncaught exception occurred in the main process Uncaught Exception:
TypeError: win.isDestroyed is not a function
    at module.exports.updateElectronDownloadItem (/Users/laurenwagner/BraveDocuments/Laptop/0.23-c68/Brave.app/Contents/Resources/app.asar/app/browser/electronDownloadItem.js:46:19)
    at DownloadItem.<anonymous> (/Users/laurenwagner/BraveDocuments/Laptop/0.23-c68/Brave.app/Contents/Resources/app.asar/app/filtering.js:669:9)
    at emitOne (events.js:101:20)
    at DownloadItem.emit (events.js:191:7)

Upon retry of download, terminal gets spammed with uncaught exceptions. Here's an example:

An uncaught exception occurred in the main process Uncaught Exception:
TypeError: downloadMap[downloadId].getReceivedBytes is not a function
    at Object.keys.reduce (/Users/laurenwagner/BraveDocuments/Laptop/0.23-c68/Brave.app/Contents/Resources/app.asar/app/browser/electronDownloadItem.js:20:46)
    at Array.reduce (<anonymous>)
    at progressDownloadItems (/Users/laurenwagner/BraveDocuments/Laptop/0.23-c68/Brave.app/Contents/Resources/app.asar/app/browser/electronDownloadItem.js:19:50)
    at module.exports.updateElectronDownloadItem (/Users/laurenwagner/BraveDocuments/Laptop/0.23-c68/Brave.app/Contents/Resources/app.asar/app/browser/electronDownloadItem.js:48:26)
    at updateDownloadState (/Users/laurenwagner/BraveDocuments/Laptop/0.23-c68/Brave.app/Contents/Resources/app.asar/app/filtering.js:611:3)
    at DownloadItem.<anonymous> (/Users/laurenwagner/BraveDocuments/Laptop/0.23-c68/Brave.app/Contents/Resources/app.asar/app/filtering.js:663:7)
    at emitTwo (events.js:106:13)
    at DownloadItem.emit (events.js:194:7)

Expected result:
Download should resume without issue.

Reproduces how often:
Easily

Brave Version

about:brave info:
0.23.72

Reproducible on current live release:
Yes, reproduced on 0.23.39 by @kjozwiak and myself

Additional Information

Here鈥檚 a gif of the issue (note - I paused the gif during the 2-3 minute wait period while the download was paused):
download

Qtest-plan-specified bug featurdownload fixed-with-brave-core release-noteinclude

All 5 comments

Could be related to #14805.

Possibly fixed with our next build... if not, let's push back to Release 5

Reproduced on Ubuntu 17.10 x64

  • 0.23.74 c3d448a2bdaeff82cd8702b6a02db0c6a534f017
  • Muon 8.0.4
  • libchromiumcontent 68.0.3440.84

Terminal output

An uncaught exception occurred in the main process Uncaught Exception:
TypeError: win.isDestroyed is not a function
    at module.exports.updateElectronDownloadItem (/usr/lib/brave/resources/app.asar/app/browser/electronDownloadItem.js:46:19)
    at DownloadItem.<anonymous> (/usr/lib/brave/resources/app.asar/app/filtering.js:667:9)
    at emitOne (events.js:101:20)
    at DownloadItem.emit (events.js:191:7)

This is fixed with brave-core. Should we close out here?

@rebron yup! let's close it out

Was this page helpful?
0 / 5 - 0 ratings

Related issues

octohedron picture octohedron  路  3Comments

jonathansampson picture jonathansampson  路  3Comments

jkup picture jkup  路  3Comments

luixxiul picture luixxiul  路  3Comments

briannyeko picture briannyeko  路  3Comments