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.

app-update.yml not generated when using --prepackaged flag

See original GitHub issue
  • Version: “electron-builder”: “^20.8.1”, “electron-updater”: “^2.21.4”,
  • Target: Windows/NSIS

A similar issue is found here: #2667 but what worked for op didn’t work for me. I am trying to get auto-update working in my application but can’t seem to get past this error about missing app-update.yml.

After running this build script: "package-win-release": "build --win --ia32 --prepackaged ./release/win-ia32-unpacked", an installer is generated as well as the latest.yml file.

After running the installer, starting the app, and looking at the log file found here C:\Users\userName\AppData\Roaming\myApp for auto-update, I’m seeing this:

[2018-03-30 14:55:28.935] [info] ---- checking for update...
[2018-03-30 14:55:28.966] [info] Checking for update
[2018-03-30 14:55:28.966] [info] Checking for update...
[2018-03-30 14:55:29.639] [error] Error: Error: ENOENT: no such file or directory, open 'C:\Program Files (x86)\myApp\resources\app-update.yml'
 at t.NsisUpdater.loadUpdateConfig (C:\Program Files (x86)\myApp\resources\app.asar\webpack:\node_modules\electron-updater\out\AppUpdater.js:508:1)
 at t.Lazy.configOnDisk [as creator] (C:\Program Files (x86)\myApp\resources\app.asar\webpack:\node_modules\electron-updater\out\AppUpdater.js:210:1)
 at t.Lazy.get value [as value] (C:\Program Files (x86)\myApp\resources\app.asar\webpack:\node_modules\lazy-val\out\main.js:22:1)
 at t.NsisUpdater.getUpdateInfo (C:\Program Files (x86)\myApp\resources\app.asar\webpack:\node_modules\electron-updater\out\AppUpdater.js:421:1)
 at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:109:7)
[2018-03-30 14:55:29.639] [info] Error updating app.

package.json build configuration below. I’ve added the publish configuration to all of the areas that I’ve seen examples of. I’ve also tried setting the publish configuration in those specific areas but still no luck.

  "build": {
    "productName": "my product name",
    "appId": "com.app.id",
    "compression": "normal",
    "nodeGypRebuild": false,
    "asar": true,
    "files": [
      "dist/",
      "node_modules/",
      "app.html",
      "main.prod.js",
      "main.prod.js.map",
      "package.json"
    ],
    "extraFiles": [],
    "dmg": {
      "contents": [
        {
          "x": 130,
          "y": 220
        },
        {
          "x": 410,
          "y": 220,
          "type": "link",
          "path": "/Applications"
        }
      ]
    },
    "target": [
      "nsis"
    ],
    "publish": [{
      "provider": "generic",
      "url": "http://localhost:8088"
    }],
    "win": {
      "target": "nsis",
      "publisherName": "publisher",
      "icon": "resources/icon",
      "publish": [{
        "provider": "generic",
        "url": "http://localhost:8088"
      }]
    },
    "linux": {
      "target": [
        "deb",
        "AppImage"
      ],
      "category": "Development"
    },
    "nsis": {
      "oneClick": false,
      "allowElevation": true,
      "perMachine": true,
      "artifactName": "${productName}-Setup.${buildVersion}.${ext}",
      "publish": [{
        "provider": "generic",
        "url": "http://localhost:8088"
      }]
    },
    "directories": {
      "buildResources": "resources",
      "output": "release"
    }
  },

UPDATE 4/2/2018: After removing --prepackaged flag from the build script, the app-update.yml file is generated but the application is not working. How does the --prepackaged flag affect the build and creation of app-update.yml?

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
SentoxAIOcommented, Dec 15, 2020

+1, I am facing the same issue

3reactions
FoonkGcommented, Dec 15, 2020

I’m having the same issue, please reopen this.

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:
Read more >
OpenFaaS YAML file reference
Generate Kubernetes resources. Did you know that the OpenFaaS YAML files can also be converted into Kubernetes resources using faas-cli generate ?
Read more >
Release Notes | Google Cloud CLI Documentation
Add --service-account flag of gcloud app update to GA, which allows to update the ... change with the command gcloud app deploy when...
Read more >
Tutorial for using feature flags in a Spring Boot app
In this tutorial, you learn how to implement feature flags in Spring ... The feature manager supports application.yml as a configuration ...
Read more >
Feature flags - GitLab Docs
Stickiness (consistent application behavior for the same user) is guaranteed for logged-in users, but not anonymous users. Note that percent rollout with a ......
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