Skip to content

Auto update doesn't work: app-update.yml is missing #4233

@thisismydesign

Description

@thisismydesign
  • 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: #2736 (comment)

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions