Skip to content

Error updating application #161

Open
@dguettler

Description

@dguettler

I'm running into the following error and am wondering if anybody has some hints how to debug this

[info] Checking for updates...
[error] There was a problem updating the application
[error] Error: Update check failed. The server sent an invalid response. Try again later.

From the Nuts logs I only see

download Oversight-osx-x64-0.0.12.zip for version 0.0.12 on channel stable for osx_64
downloaded Oversight-osx-x64-0.0.12.zip for version 0.0.12 on channel stable for osx_64

Testing the download URL via curl gets the correct zip file.

On the electron side I have

  const server = 'https://[REDACTED]'
  const feed = `${server}/download/${process.platform}`

  autoUpdater.setFeedURL(feed);

  setInterval(() => {
    log.info("Checking for updates...");
    autoUpdater.checkForUpdates();
  }, 60000);

  autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
    log.info("Update received: ", 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, (response) => {
      if (response === 0) autoUpdater.quitAndInstall()
    })
  })

  autoUpdater.on('error', (message) => {
    log.error('There was a problem updating the application')
    log.error(message)
  })

Any advice on next steps would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions