Hello! I'm trying to set our application to periodically check for updates and not just on application start. Since I didn't find anything like this in the documents or examples, I tried with:
autoUpdater.checkForUpdatesAndNotify();
setInterval(autoUpdater.checkForUpdatesAndNotify, 1000 * 60 * 15);
And the first line works perfectly. Update is downloaded and installed as it should. Great. But when called a second time, from the interval, I get this error:
error: uncaughtException: this.isUpdaterActive is not a function
TypeError: this.isUpdaterActive is not a function
at Timeout.checkForUpdatesAndNotify [as _onTimeout] (...\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:245:15)
at ontimeout (timers.js:425:11)
at tryOnTimeout (timers.js:289:5)
at listOnTimeout (timers.js:252:5)
at Timer.processTimers (timers.js:212:10)
So I tried with autoUpdater.checkForUpdates instead. Then I started getting
error: uncaughtException: Cannot read property 'info' of undefined
TypeError: Cannot read property 'info' of undefined
at Timeout.checkForUpdates [as _onTimeout] (...\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:219:18)
at ontimeout (timers.js:425:11)
at tryOnTimeout (timers.js:289:5)
at listOnTimeout (timers.js:252:5)
Am I missing something from the documentation? Am I doing something wrong? Auto updates when they are published is a very important thing for our application.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@vkolova Have you found a solution ? I'me interested by this tool.
@popod Yes, changing it to
setInterval(() => {
autoUpdater.checkForUpdatesAndNotify();
}, 1000 * 60 * 15);
worked.
Most helpful comment
@popod Yes, changing it to
worked.