-
-
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
Update loop in windows #359
Comments
You should show your code that handle auto-update... |
Sorry, i was currently editing my post, pressed publish accidently. |
Side note: Don't call Please ensure that your updated app has greater version number. |
@develar Thanks, yes i've not implemented it correctly yet, just want to get it running first :/ And thanks for the code snippet! NGINX access.log after installing and starting the application
|
Please see electron/electron#5057 Do you code sign your app? |
Thanks for the link. |
No, it can be a reason of issue. |
Code signing didn't help. What's happening:
|
I found the issue. I think its a bug in Squirrel.Windows. I have always uploaded the ia32 version and not the 64bit version. I installed the 32 bit version on a 64bit PC and got into this loop issue. After uploading the 64bit RELEASES + nupkg it worked fine. |
@philipgiuliani It is your issue due to lack of documentation. Please see #190 (comment) Your update server must serve |
Reopened — must be documented. |
When i generated 32 bit version it generates a RELEASES + RELEASES-ia32. I uploaded both and the content seemed the same. The app fetched the RELEASES file (from logs) and downloaded the |
It is an issue in all known update servers. You must send I suggest to distribute only 64-bit versions (forget 32-bit). Or you must fix your update server to support both 32 and 64 bit releases.
I see And please, as an easy solution — "I suggest to distribute only 64-bit versions (forget 32-bit)." :) |
If you build only 32-bit, |
Yes we're now only distributing 64-bit versions. My update server has currently no logic (just for Squirrel.Mac) because they said Squirrel.Windows doesn't need that. Feel free to close when its fixed :) I'm happy with 64 bit. |
Good, because real fix is not possible on our side. RELEASES file cannot contain versions for several archs, so, it is update server responsibility to handle this issue. And reality is — no one update server implements it correctly because... damn windows! forget ia32 and use only 64-bit as OS X does for several years. |
On other hand if you distribute only |
It took me about 5 minutes to get OS X updates working... For Windows i spent a day to find out that it is because i only uploaded the x86 version... Yes i think its ok to generate it because its required. |
I ran into this issue on a project and found a solution. Due to certain restrictions, our application is only available as a 32-bit program, so we had to find a fix for this. During the build process, electron-builder would output the following files:
Our fix was to:
Below is our build script that does this: builder.build(opts)
.then(() => {
const dir = jetpack.cwd('dist', 'win');
// This is a fix for Squirrel's infinite update loop.
return dir.removeAsync('RELEASES-ia32')
.then(() => {
return Promise.each(dir.listAsync(), (filename) => {
if (filename.indexOf('-ia32') !== -1) {
const newFilename = filename.replace('-ia32', '');
return dir.renameAsync(filename, newFilename);
}
});
})
.then(() => {
return dir.readAsync('RELEASES');
})
.then((txt) => {
txt = txt.replace('-ia32', '');
return dir.writeAsync('RELEASES', txt);
});
})
.catch((err) => {
console.log(err);
process.exit(1);
}); |
@bontibon I will revert #190 (comment) if @mcaoun will confirm that fix doesn't work in any case. So
If @mcaoun will not say that "don't revert, it works for me!", I will publish fix in the 3.x version, not major 4. |
@bontibon Enjoy. 3.22.0 will not modify RELEASES for ia32 anymore. |
How can you just break all existing build processes? There are many developers depending on these projects. Yes, we would love to live in a perfect world where we do not care about customers that do not upgrade. |
@friksa What do you mean? |
Our build process was building win32 versions of electron happily. After these changes, it does not. |
@friksa Please specify error, or what's wrong? |
Got to the bottom of this and it turns out to be easily solvable in the morning. The build process always yielded a folder named "win". Now it is "win-ia32". This caused the build process to break. Adjusting the build process to use the new folder name resolves the issue. Thanks! |
@friksa Sorry for that. Could you please specify why "the build process to break"? Do you publish manually instead of github publisher (or creating issue "support my product_name (amazon s3?) to publish!!!")? |
We build it with
Then we scp the files to our server and use a home-grown Java server to serve updates. Since the files were not found in the expected place, the build process reported a broken build. |
BTW, code sign is supported (and it is not possible for you to sign correctly outside of build process). @friksa Thanks for explanation. |
I wrote a blog post about building and deploying app, and it supports both 32 and 64 versions of Win: Hope it helps, best, |
@develar for future reference, in what version was this issue introduced and in what issue is it fixed (or has it even been fixed)? Thanks! |
Hi, I have both a 32-bit and 64-bit release of my app and the auto-updater work well with both arch. When the app starts, I make a request on my server with the following parameters: |
I think I just met the same looping issue, I reported details to electron project and here is the link. |
Squirrel.Windows is deprecated by electron-builder — consider to use nsis target. |
@develar can you still use the electron autoupdater api with nsis? I thought it relied on squirrel.windows. |
Nevermind, I see #529 now. |
This bug has been solved in Squirrel? |
Hi! I have no idea where i should report it, so i start here with the hope that somebody can help.
I have packaged my windows app with electron builder and i'm using Squirrel.Windows for auto-updates. I've put everything from the release to the FTP and set the URL properly. But now when I start the windows app its in an update loop. It downloads the 1.0.0 every time again.
Does someone has an idea how it happened?
Main app index.js (i ommited unreleated code)
I am building the windows distribution with OSX (Vine) with the following command:
build --platform win32 --arch ia32
OSX is working fine.
The text was updated successfully, but these errors were encountered: