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.

Location of app-update.yml

See original GitHub issue
  • Version: electron-builder 13.5.0 electron-updater 1.6.1
  • Target: Win x64 MacOS

It looks like appUpdater checks for app-update.yml inside the electron dist/resources folder. Without it you’ll get an error like:

Error: Error: ENOENT: no such file or directory, open 
'C:\Users\mike\AppData\Roaming\npm\node_modules\electron\dist\resources\app-update.yml'

This is problematic because if you install electron globally and use it to run applications using electron path/to/app, you will need to change the file depending on which app you’re running. Even if electron is installed locally you have to place the file in there to do any testing.

I would suggest first looking in the app folder that is running, and then falling back to the electron folder if not found. Or make it configurable so we can set the location.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
mikecaocommented, Feb 14, 2017

@develar You’re right, code signing does cause a problem. I tested macOS and got the error, Could not get code signature for running application. I assume the same thing will happen when Windows signing is required.

I think my workaround is good enough for now since it allows me to at least test the update request. This probably doesn’t need a fix. But It might be helpful to update the wiki to tell people they need to manually copy the app-update.yml after building if they want to test in dev. Or load it themselves using updateConfigPath.

2reactions
mikecaocommented, Feb 14, 2017

Maybe something like this will work?

autoUpdater.setConfig({
  provider: 'generic',
  url: 'https://website.com/download',
  channel: 'latest'
});

Production can still use the app-update.yml file while in dev you will have to configure it manually.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with app update yml files is not generated in electron?
If you have a problem with missing app-update.yml and dev-app-update.yml then paste the following code into index.js: import path from ...
Read more >
Auto Update - electron-builder
electron-builder automatically creates app-update.yml file for you on build in the resources (this file is internal, you don't need to be aware of...
Read more >
How to use the electron-updater.autoUpdater.autoDownload ...
To help you get started, we've selected a few electron-updater.autoUpdater.autoDownload examples, based on popular ways it is used in public projects.
Read more >
Cross platform updater for electron applications
@param options If you want to override configuration in the `app-update.yml`. */ setFeedURL(options) { // https://github.com/electron-userlan .
Read more >
Vue CLI Plugin Electron Builder — Auto Update (Private ...
“In order to develop/test UI/UX of updating without packaging the application you need to have a file named dev-app-update.yml in the root ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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