electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.69k stars 1.74k forks source link

Could not locate update bundle #6932

Closed lucaslomeu closed 2 years ago

lucaslomeu commented 2 years ago

[Error: Could not locate update bundle for com.github.Electron within file:///Users/lucas/Library/Caches/com.github.Electron.ShipIt/update.erv01nk/] { code: 2, domain: 'SQRLUpdaterErrorDomain' } Error: Error: Could not locate update bundle for com.github.Electron within file:///Users/lucas/Library/Caches/com.github.Electron.ShipIt/update.erv01nk/

lucaslomeu commented 2 years ago

@mmaietta @develar

qiqetes commented 2 years ago

Same thing happening to me. My guess is the cache clears too fast and is not able to quit and install after having the file unziped.

qiqetes commented 2 years ago
  • Electron-Builder Version: 22.14.2

  • Node Version: 16.14.2

  • Electron Version: 13.1.9

  • Electron Type (current, beta, nightly): current

  • Target: MacOS, but i need WML

[Error: Could not locate update bundle for com.github.Electron within file:///Users/lucas/Library/Caches/com.github.Electron.ShipIt/update.erv01nk/] { code: 2, domain: 'SQRLUpdaterErrorDomain' } Error: Error: Could not locate update bundle for com.github.Electron within file:///Users/lucas/Library/Caches/com.github.Electron.ShipIt/update.erv01nk/

Ok, so I came with the solution.

Your application need a bundleId, the problem is even if you set it for the electron-packager in the package.json. When you execute the app with npm start the bundleId is set to com.github.Electron while the one in your packaged app that you uploaded to your releases server is: com.yourcompany.yourapp.

The autoUpdater checks them and silently deletes the unziped application, giving you the error Could not locate update bundle....

Solution:

Execute the autoupdater with your packaged app.

Vuduccong2000 commented 1 year ago

{ "name": "CryptoLegacy", "version": "1.0.0", "main": "main.js", "browser": { "fs": false, "path": false, "os": false }, "scripts": { "ng": "ng", "start": "ng build --configuration development --base-href ./ && electron .", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "watch": "ng build --watch --configuration development", "electron:local": "electron .", "electron:linux": "npm run build && npx electron-builder build --linux", "electron:windows": "npm run build && npx electron-builder build --windows", "electron:mac": "npm run build && npx electron-builder build --mac" }, "repository": "https://github.com/Vuduccong2000/electronjs-autoupdater", "publish": { "provider": "github", "releaseType": "release" }, "private": true, "dependencies": { "@angular/animations": "~13.2.0", "@angular/common": "~13.2.0", "@angular/compiler": "^13.3.12", "@angular/core": "~13.2.0", "@angular/forms": "~13.2.0", "@angular/platform-browser": "~13.2.0", "@angular/platform-browser-dynamic": "~13.2.0", "@angular/router": "~13.2.0", "@ng-bootstrap/ng-bootstrap": "^5.3.1", "@types/axios": "^0.14.0", "@types/cors": "^2.8.13", "@types/express": "^4.17.17", "axios": "^1.3.4", "bip39": "^3.0.4", "cors": "^2.8.5", "electron-context-menu": "^3.6.1", "electron-log": "^5.0.0-beta.25", "electron-progressbar": "^2.1.0", "electron-updater": "^5.3.0", "express": "^4.18.2", "fs-extra": "^11.0.0", "koffi": "^2.2.1", "machine-uuid": "^1.2.0", "ngx-spinner": "^13.1.1", "node-fetch": "^3.2.10", "request": "^2.88.2", "rxjs": "~7.5.0", "tslib": "^2.3.0", "url": "^0.11.1", "webpack": "^5.85.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~13.2.6", "@angular/cli": "~13.2.6", "@angular/compiler-cli": "~13.2.0", "@types/electron": "^1.6.10", "@types/jasmine": "~3.10.0", "@types/node": "^12.11.1", "electron": "^22.3.2", "electron-builder": "^23.6.0", "electron-packager": "^16.0.0", "electron-wix-msi": "^5.0.0", "electron-wix-msi-custom": "^2.1.5", "jasmine-core": "~4.0.0", "javascript-obfuscator": "^4.0.2", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.1.0", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "~1.7.0", "ngx-electron": "^2.2.0", "typescript": "~4.5.2" }, "build": { "appId": "com.cryptoLegacy.app", "asar": false, "productName": "cryptoLegacyClient", "compression": "maximum", "directories": { "output": "./build/", "buildResources": "dist" }, "files": [ "main.js", "logo.ico", "dist" ], "publish": { "provider": "github", "owner": "Vuduccong2000", "repo": "electronjs-autoupdater" }, "win": { "target": "nsis" }, "mac": { "category": "com.cryptoLegacy.app", "target": [ "dmg", "zip" ], "icon": "assets/icons/icon.icns" } } }

Vuduccong2000 commented 1 year ago

there is my package.json file, when i run npm start still the same error

whitesunset commented 4 months ago

same issue, any solution?

lucaslomeu commented 4 months ago

At the time I managed to solve the problem, but I no longer have the code or remember the solution. Can you send a print or something like that to try to help?