Electron-builder: Auto update is broken on Windows

Created on 26 Jun 2020  Â·  8Comments  Â·  Source: electron-userland/electron-builder


  • Version: 22.0.7


  • Electron Version: 9.0.5
  • Electron Type (current, beta, nightly): current
  • Electron Updater Version: 4.3.1
  • Target: default target


Here is my story

I wanted to add auto update feature for mac and windows. For mac it's working fine, but when I started implementing it for windows I ran into this issue https://github.com/electron-userland/electron-builder/issues/4736, I saw it's still opened, but PR is ready and the author suggested to edit source code in node_modules as a workaround. Ok, it worked. Then I got a new issue https://github.com/electron-userland/electron-builder/issues/1910 and I started to worry. I cloned the hello world of electron (electron-quick-start) and tried to add auto update there. The same problems. Note: I wanted to implement auto update with custom http server, so I added "provider": "generic" and "url": "my_url". The auto updater successfully downloads, notifies and I call autoUpdater.quitAndInstall();. Installer opens and starts installing and closes.

Here is the minimal reproduction https://github.com/ms-dosx86/electron-builder-repro

  1. npm i
  2. npm run electron-builder
  3. Install it from dist folder
  4. Increase the version in package.json
  5. npm run electron-builder
  6. npx http-server dist
  7. Run the app

The app notifies that an update is available, you click "Restart", the update is installing and the installer closes.
You open the app one more time and the same thing happens. Looks like the installer can't install or something.

Most helpful comment

The problem was in the artifactName https://github.com/electron-userland/electron-builder/issues/3924. Just add version in your electron-build.yml artifactName: "myapp ${version}.${ext}". The maintainers didn't even respond to the issue and closed automatically. This is just ridiculous.

All 8 comments

The problem was in the artifactName https://github.com/electron-userland/electron-builder/issues/3924. Just add version in your electron-build.yml artifactName: "myapp ${version}.${ext}". The maintainers didn't even respond to the issue and closed automatically. This is just ridiculous.

@ms-dosx86 Same error with,How did you solve it in the end ?

i also clone electron-quick-start and set

"artifactName": "${productName}_${version}.${ext}"


"electron-updater": "^4.3.1",
"electron": "^9.0.5",
"electron-builder": "^22.7.0",

But it seems useless

@THROFHR Try without an underscore

I try without an underscore and even lowering the dependent version, but it seems to be useless。

maybe it is a problem with my computer, currently I can only add a reminder to the UI to let the user install it manually

@THROFHR What is the exact error? Maybe worth to try even without the artifactName. I also was playing with electron quick start and it worked. Or you can send a link to your quickstart repository.

I have catch the error, but there are no errors in the log.
After executing autoUpdater.quitAndInstall(), the application exited successfully, but it did not restart. After I started it manually, the version did not update.

have you got the solution? @THROFHR

@THROFHR What is the exact error? Maybe worth to try even without the artifactName. I also was playing with electron quick start and it worked. Or you can send a link to your quickstart repository.

@ms-dosx86
just add this "artifactName": "${productName}_${version}.${ext}". in package.json file?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iklemm picture iklemm  Â·  3Comments

popod picture popod  Â·  3Comments

antonycourtney picture antonycourtney  Â·  3Comments

alexstrat picture alexstrat  Â·  3Comments

NPellet picture NPellet  Â·  3Comments