Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make app updates automatic instead of downloading from the site #211

Closed
MohanSha opened this issue Jun 12, 2020 · 12 comments
Closed

Make app updates automatic instead of downloading from the site #211

MohanSha opened this issue Jun 12, 2020 · 12 comments

Comments

@MohanSha
Copy link

Is your feature request related to a problem? Please describe.
I'm always frustrated when I have to manually download and install the app updates from the site

Describe the solution you'd like
Download the update automatically and prompt to install reducing manual work to update

Describe alternatives you've considered
None

Additional context
The updates were better handled before the redesign, it would automatically download the update the icon would turn blue in the bar indicating there is an update. So when I click update the app exits and updates itself and starts

@will-stone
Copy link
Owner

v9 used the Electron Autoupdater which will always download the update, and install it when restarting the app. This isn't great, as you'll have people who would like to stay on a certain version.

The ideal solution would be that the Autoupdater had a method that only checks, a method that only downloads, and so on. Therefore, I would suggest either opening an issue with Electron, or I am happy to look at a PR if you would like to merge both my solution and the Autoupdater.

Remember, behind every "frustrated" download you make are feature and bug fixes I have added to the app <cough>for free</cough> 😁

@brettgoss
Copy link

Is an opt-out setting for 'Automatically download updates' an option to implement? I feel like that's how most electron apps using autoUpdater handle it. Though that would require a preferences pane...

If that's something we want to do, then Insomnia has a good example of how they handle it: https://github.com/Kong/insomnia/blob/develop/packages/insomnia-app/app/main/updates.js

@will-stone
Copy link
Owner

Interesting. It seems like wrapping the Autoupdater would benefit the whole Electron community; anyone fancy making a package? Or seeing if anyone has already started a project for this? Sounds like something Sindre Sorhus would do, not sure if he's still in the Electron game any more.

@will-stone
Copy link
Owner

Looks like this is what we need: https://www.electron.build/auto-update I’m not sure how compatible with Electron Forge / Packager it is though.

@xlogix
Copy link

xlogix commented Jun 14, 2020

Yes, this is very frustrating. Please give it a priority... Thank you for this app!

@will-stone
Copy link
Owner

Okay... I give it a low priority; the current solution works and is very easy to maintain. If this is important to you, please consider contributing a PR.

@xlogix
Copy link

xlogix commented Jun 15, 2020

I would love to. Just very new to this... But, I'll try

@will-stone
Copy link
Owner

Awesome. My free time is about to come to an end (have been waiting to start a new job) so your help is appreciated. Get something into a draft PR and I can help out.

@vildhjarta8

This comment has been minimized.

@mbaierl
Copy link

mbaierl commented Jun 19, 2020

Ha, just wanted to ask the same... for an auto update feature. Great that it is already being worked on. Thanks!

@will-stone
Copy link
Owner

I have some free time today so I'll look at adding this now. Please remember that if you are unable to help by submitting code, please consider sponsorhip: the lowest tier is just $1 a month.

@will-stone
Copy link
Owner

Okay, findings so far: the electron-updater does not work well with Electron Forge. I'm getting an error:

Error: Module build failed (from ./node_modules/@marshallofsound/webpack-asset-relocator-loader/dist/index.js):
SyntaxError: Unexpected token (85:14)
    at Object.module.exports.pp$4.raise ...

Which isn't particularly useful. I've spent the last hour trying to find a fix but cannot find anything that helps.

The reason I wanted to use this package is that it breaks up the update process so users can restart the app without a forced update, i.e. stay on certain versions. I think I'll go back to the standard autoUpdater and use the Insomnia method, linked to by @brettgoss, where a setting can be used to prevent the loading of the autoUpdater on app load. I'm going to add the autoUpdater now and worry about where this setting will live later. If I make a major change before then (to v11) then I'll just do what I did with v9 and release a version with the autoUpdater removed (I'm highly unlikely to do this for some time!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants