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

[AutoUpdater] Updater fails to update - Error 2 #8793

Open
ljosberinn opened this issue Jan 21, 2025 · 1 comment
Open

[AutoUpdater] Updater fails to update - Error 2 #8793

ljosberinn opened this issue Jan 21, 2025 · 1 comment

Comments

@ljosberinn
Copy link

ljosberinn commented Jan 21, 2025

The exact error message is:

Failed to uninstall old application files. Please try running the installer again.: 2

We're prompting the user to update via a banner. If the user proceeds, the frontend calls ipcRenderer.invoke which the backend receives and just calls autoUpdater.downloadUpdate().

This is our autoUpdater.on('update-downloaded':

  autoUpdater.on('update-downloaded', () => {
    if (updateAvailableVersion === null) return;

    try {
      const isMac = platform() === 'darwin';
      const isSilent = !isMac;
      const forceRunAfter = !isMac;

      autoUpdater.quitAndInstall(isSilent, forceRunAfter);
    } catch (error) {
      reportException(error);
    }
  });

So I believe we're not interfering with anything as much as we can. The app - in many cases, which makes this not reproducible for us - closes successfully, performs the update and reboots after. Works as intended, until it doesnt. In some cases, as that's been the solution, there's lingering processes.

Image

Is there something we can do on our end to improve the situation?

@mmaietta
Copy link
Collaborator

What version of electron-builder/updater are you using? That error message looks very familiar as I recall applying a fix that I think might be related to what you're encountering. (Still trying to find the PR)

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

2 participants