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

NSIS fails to autoUpdate when launched from app - exe rename necessary? #4711

Closed
gajop opened this issue Feb 26, 2020 · 13 comments
Closed

NSIS fails to autoUpdate when launched from app - exe rename necessary? #4711

gajop opened this issue Feb 26, 2020 · 13 comments
Labels

Comments

@gajop
Copy link

gajop commented Feb 26, 2020

Relevant package.json versions:

"electron": "^8.0.0",
"electron-builder": "^22.3.2"
"electron-updater": "^4.2.0"

NSIS build seutp:

"nsis": {
  "oneClick": false,
  "allowToChangeInstallationDirectory": true,
  "perMachine": false
}

I'm having trouble with the NSIS build while doing autoUpdates. I'm experiencing the following behavior:

  1. The installer gets downloaded successfully through the app (full download) - OK
  2. App quits and launches the installer - OK
  3. NSIS installer successfully detects an existing build and tries to install there - OK
  4. For whatever reason, it fails to update and crashes (terminates?) mid install. - Error

I don't know how to provide more information for step 4: there doesn't seem to be a log available anywhere, and I don't get an error message at any point. The only thing I can note is that successful updates happen with the progress bar "restarting" 2 times (reverting back in progress), while unsuccessful ones seem to freeze during the 1st time and then stop (crash?) without going to the last page.

What seems to work every time is if I manually download the new executable and rename it. I was renaming these files in order to keep some sort of record of various versions. If I run the renamed version (in this case Chobby-1.36.0.exe) it will successfully update. If I run it as Chobby.exe it will fail - same like the autoUpdater version.
So my conclusion is that for whatever reason the updater executable file name must be different than App.exe

@gajop
Copy link
Author

gajop commented Apr 12, 2020

Following up on this, here's a very simple repository that will fail to update: https://github.com/gajop/electron-builder-example

Steps to reproduce:

  1. Build with npm run build-win and install (either system or single user)
  2. Change version in https://github.com/gajop/electron-builder-example/blob/master/package.json#L3 to 1.0.1 and build again.
  3. Try installing (the installer will crash).

I found two different workarounds:

  1. Do not specify an artifactName (https://github.com/gajop/electron-builder-example/blob/master/package.json#L12). This will generate an installer with a slightly different name which allows it to update.
  2. Use oneClick installer: OneClick installers don't seem to suffer from this problem.

Still searching for a more satisfactory solution.

@robmro27
Copy link

robmro27 commented Apr 16, 2020

I was able to reproduce this different way. 2 use cases:

  • download manually some version ie. 1.3.9 filename: TEST
  • install
  • download manually bumped version 1.3.10 filename: TEST (1) <- added by Windows
  • install
    WORKS - app reinstall and runs
  • download manually some version ie. 1.3.9 filename: TEST
  • install
  • remove old file from downloads folder
  • download manually bumped version 1.3.10 filename: TEST <- nothing changes this time in filename
  • install
    NOT WORKS - app reinstall (steps showing) but not run after it finish installing (checkbox run after checked) and after manually launch it shows version 1.3.9 still
Provider GENERIC.
"nsis": {
      "oneClick": false,
      "allowToChangeInstallationDirectory": true
    }
electronVersion: 4.2.8

@stale
Copy link

stale bot commented Jun 15, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Jun 15, 2020
@gajop
Copy link
Author

gajop commented Jun 15, 2020

bump

@stale stale bot removed the backlog label Jun 15, 2020
@stale
Copy link

stale bot commented Aug 15, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Aug 15, 2020
@gajop
Copy link
Author

gajop commented Aug 15, 2020

Still relevant and still affecting a lot of our users...
Is there anything I can do to help? @develar can you give me a hint where to look at? I'm willing to help get this fixed in any way I can.

@stale stale bot removed the backlog label Aug 15, 2020
@stale
Copy link

stale bot commented Oct 14, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Oct 14, 2020
@gajop
Copy link
Author

gajop commented Oct 17, 2020

bumping yet again ¯_(ツ)_/¯

@stale
Copy link

stale bot commented Dec 17, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Dec 17, 2020
@gajop
Copy link
Author

gajop commented Dec 19, 2020

bumping yet again ¯_(ツ)_/¯

@stale stale bot removed the backlog label Dec 19, 2020
@stale
Copy link

stale bot commented Feb 18, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Feb 18, 2021
@ejwilburn
Copy link

Seeing the same issue with the guided installer, see my comments here: #5573 (comment)

@stale stale bot removed the backlog label Mar 11, 2021
@stale
Copy link

stale bot commented Jun 5, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants