You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changed the title [-]Windows: autoUpdater error when running app for the first time[/-][+]Windows: Squirrel autoUpdater error when running app for the first time[/+]on Sep 9, 2016
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 --squirrel-firstrun is in the arguments
@PierBover If electron-builder doesn't document it, it shouldn't end up in the Electron docs it should be documented on that repo. This functionality is independent of the autoUpdater module inside Electron 👍
electron-builder wraps / uses the electron-winstaller module (where it is documented correctly)
This functionality is independent of the autoUpdater module inside Electron
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?
derekbreden, sokki, Clonkex, AlexDicy, Pphoenix666 and 10 more
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:
Read the Squirrel.Windows docs and figure it out themselves
Read the electron-winstaller docs and implement that module
Use electron-builder which does everything for you
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 electron-winstaller documentation so personally I think it should be documented there.
Activity
[-]Windows: autoUpdater error when running app for the first time[/-][+]Windows: Squirrel autoUpdater error when running app for the first time[/+]anaisbetts commentedon Sep 9, 2016
Are you trying to update the app as soon as it's first installed? I bet you are :)
PierBover commentedon Sep 9, 2016
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?
PierBover commentedon Sep 9, 2016
@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?
anaisbetts commentedon Sep 9, 2016
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
--squirrel-firstrun
is in the argumentsPierBover commentedon Sep 9, 2016
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.
MarshallOfSound commentedon Sep 9, 2016
@PierBover
This is in the docs for the
windows-installer
moduleSee: https://github.com/electron/windows-installer#handling-squirrel-events
PierBover commentedon Sep 9, 2016
Yes but when reading the autoUpdater docs or the
electron-builder
docs there is mention about this.You really can't expect your users to go read all the docs of all the dependencies for something as critical as this.
MarshallOfSound commentedon Sep 9, 2016
@PierBover If
electron-builder
doesn't document it, it shouldn't end up in the Electron docs it should be documented on that repo. This functionality is independent of theautoUpdater
module inside Electron 👍electron-builder
wraps / uses theelectron-winstaller
module (where it is documented correctly)PierBover commentedon Sep 9, 2016
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?
MarshallOfSound commentedon Sep 9, 2016
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:
Squirrel.Windows
docs and figure it out themselveselectron-winstaller
docs and implement that moduleelectron-builder
which does everything for youThe 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
electron-winstaller
documentation so personally I think it should be documented there.MarshallOfSound commentedon Sep 9, 2016
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
electron-winstaller
docsPierBover commentedon Sep 9, 2016
Done: #7160