What should I do when 'electron-updater' throws the error 'ERR_UPDATER_ASSET_NOT_FOUND'

1.4k Views Asked by At

I've been trying to get electron-updater to update from latest releases that I put on Github but it keeps triggering this error.

code: 'ERR_UPDATER_ASSET_NOT_FOUND' }

What kind of files do you need to have in a Github release in order for previous versions to update properly?

so far I have the setup.exe, the setup.exe.blockmap, and the latest.yml

It successfully detects that an update is available in

autoUpdater.on('update-available', () => {

but then immediately throws an error in

autoUpdater.on('error', (err, err2) => {

resulting in an error of code: 'ERR_UPDATER_ASSET_NOT_FOUND' }

Previously, I had an issue where I was forgetting to put in latest.yml, but now, I'm really not sure as to what I should do.

1

There are 1 best solutions below

0
On

check the latest.yml file. It should be something like this -

version: 1.1.0
files:
  - url: ${Application-Name}.1.1.0.exe
    sha512:${EncodedString}
    size: 150466849
    isAdminRightsRequired: true
path: ${Application-Name}.1.1.0.exe
sha512:${EncodedString}
releaseDate: '2021-04-26T14:26:54.929Z'

Most probably, the url name and path might not be matching with the uploaded file names in github. Spaces are replaced with - in github. It might be naming issue. I faced the similar issue.