when client call autoUpdater.checkForUpdates() i can see the server log display this:
debug: Windows Update Search Query { platform: ['windows_32'], version: '2.0.0', channel: 'stable' } debug: Applicable Channels['stable'] debug: Time Filter { '>=': 2017 - 09 - 20 T08: 43: 10.000 Z } debug: Latest Windows Version { assets: [{ name: 'DesktopAlert-3.0.0-ia32-full.nupkg', platform: 'windows_32', filetype: '.nupkg', hash: '3536C0AD153B97027FEDE24CE1E9FE6C9863E04B', size: 52623567, download_count: 0, fd: 'C:\Projects\electron-release-server\data\34506780-7e2c-487e-9bb6-67b47674e76b.nupkg', createdAt: '2017-09-20T09:11:09.000Z', updatedAt: '2017-09-20T09:11:09.000Z', version: '3.0.0' }], channel: 'stable', name: '3.0.0', notes: '', createdAt: '2017-09-20T08:43:31.000Z', updatedAt: '2017-09-20T08:43:31.000Z' }
but on the client, there is no event fired. here is the client code for the auto update
autoUpdater.on('update-not-available', (event, releaseNotes, releaseName) => {
console.log(event)
mainWindow.webContents.send('update-not-available', {
msg: event
})
})
autoUpdater.on('update-available', (event, releaseNotes, releaseName) => {
console.log(event)
mainWindow.webContents.send('update', {
msg: event
})
})
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
console.log(event)
mainWindow.webContents.send('downloaded', {
msg: event
})
const dialogOpts = {
type: 'info',
buttons: ['Restart', 'Later'],
title: 'Application Update',
message: process.platform === 'win32' ? releaseNotes : releaseName,
detail: 'A new version has been downloaded. Restart the application to apply the updates.'
}
dialog.showMessageBox(dialogOpts, (response) => {
if (response === 0) autoUpdater.quitAndInstall()
})
})
autoUpdater.on('checking-for-update', (event, releaseNotes, releaseName) => {
console.log(event)
mainWindow.webContents.send('checking', {
msg: event
})
})
autoUpdater.on('error', message => {
console.error('There was a problem updating the application')
console.error(message)
})
please help, did I forget anything? P/s: sorry for the code format, don't know how to put code quote