question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

download-progress does not emit proper values (nsis-web, differentialPackage)

See original GitHub issue

I have problem with update events when using nsis-web. The thing is that download-progress event is only taking into consideration the .exe file which is 500KB and when I want to display some progressbar it is downloading 500KB and showing instantly 100%. After that it is downloading 7z file in the background and I cannot see progress of it - this is bad especially as I plan to have large files included in app.

package.json

  "scripts": {
    "publish": "build --x64 --ia32 --windows nsis-web -p always"
  },
  "devDependencies": {
    ...
    "electron": "1.7.10",
    "electron-builder": "19.54.0",
    "electron-publisher-s3": "^19.55.2"
  },
  "dependencies": {
    ...
    "electron-log": "2.2.14",
    "electron-updater": "2.20.0"
  }

electron-build.json

{
  "appId": "com.kkl.test",
  "publish": [
    {
      "provider": "s3",
      "bucket": "somebucket",
      "region": "eu-central-1"
    }
  ],
  "productName": "test",
  "directories": {
    "output": "app-builds"
  },
  "win": {
    "target": [
      "nsis-web"
    ]
  },
  "nsisWeb": {
    "differentialPackage": true,
    "oneClick": false,
    "perMachine": true,
    "allowElevation": true,
    "allowToChangeInstallationDirectory": true,
    "unicode": true,
    "runAfterFinish": true,
    "deleteAppDataOnUninstall": true
  }
}

log.log file:

[2018-01-24 21:29:57.751] [info] Found version 0.0.4-test (url: test Web Setup 0.0.4-test.exe)
[2018-01-24 21:29:57.751] [info] { info: 
   { version: '0.0.4-test',
     files: [ [Object] ],
     path: 'test Web Setup 0.0.4-test.exe',
     sha512: 'jcijdawbJlHYIm6vf43RQeMTm1QLMhjZ1J3rviGW6XRwvd/J7Q3RC6I4zihJjh97CjUe+KJ7X1H/5WVLICLlKw==',
     packages: { ia32: [Object], x64: [Object] },
     sha2: 'c9e920597c31b826e332614ac824a69dc30bd0b01586fce737fe4fe09eca4153',
     releaseDate: '2018-01-24T15:47:49.189Z' },
  type: 'update-available' }
[2018-01-24 21:29:57.753] [info] Downloading update from test Web Setup 0.0.4-test.exe
[2018-01-24 21:29:58.064] [info] { progressObj: 
   { total: 511884,
     delta: 511884,
     transferred: 511884,
     percent: 100,
     bytesPerSecond: 2337370 },
  type: 'progress' }
[2018-01-24 21:29:58.709] [info] File has 10350 changed blocks
[2018-01-24 21:29:58.713] [info] Full: 246,918.68 KB, To download: 211,158.25 KB (86%)
[2018-01-24 21:29:58.718] [info] Differential download: https://bucket.s3.amazonaws.com/somefile-0.0.4-test-x64.nsis.7z

Is there a way to use differentialPackage and nicely show download progress of all files? Or maybe there is something wrong in my setup ?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:5
  • Comments:33 (4 by maintainers)

github_iconTop GitHub Comments

13reactions
dingchaoyan1983commented, Feb 12, 2019

I need this feature too

9reactions
ghostcommented, Nov 25, 2019

I had this problem too, as a workaround i made this Based on messages which are logged in console by updater im calculating percentage and speed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto Update - electron-builder
Emitted when there is no available update. info UpdateInfo (for generic and github providers) | VersionInfo (for Bintray provider). Event: download-progress ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found