Auto update doesn't work: `app-update.yml` is missing
See original GitHub issue- Version: ^20.44.4
- electron-updater Version: ^4.0.14
- Target: --win --x64 NSIS
We noticed that auto-update doesn’t work on our newly released app. In our entry point we have:
import { autoUpdater } from "electron-updater";
// ...
autoUpdater.setFeedURL({
provider: "github",
owner: "org",
repo: "repo",
});
- No publish config in
package.json
- No
GH_TOKEN
- built on GitLab’s CI
- the initial release didn’t have a
latest.yml
file
We don’t have logs about what the actual error might be. We did many tests before and after with the same and similar setups and it seems to work for the most part (even without publish config). Nevertheless, we managed to probably reproduce the issue by setting up dummy projects in the same environment and we got:
An update is available.
Error in auto-updater. Error: ENOENT: no such file or directory, open 'C:\Users\xyz\AppData\Local\Programs\electron-updater-example\resources\app-update.yml'
The main difference being the environment, and in this particular environment if the publish
config is initially unset, app-update.yml
was not found in the installed app. Most interestingly, after removing the publish config app-update.yml
is still there.
To reproduce:
- release repo on github: https://github.com/gomorizsolt/electron-updater-releases/releases
- build repo on gitlab: https://gitlab.com/gomori.zsolt1995/electron-updater-test-project
- install 3.0.0, note that auto-update doesn’t work and
app-update.yml
is missing(build repo at 3.0.0: https://gitlab.com/gomori.zsolt1995/electron-updater-test-project/tree/f66d0bcd5b8912d3a9aa436cc74c4e546fe1bba4) - install 3.0.1, note that auto-update works and
app-update.yml
is present (build repo at 3.0.1: https://gitlab.com/gomori.zsolt1995/electron-updater-test-project/tree/c0d81fd3f10512eff5bb88bb7ba2a0117bc56ad3) - install 3.0.4 (which is supposed to revert the fixing change), note that auto-update works and
app-update.yml
is present (build repo at 3.0.4: https://gitlab.com/gomori.zsolt1995/electron-updater-test-project/tree/522cd15f0dd110d62705b99c9e019723a13628d4)
Found a few mentions about app-update.yml
not being found, most notably: https://github.com/electron-userland/electron-builder/issues/2736#issuecomment-456380922
But it’s never clear anywhere whether this is a known bug or what’s causing it and why this behavior seemingly isn’t idempotent.
I’d like to understand how to fix it and whether we have any recourse for resurrecting auto-updates for existing users (in case there could be other reasons for this behavior).
Issue Analytics
- State:
- Created 4 years ago
- Reactions:15
- Comments:38 (2 by maintainers)
Top GitHub Comments
Don’t close this issue. This is an automatic message by Fresh - a bot against stale bots.
This issue still exists on
electron-builder@^22.6.0
, tested on Windows 10 Pro (latest) and Linux Mint 19.3. I tried everything, including using the not-recommendedsetFeedURL
, but nothing seems to work.Every time user launches my app they see:
Unhandled Promise Rejection Error: ENOENT: no such file or directory, open '/opt/APP_NAME/resources/app-update.yml'
I checked the folder and the only file there is
app.asar
.cc @develar