-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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
Windows: Squirrel autoUpdater error when running app for the first time #7155
Comments
Are you trying to update the app as soon as it's first installed? I bet you are :) |
I'm not sure what you mean. AutoUpdater is called when the app starts after the 'ready' event. Is this the way it should be done? |
@paulcbetts the docs don't explain any of this. https://github.com/electron/electron/blob/master/docs/api/auto-updater.md I have a function in my MAIN process that is in charge of setting up autoUpdate.
And then:
Of course this happens every time the app starts. What am I doing wrong? |
The error message says exactly what's happening - "Couldn't acquire update lock, is another instance running?" The other instance is the Squirrel.Windows that is just finishing up installing your app - we launch your EXE on First Run, then exit, but if you jump on checking for updates the second you start up, Squirrel is still running. The fix is to not check for updates when |
Thanks for the clarification.
Why do you do that? And how come this isn't explained in any of the autoUpdater docs? I will try to clarify this on the docs and do a PR. |
This is in the docs for the See: https://github.com/electron/windows-installer#handling-squirrel-events |
Yes but when reading the autoUpdater docs or the You really can't expect your users to go read all the docs of all the dependencies for something as critical as this. |
@PierBover If
|
Technically you are right, but you do offer links to the servers for example, no? Since the autoUpdater docs are the first thing a user sees when trying to implement updates at least a mention wouldn't really hurt. Or at least you could offer a guide in your website where all this info is mentioned. Will you accept a PR if I try to clarify all this? |
Not for me to decide, but IMO this is a very specific use case. In order for a user to implement auto updates they will either have to:
The first two use cases have their own documentation which explains how everything works. The third one (your use case) does not have documentation or links to the relevant |
Although considering the amount of
I guess it couldn't hurt to put it here https://github.com/electron/electron/blob/master/docs/api/auto-updater.md#windows as a small note and a link to the |
Done: #7160 |
After the install process the app opens for the first time and I get this nasty JS error.
Sorry for the image but I haven't found a way of copying the text error.
This only happens when opening the app for the first time.
The text was updated successfully, but these errors were encountered: