After autoUpdater.checkForUpdates(), it emmits update-available but don't start downloading.
I'm using GitHub to publish.
Do you use private GitHub?
No, it's public GitHub
2.17.4 works for me, please verify.
Still not working with 2.17.4

Is your old version of app (update from) uses electron-updater 2.17.4?
Yes, I generate two version with 2.17.4 with some small changes, try to update from my app v1.17.2 that uses the 2.17.4 to 1.17.3 that also use it
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.
After upgrading to 2.17.4, download-progress can be called under Mac OS, but it can't be called under Windows
@aenario If you use private GitHub provider, it is fixed in the electron-updater 2.17.5
Please in any comment about electron-updater issue provide: 1. provider (GitHub or s3 or ...) 2. target (nsis-web or nsis or appimage)
electron-updater 2.17.6 released.
If error still here, please enable debug logging to file and provide logs. Debug logging is cheap and doesn't lead to performance degradation, so, you can enable it and disable once you will verify that updater work.
const log = require("electron-log")
log.transports.file.level = "debug"
autoUpdater.logger = log
2.17.6 not working here, log:
Wait for 10 minutes and check network resources but no download started.
[2017-12-13 08:07:20.136] [info] Checking for update...
[2017-12-13 08:07:26.378] [info] Found version 1.17.8 (url: inovafarma-notificacoes-1.17.8-win.exe)
[2017-12-13 08:07:26.378] [info] Update available.
[2017-12-13 08:07:26.378] [info] { version: '1.17.8',
files:
[ { url: 'inovafarma-notificacoes-1.17.8-win.exe',
sha512: 'DkjNsoibQyGv+kgFEHxNqDBp2AhYP8+Eo0U94ULfBWpJrQG6Tmvtt0Rc1rmbgeiL2yqUTR39jxsaswo8S7J4Iw==' } ],
path: 'inovafarma-notificacoes-1.17.8-win.exe',
sha512: 'DkjNsoibQyGv+kgFEHxNqDBp2AhYP8+Eo0U94ULfBWpJrQG6Tmvtt0Rc1rmbgeiL2yqUTR39jxsaswo8S7J4Iw==',
packages:
{ ia32:
{ path: 'inovafarma-notificacoes-1.17.8-ia32.nsis.7z',
size: 36392513,
blockMapSize: 72504,
sha512: 'hxcOmeN65Duza8SlOUngCZKwoVqnKJRM7njsIAcqK4TJJsQQdeKzvOO9vM7e1lj1VgJKppjjzAvMCWba/CJ/fA==',
headerSize: 10006 },
x64:
{ path: 'inovafarma-notificacoes-1.17.8-x64.nsis.7z',
size: 42347040,
blockMapSize: 82951,
sha512: 'YQnQ7Y6zRb0I4LCh+i3IEMZzyxt4GLfW/4zyl6vcqGd8vN4yuvip8xpg4b90Tx3GCbqI7aAxwqXnnrpbdpLIFg==',
headerSize: 10006 } },
sha2: 'f0add7ee083188167b675ddc520dbe6ffb99526b7b6a06a57deb95962c891726',
releaseDate: '2017-12-12T15:51:34.558Z',
releaseName: '1.18.0',
releaseNotes: '' }
[2017-12-13 08:07:26.380] [info] Downloading update from inovafarma-notificacoes-1.17.8-win.exe
autoUpdater code:
autoUpdater.allowDowngrade = true;
autoUpdater.on('checking-for-update', () => {
log('Checking for update...');
ipc.sender('check-for-updates', {
message: 'Verificando atualizações...',
emitter: 'checking-for-update',
response: true,
});
});
autoUpdater.on('update-available', (info) => {
log('Update available.');
log(info);
ipc.sender('check-for-updates', {
message: 'Atualizações disponíveis...',
emitter: 'update-available',
response: true,
});
});
autoUpdater.on('update-not-available', (info) => {
log('No update available. More info:');
log(info);
ipc.sender('check-for-updates', {
message: 'Última versão instalada...',
emitter: 'update-not-available',
response: false,
});
});
autoUpdater.on('error', (err) => {
log.error(`Error in auto-update. ${err}`);
ipc.sender('check-for-updates', {
message: 'Problemas de conexão com o servidor...',
emitter: 'error',
response: false,
});
});
let setIntervalStop = false;
autoUpdater.on('download-progress', (progressObj) => {
let logMessage = `Download speed: ${helpers.bytesToSize(progressObj.bytesPerSecond)}/s`;
logMessage = `${logMessage} - Downloaded ${progressObj.percent.toFixed()}%`;
logMessage = `${logMessage} (${helpers.bytesToSize(progressObj.transferred)}/${helpers.bytesToSize(progressObj.total)})`;
log(logMessage);
ipc.sender('check-for-updates', {
message: 'Baixando atualizações',
percentage: `${progressObj.percent.toFixed()}%`,
emitter: 'download-progress',
response: true,
});
});
autoUpdater.on('update-downloaded', () => {
setIntervalStop = true;
log('Update downloaded');
ipc.sender('check-for-updates', {
message: 'Instalando atualizações...',
emitter: 'update-downloaded',
response: true,
});
});
ipcMain.on('quit-and-install', () => {
log('Quit and install update');
if (process.env.NODE_ENV === 'production' && process.env.BABEL_ENV !== 'test') {
autoUpdater.quitAndInstall(true, true);
}
});
ipcMain.on('check-for-updates', () => {
setImmediate(() => {
autoUpdater.allowPrerelease = allowPrerelease;
log(`Allow Prerelease: ${allowPrerelease}`);
autoUpdater.checkForUpdates();
});
});
@marceloavf Is debug enabled?
@develar I used your code above

I'll try to clean all log configuration and re-do the test
Same issue here:
Auto-update works everywhere except on Windows.
Monkey patch from @aenario just works.
Yup, this bug is easily reproducable. I have set up a test repository that showcases the issue here:
https://github.com/Zamiell/test
This repo is just the electron-quick-start repo with some small changes:
Some notes:
Here is the log file:
[2017-12-16 12:18:08.014] [info] Checking for update
[2017-12-16 12:18:10.857] [info] Found version 0.0.9 (url: electron-quick-start-setup-0.0.9.exe)
[2017-12-16 12:18:10.857] [info] Downloading update from electron-quick-start-setup-0.0.9.exe
And then it just hangs there and doesn't download update. So this is a severe regression!
Also, monkey patch from above works for me to fix this problem. I put it right before the line of:
autoUpdater.checkForUpdatesAndNotify()
Also, as a side note, @develar can you update the documentation? I think it should explain the difference between checkForUpdates and checkForUpdatesAndNotify. This is very confusing for the end user:

The same problem for 2.17.0-2.17.6 versions. But in 2.16.3 all is work :)
can confirm same problem with 2.17.6
i switched down to 2.16.3 like @sheldhur suggested, and it does now download the file.
new dependencies are
electron - 1.7.9
electron-builder - 19.49.0
electron-updater - 2.16.3
provider - github (public)
target - nsis
when i apply the updates though, (tried both quitAndInstall() -- and just manually closing the app) i get the attached error, even though the file exists in the designated path, and the log appears to show no problems.


i'm so close to getting this thing working, any help or advice would be greatly appreciated!
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
can confirm that the changes @gordonshieh94 suggested worked. updated BaseUpdater.js and file is now updating as intended. thanks!
@gordonshieh94 It looks strange. But — as we do basename in any case, resolved URL is not required in our case and probably it is better to avoid complex code like url.pathname (where url it is instance of node URL) and use simple string url as in the update info. I will release new version with this fix. Thanks a lot.
Please try electron-updater 2.17.7
Still not working for me =(
electron - 1.7.5
electron-builder - 19.49.3
electron-updater - 2.17.7
provider - github (private)
target - nsis
The monkey patch posted above is still required. develar's commit does seem to address the ENOENT issue that metal-messiah and I are having though.
Not working
Any progress on this issue?
2.18.2 works for me
Works for me to
Thanks for confirmation.
@marceloavf did you solve this? I see a partial download (about 5mb) and my app just quits without emitting upload-downloaded event.
I'm having no help here: https://github.com/electron-userland/electron-builder/issues/2977 :\
@damianobarbati It's working since 2.18.2 here, one project in GitHub and another in Digital Ocean Spaces, also tested here on Windows 10, I'll take a look and give you any feedback if I find something.
Thanks @marceloavf, I'm on:
"electron": "^2.0.1",
"electron-builder": "^20.13.4",
"electron-updater": "^2.21.10",
Should I downgrade?
My latest project is working on this versions @damianobarbati, using Digital Ocean Spaces:
electron@^1.8.4:
version "1.8.4"
electron-builder@^20.8.1:
version "20.8.1"
electron-updater@^2.21.4:
version "2.21.4"
Try them to see if something changes, you can also try to delay your autoUpdate functions too.
@marceloavf what do you mean with "_Try them to see if something changes, you can also try to delay your autoUpdate functions too._"?
You can use SetTimeout or setImmediate to delay your update function, waiting for your electron app fully loads before trying to check for update @damianobarbati .
@marceloavf are you arguing that the app.on('ready', () => {}) event may be not reliable?
It is reliable @damianobarbati, the point is that if you load your browserWindow, tray, etc you can have some undesired effects like app hang for a few seconds, setImmediate can avoid this and "maybe" make it work properly.
Most helpful comment
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 :
Hope that helps to pinpoint the issue and solve it more definitively.