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.

latest-linux.yml and app-update.yml were not generated when building

See original GitHub issue
  • Version: 19.35.1
  • Target: Linux AppImage

I am trying to use the electron-updater to implement auto-updates for Windows, Mac, and Linux Electron Apps on Ubuntu 14.04 system. When I was building the win32 target and Mac target, the app-update.yml and latest.yml(latest-mac.yml) are all generated successfully. But when I am trying to build Linux target, none of these two files(app-update.yml, latest-linux.yml) was generated in build/linux-unpacked/resources and build , and so when I run the released app, the auto-updater doesn’t work, the ERROR log is:

~/Code/Orthodontic-assistant/Orthodontic-assistant-front-end/build(feature/auto_update*) » ./dental-assistant-0.0.1-x86_64.AppImage                                hviktortsoi@l430
installed: X-AppImage-BuildId=545bc180-2ec3-11a8-04da-9540d2b04f01 image: X-AppImage-BuildId=afdaf000-2ecb-11a8-3116-41f069bbf925
[02:57:10.145] [info] App starting...
[02:57:10.473] [info] Checking for update
[02:57:10.474] [info] Checking for update...
[02:57:10.746] [error] Error: Error: ENOENT: no such file or directory, open '/tmp/.mount_dentalN01w1W/app/resources/app-update.yml'
    at AppImageUpdater.loadUpdateConfig (/tmp/.mount_dentalN01w1W/app/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:380:27)
    at Lazy.AppUpdater.configOnDisk [as creator] (/tmp/.mount_dentalN01w1W/app/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:134:43)
    at Lazy.get value [as value] (/tmp/.mount_dentalN01w1W/app/resources/app.asar/node_modules/electron-updater/node_modules/lazy-val/src/main.ts:18:23)
    at AppImageUpdater.getUpdateInfo (/tmp/.mount_dentalN01w1W/app/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:287:33)
    at <anonymous>
[02:57:10.747] [info] Error in auto-updater.

I’m sure that the target is Linux AppImge(using the default option), so the solution in #2498 doesn’t work for me…

My build comman is: DEBUG=electron-builder:* npm run build -- --linux

package.json:

{
  "name": "dental-assistant",
  "version": "0.0.1",
  "author": "QingfengLi <liqingfengzzu@163.com>",
  "description": "An electron-vue project",
  "homepage": "https://coding.net/u/liqingfeng/p/Orthodontic-assistant",
  "license": null,
  "main": "./dist/electron/main.js",
  "scripts": {
    "build": "node .electron-vue/build.js && electron-builder",
    "build:dir": "node .electron-vue/build.js && electron-builder --dir",
    "build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
    "build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
    "dev": "node .electron-vue/dev-runner.js",
    "e2e": "npm run pack && mocha test/e2e",
    "lint": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter src test",
    "lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix src test",
    "pack": "npm run pack:main && npm run pack:renderer",
    "pack:main": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.main.config.js",
    "pack:renderer": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.renderer.config.js",
    "test": "npm run unit && npm run e2e",
    "unit": "karma start test/unit/karma.conf.js",
    "postinstall": "npm run lint:fix"
  },
  "build": {
    "publish": [
      {
        "provider": "generic",
        "url": "http://127.0.0.1:8089/"
      }
    ],
    "productName": "dental-assistant",
    "appId": "org.simulatedgreg.electron-vue",
    "directories": {
      "output": "build"
    },
    "files": [
      "dist/electron/**/*"
    ],
    "dmg": {
      "contents": [
        {
          "x": 410,
          "y": 150,
          "type": "link",
          "path": "/Applications"
        },
        {
          "x": 130,
          "y": 150,
          "type": "file"
        }
      ]
    },
    "mac": {
      "icon": "build/icons/icon.icns"
    },
    "win": {
      "icon": "build/icons/icon.ico"
    },
    "linux": {
      "icon": "build/icons"
    }
  },
  "dependencies": {
    "axios": "^0.16.2",
    "cropperjs": "^1.2.2",
    "electron-log": "^2.2.14",
    "electron-updater": "^2.21.3",
    "element-ui": "^2.0.11",
    "querystring": "^0.2.0",
    "snapsvg": "^0.5.1",
    "vue": "^2.5.13",
    "vue-awesome": "^2.3.4",
    "vue-electron": "^1.0.6",
    "vue-router": "^3.0.1",
    "vuex": "^3.0.1"
  },
  "devDependencies": {
    "babel-core": "^6.25.0",
    "babel-eslint": "^7.2.3",
    "babel-loader": "^7.1.1",
    "babel-plugin-istanbul": "^4.1.1",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-env": "^1.6.0",
    "babel-preset-stage-0": "^6.24.1",
    "babel-register": "^6.24.1",
    "babili-webpack-plugin": "^0.1.2",
    "cfonts": "^1.1.3",
    "chai": "^4.0.0",
    "chalk": "^2.1.0",
    "copy-webpack-plugin": "^4.0.1",
    "cross-env": "^5.0.5",
    "css-loader": "^0.28.4",
    "del": "^3.0.0",
    "devtron": "^1.4.0",
    "electron": "^1.7.5",
    "electron-builder": "^19.19.1",
    "electron-debug": "^1.4.0",
    "electron-devtools-installer": "^2.2.0",
    "eslint": "^4.4.1",
    "eslint-config-standard": "^10.2.1",
    "eslint-friendly-formatter": "^3.0.0",
    "eslint-loader": "^1.9.0",
    "eslint-plugin-html": "^3.1.1",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-node": "^5.1.1",
    "eslint-plugin-promise": "^3.5.0",
    "eslint-plugin-standard": "^3.0.1",
    "extract-text-webpack-plugin": "^3.0.0",
    "file-loader": "^0.11.2",
    "html-webpack-plugin": "^2.30.1",
    "inject-loader": "^3.0.0",
    "karma": "^1.3.0",
    "karma-chai": "^0.1.0",
    "karma-coverage": "^1.1.1",
    "karma-electron": "^5.1.1",
    "karma-mocha": "^1.2.0",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-spec-reporter": "^0.0.31",
    "karma-webpack": "^2.0.1",
    "mocha": "^3.0.2",
    "multispinner": "^0.2.1",
    "node-loader": "^0.6.0",
    "require-dir": "^0.3.0",
    "spectron": "^3.7.1",
    "style-loader": "^0.18.2",
    "url-loader": "^0.5.8",
    "vue-html-loader": "^1.2.4",
    "vue-loader": "^13.3.0",
    "vue-style-loader": "^3.0.1",
    "vue-svg-icon": "^1.2.9",
    "vue-template-compiler": "^2.5.13",
    "webpack": "^3.6.0",
    "webpack-dev-server": "^2.9.1",
    "webpack-hot-middleware": "^2.18.2",
    "webpack-merge": "^4.1.0"
  }
}

and the build logs:

OKAY  take it away `electron-builder`

electron-builder 19.35.1
No native production dependencies
Packaging for linux x64 using electron 1.7.8 to build/linux-unpacked
Building AppImage for arch x64
⚠️  Application category is not set for Linux (linux.category).
Please see https://electron.build/configuration/configuration#LinuxBuildOptions-category
 electron-builder:binDownload Found existing appimage /home/hviktortsoi/.cache/electron-builder/appimage/appimage-9.0.1+0ms
 electron-builder:publish Explicit publish provider: [
 electron-builder:publish   {
 electron-builder:publish     "provider": "generic",
 electron-builder:publish     "url": "http://127.0.0.1:8089/"
 electron-builder:publish   }
 electron-builder:publish ] +0ms
 electron-builder:publish artifactCreated (isPublish: false): {
 electron-builder:publish   "file": "/home/hviktortsoi/Code/Orthodontic-assistant/Orthodontic-assistant-front-end/build/dental-assistant-0.0.1-x86_64.AppImage",
 electron-builder:publish   "safeArtifactName": null,
 electron-builder:publish   "target": {
 electron-builder:publish     "name": "appImage",
 electron-builder:publish     "isAsyncSupported": true,
 electron-builder:publish     "packager": "<stripped sensitive data>",
 electron-builder:publish     "helper": {
 electron-builder:publish       "packager": "<stripped sensitive data>",
 electron-builder:publish       "maxIconPath": "/home/hviktortsoi/Code/Orthodontic-assistant/Orthodontic-assistant-front-end/build/icons/256x256.png",
 electron-builder:publish       "icons": {
 electron-builder:publish         "isFulfilled": true,
 electron-builder:publish         "isRejected": false,
 electron-builder:publish         "fulfillmentValue": [
 electron-builder:publish           {
 electron-builder:publish             "file": "/home/hviktortsoi/Code/Orthodontic-assistant/Orthodontic-assistant-front-end/build/icons/256x256.png",
 electron-builder:publish             "size": 256
 electron-builder:publish           }
 electron-builder:publish         ]
 electron-builder:publish       }
 electron-builder:publish     },
 electron-builder:publish     "outDir": "/home/hviktortsoi/Code/Orthodontic-assistant/Orthodontic-assistant-front-end/build",
 electron-builder:publish     "options": {
 electron-builder:publish       "icon": "build/icons"
 electron-builder:publish     },
 electron-builder:publish     "desktopEntry": {
 electron-builder:publish       "creator": null,
 electron-builder:publish       "_value": {
 electron-builder:publish         "isFulfilled": true,
 electron-builder:publish         "isRejected": false,
 electron-builder:publish         "fulfillmentValue": "[Desktop Entry]\nName=dental-assistant\nComment=An electron-vue project\nExec=AppRun\nTerminal=false\nType=Application\nIcon=dental-assistant\nX-AppImage-Version=0.0.1\nX-AppImage-BuildId=f6c96b00-2f29-11a8-30f8-6da529ef1d20\nCategories=Utility;\n"
 electron-builder:publish       }
 electron-builder:publish     }
 electron-builder:publish   },
 electron-builder:publish   "arch": 1,
 electron-builder:publish   "packager": "<stripped sensitive data>"
 electron-builder:publish },
 electron-builder:publish   publishConfigs: [
 electron-builder:publish   {
 electron-builder:publish     "provider": "generic",
 electron-builder:publish     "url": "http://127.0.0.1:8089/"
 electron-builder:publish   }
 electron-builder:publish ] +5ms

Thx…

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:12
  • Comments:10

github_iconTop GitHub Comments

3reactions
negativalphacommented, Jan 22, 2019

Same here (electron-builder 20.38.5).

Edit: The app-update.yml seems to be skipped if there are no publish options specified for the build target, so, adding some placeholder values allowed me to bypass said issue.

0reactions
gpetrovcommented, Dec 11, 2022

still a problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
How is electron-updater able to find my repository?
The app-update.yml file is produced by electron-builder using the information from git remote get-url origin (if available). I ...
Read more >
Troubleshoot snap building | Snapcraft documentation
Troubleshoot snap building. When creating snapcraft.yaml and building a new snap, it's not uncommon to encounter build issues when running snapcraft.
Read more >
Electron Docs
NOTICE: 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' ......
Read more >
Custom build images | AppVeyor
Custom images enable new use cases that were not possible before in a hosted CI/CD: ... Below is the sample appveyor.yml to build...
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