question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:

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:closed
  • Created 4 years ago
  • Reactions:15
  • Comments:38 (2 by maintainers)

github_iconTop GitHub Comments

22reactions
thisismydesigncommented, Jul 25, 2020

Don’t close this issue. This is an automatic message by Fresh - a bot against stale bots.

18reactions
xxczakicommented, May 25, 2020

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-recommended setFeedURL, 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with app update yml files is not generated in electron?
I fixed it by using autoUpdater.setFeedURL() before autoUpdater.checkForUpdates() . Below is the code snippet that works for github releases.
Read more >
Auto Update - electron-builder
Do not call setFeedURL. electron-builder automatically creates app-update.yml file for you on build in the resources (this file is internal, you don't need ......
Read more >
Configuring build settings - AWS Amplify Hosting
Configure the build settings for an app deployed with Amplify Hosting.
Read more >
Create and Configure Jobs and Pipelines Using YAML
When it detects an update to a file with the .yml extension in the .ci-build directory of a Git ... If the job...
Read more >
Helm Upgrade
This command upgrades a release to a new version of a chart. The upgrade arguments must be a release and chart. The chart...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found