0

How i can update my app using electron-forge with electron-release-server?

I deployed the implementation server and uploaded two assemblies .exe and.nupkg to it

and I'm trying to get these updates in the application according to the documentation

const url = `${server}download/latest`

autoUpdater.setFeedURL({ url })

setInterval(() => {
  autoUpdater.checkForUpdates()
}, 10000)

autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
  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).then((returnValue) => {
    if (returnValue.response === 0) autoUpdater.quitAndInstall()
  })
})

but in development i get error:

There was a problem updating the application Error: Can not find Squirrel

If I understood correctly I can't use checkForUpdates() in development but in production build the update doesn't work either

Amstergo
  • 43
  • 1
  • 2
  • 6
  • what files are serving from this URL: ${server}download/latest Do you have these files: 1. RELEASES 2. app-xxx-0.X.0-full.nupkg – Alba Hoo May 27 '23 at 02:25

0 Answers0