How to setup Squirrel.window to check updates on electron release server - Electron
How to setup Squirrel.window to check updates on electron release server - Electron
I am trying to update my electron app built with electron-forge(and Squirrel.Windows as maker) using Electron-release-server.
What I was unable to set properly is the update feed. Actually the part of code that check for updates is the following:
const server = 'http://185.25.204.245:1337';
const platform = 'win' + process.arch.substr(1);
const feed = `$server/update/win64/$globals.app.getVersion()/beta/RELEASES`;
console.log(feed);
autoUpdater.setFeedURL(feed);
autoUpdater.on('error', err => console.log(err));
autoUpdater.on('checking-for-update', () => console.log('checking-for-update'));
autoUpdater.on('update-available', () => console.log('update-available'));
autoUpdater.on('update-not-available', () => console.log('update-not-available'));
autoUpdater.checkForUpdates();
/*setInterval(() =>
autoUpdater.checkForUpdates()
, 60000);*/
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, (response) =>
if (response === 0) autoUpdater.quitAndInstall()
)
);
autoUpdater.on('error', message =>
console.error('There was a problem updating the application')
console.error(message)
)
Here the console log when I launch the app: https://hastebin.com/witogagepi.sql
If you try to open the feed url it actually works. Any suggestion on to how to properly set it?
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.