-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Auto-updater with Amazon S3 #1310
Comments
Please enable debug logging — https://github.com/electron-userland/electron-builder/wiki/Auto-Update#debugging |
Unfortunately that does not give much more information:
This is the only line in the log file. Re-looking at the latest.yml file...is it ok that I have a field named githubArtifactName even though I'm using s3 ? |
Yes. Because you can set any provider in runtime.
Hmm... Is it possible for you to check is auto update works on macOS? |
Please run your app in the terminal (
and attach output here. |
Output on Windows, launched from cmd:
|
I'm trying to set up the auto update on macOS as well...I wasn't working on it yet |
electron version? |
electron v.1.4.5 I set up the auto update on macOS and I have the same situation...it did not upload the latest-mac.json file though, but I'm not sure if it had to since I'm using dmg as target and not zip. |
Please upgrade to 1.4.15 or even to latest 1.6.1 |
Tried both v1.4.15 and v1.6.1 with no luck |
I also upgraded electron-updater to v1.8.0 |
Now I get some output with
|
Don't know it this will help, but adding the following lines
I get this error in my logs:
|
@dventurino Cool. Could you please change
to |
Yep!
|
@dventurino Could you please post your code where do you use updater? |
autoUpdater.on('checking-for-update', () => {
sendStatus('Checking for update...');
})
autoUpdater.on('update-available', (ev, info) => {
sendStatus('Update available.');
})
autoUpdater.on('update-not-available', (ev, info) => {
sendStatus('Update not available.');
})
autoUpdater.on('error', (ev, err) => {
sendStatus('Error in auto-updater.');
})
autoUpdater.on('download-progress', (ev, progressObj) => {
sendStatus('Download progress...');
log.info('progressObj', progressObj);
})
autoUpdater.on('update-downloaded', (ev, info) => {
sendStatus('Update downloaded. Will quit and install in 5 seconds.');
// Wait 5 seconds, then quit and install
setTimeout(function () {
autoUpdater.quitAndInstall();
}, 5000)
})
// Wait a second for the window to exist before checking for updates.
setTimeout(function () {
autoUpdater.checkForUpdates().then(
function (val) {
log.info('Promise fulfilled');
}).catch(
function (reason) {
log.error('Handle rejected promise (' + reason.stack || error + ') here.');
});
}, 1000); Replacing "sendStatus" with "log.info" made it work! |
Well... error in your code. It seems But! AppUpdater must handle errors during emit and report it properly. |
You don't need to listen all events to log. electron-updater opposite to built-in electron updater handles it for you. You can listen only required for you events. |
Damn! I didn't see the function definition in the example https://github.com/iffy/electron-updater-example/blob/master/main.js. Which part of the code above should I remove ? |
@iffy I suggest to remove |
Hmmm... Should we get rid of the window, too, then? Perhaps this could be fixed by renaming |
Just enable logging :) |
@iffy you could also keep the example as is...it was my fault not to check where the function came from |
@dventurino I also didn't notice this function during review :( So, I suggest to simplify example. |
Anyway, it's working now on Windows. Thank you so much for your help! On macOS I have the same problem as in #1261 with electron-builder v14.5.2 |
Do you use default target or custom? |
I was using
Removing it solved the problem. It generates a zip that I'm not gonna use though. |
This zip is required for Squirrel.Mac. So, you must use it and it will be uploaded. Sadly, but true. |
Oh, okay ;) it's no trouble! Thanks again and sorry for the off-topic. |
@develar iffy/electron-updater-example#10 shows my suggested fix. I think having the window show you what's going on will help new people, but I've separated what's actually required out from the windowing parts. |
Gosh, this should be somewhere in the documentation. I've been banging my head to find why the |
I'm having trouble setting the auto update process. I'm publishing my artifact on Amazon S3 correctly (and the auto-generated latest.yml as well). The folders are public.
I followed the wiki on how to implement the Auto-Updater and I see that I have the app-update.yml file in my resources folder, but when I start my application I get the
message, but then I get no response about if there is an update available or not.
The latest.yml file contains the following fields:
while the app-update.yml file in my resources folder contains:
The package.json looks like this:
What am I doing wrong?
The text was updated successfully, but these errors were encountered: