0

I'am working on a desktop app using electron everything is working well, except for the autoUpdater.setFeedURL() method, it returns always this exception : "Update check failed. The server sent an invalid response. Try again later."

if(!isDev)
    {
      autoUpdater.setFeedURL({
        "url":"https://github.com/MyUsername/MyRepos/releases/"
      });
      autoUpdater.checkForUpdates();
    }

enter image description here

1 Answers1

1

Yeah! after 2 days of headache, I found that simply I was using a deprecated version of autoUpdater, I should be using this :

const { autoUpdater } = require('electron-updater');

So what I did next is just remove the setFeedURL line and instead of autoUpdater.checkForUpdates() I used autoUpdater.checkForUpdatesAndNotify()

if(!isDev)
{
    autoUpdater.checkForUpdatesAndNotify();
}
  • I've found that sometimes users have their operating system notifications snoozed or disabled, so they aren't notified when a download is ready to install. I wrote a package to present a dialog window instead to notify them if they want to relaunch and update or to do so later: https://github.com/davidwinter/electron-auto-update/ – David Winter Oct 31 '20 at 11:32
  • 3
    The official docs at https://www.electronjs.org/docs/tutorial/updates#implementing-updates-in-your-app recommend using `const { autoUpdater } = require('electron')` instead of using "electron-updater". What do you mean by "deprecated version"? What are the differences between using electron-updater and the official way to do it? Thanks. – Guido Apr 10 '21 at 18:01
  • How did you set the feedURL in this approach? – Vinicius Bazanella Oct 24 '22 at 13:19