App will not automatically update, errors out.
See original GitHub issue- Version 22.10.5:
- Electron Version 12.0.5:
- Electron Type (current):
- Electron builder 4.3.8
- Target windows:
So, the app starts the update, but it never reaches the event “update-downloaded”, it never gets there. I am not sure why, but, i am able to view the download progress, it finishes, but never emits the event, or actually downloads the update.
Here is my code for my main process
const { app, BrowserWindow, ipcMain, Notification } = require("electron")
const { autoUpdater } = require('electron-updater')
const windows = {}
app.on("ready", () => {
windows.updater = new BrowserWindow({
width: 310,
height: 390,
fullscreenable: false,
frame: false,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
}
})
windows.updater.loadFile("./src/screens/updater/index.html")
autoUpdater.checkForUpdatesAndNotify()
new Notification({
body: "Test notification"
}).show()
})
app.on("window-all-closed", () => {
if (process.platform !== "darwin") {
app.quit()
}
})
ipcMain.on("get-app-version", event => {
event.sender.send("app-version", { version: app.getVersion() })
})
autoUpdater.on("update-available", () => {
new Notification({
body: "an update is available to your app, it will start downloading"
}).show()
})
autoUpdater.on("update-downloaded", () => {
new Notification({
body: "an update has been downloaded to your app, it will now close and install."
}).show()
autoUpdater.quitAndInstall()
})
autoUpdater.on("update-not-available", () => {
new Notification({
body: "App is up to date!!"
}).show()
})
autoUpdater.on("error", err => {
new Notification({
body: err.message
}).show()
})
autoUpdater.on('download-progress', (progressObj) => {
let log_message = "Download speed: " + progressObj.bytesPerSecond;
log_message = log_message + ' - Downloaded ' + progressObj.percent + '%';
log_message = log_message + ' (' + progressObj.transferred + "/" + progressObj.total + ')';
new Notification({
body: log_message
}).show()
})
Any help is appreciated, i have been raging for the last four hours because for every fix i test on my own, it requires me to publish the fix, then publish the same fix but with a new version number, and then open the fix file, and it has become very tedious and irritating and i need some fresh sets of eyes to check it out. I can link to the source codes repo if anyone needs.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11
Top Results From Across the Web
Automatic App Updates Not Working, Fix - macReports
This article explains how you can troubleshoot if automatic app updates are not working properly on your iPhone or iPad.
Read more >Automatic software or app updates not working on your ...
Here are all the steps you need to take if automatic software or app updates are not working on your iPhone. We'll get...
Read more >Top 10 Ways to Fix Apps Not Updating on Android
Top 10 Ways to Fix Apps Not Updating on Android · 1. Check Internet Connection · 2. Check Device Storage · 3. Auto-Update...
Read more >If your iPhone or iPad won't update - Apple Support
If there isn't enough space to download and install an update, the software on your device will try to make space. It will...
Read more >My iPhone Apps Won't Update! Here's The Fix.
Apps Not Updating On Cellular Automatically? ... Open Settings and tap App Store. Make sure the switch next to App Updates is turned...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Update: after ten minutes, it said
net::ERR_CONNECTION_CLOSED
so it never even makes it past the download request to githubWe couldn’t determine the origin for the 50mb limit. So we increased it arbitrarily to 500mb in v22.11.1 via #5843