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.

nsis-web and nsis, public GitHub: Electron-updater don't start downloading after update-available

See original GitHub issue

After autoUpdater.checkForUpdates(), it emmits update-available but don’t start downloading. I’m using GitHub to publish.


  • Electron-updater - Version: 2.17.3
  • Electron-builder - Version: 19.48.3
  • Target: Windows | nsis-web

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:39 (20 by maintainers)

github_iconTop GitHub Comments

2reactions
aenariocommented, Dec 13, 2017

Hello @develar I just debugged a similar issue and it seem to be related to redirection.

May be it’s only for big bundles, but github is redirecting to amazonS3, which is not followed by electron’s net package because of the the redirect: “manual”.

I am not sure why you need to manually deal with redirection in this package, and I am confused by the structure between Provider <-> Executor <-> Updater and so on, so I won’t be pushing a PR. However, I got it fixed with this hacky monkey patch :

const _mp = autoUpdater.httpExecutor.doRequest
    autoUpdater.httpExecutor.doRequest = function (options, callback) {
        const req = _mp.call(this, options, callback)
        req.on('redirect', () => req.followRedirect())
        return req
    }

Hope that helps to pinpoint the issue and solve it more definitively.

1reaction
gordonshiehcommented, Dec 22, 2017

I did some sleuthing, and found that in BaseUpdater.js:87 of electron-builder const destinationFile = _path.join(tempDir, _path.posix.basename(fileInfo.url.pathname)); should be: const destinationFile = _path.join(tempDir, _path.posix.basename(fileInfo.info.url));

That will download the installer with the proper filename. I just found the fix, so I can’t exactly have a clean slate that is reproducible for submitting a new PR.

Electron 1.7.9 Electron-builder 19.49.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Differential update fails when assets change (nsis & nsis-web)
I have tried with the 20.36.2 version of electron-builder and the 4.0.4 version of electron-updater but I have a different kind of error...
Read more >
download-progress does not emit proper values (nsis ... - GitHub
I have problem with update events when using nsis-web. The thing is that download-progress event is only taking into consideration the .exe ...
Read more >
Differential update fails (nsis & nsis-web) #3491 - GitHub
Version: 20.36.2 Electron-Updater: 4.0.4 Target: Windows 10 x64 Node: v11.2.0 NPM: v6.4.1 I am testing differential updates using a local ...
Read more >
Nsis app from fall 2017 (electron-updater 2.10.0) won ... - GitHub
Nsis app from fall 2017 (electron-updater 2.10.0) won't update to new ... Meaning if app cannot download and run diff algorithm in 10min...
Read more >
Auto-update not working on WIN10 · Issue #2977 - GitHub
nsis-web and nsis, public GitHub: Electron-updater don't start downloading after update-available #2377. Closed. @damianobarbati ...
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