AutoUpdate not working
See original GitHub issue`import { autoUpdater } from “electron-updater”
if (process.env.WEBPACK_DEV_SERVER_URL) {
// Load the url of the dev server if in development mode
win.loadURL(process.env.WEBPACK_DEV_SERVER_URL)
if (!process.env.IS_TEST) win.webContents.openDevTools()
} else {
createProtocol('app')
// Load the index.html when not in development
win.loadURL('app://./index.html')
autoUpdater.checkForUpdatesAndNotify()
}
publish: [{
provider: “github”,
owner: “git account name”,
repo: “repo url”,
releaseType: “draft”,
channel: “latest”,
}]`
I have this in my background.js. I do all the steps, installed the app, increased versions, used npm run electron:build – -p always, I publish release on github. I get not update and no notification when I open the app again. I followed all steps from here https://nklayman.github.io/vue-cli-plugin-electron-builder/guide/recipes.html#auto-update
I used electron log to debug and I get:
Error: Error: Unsupported provider: undefined at newError (webpack:///./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js?:212:17) at createClient (webpack:///./node_modules/electron-updater/out/providerFactory.js?:103:48) at eval (webpack:///./node_modules/electron-updater/out/AppUpdater.js?:482:99) at async NsisUpdater.getUpdateInfoAndProvider (webpack:///./node_modules/electron-updater/out/AppUpdater.js?:485:20) at async NsisUpdater.doCheckForUpdates (webpack:///./node_modules/electron-updater/out/AppUpdater.js?:506:20)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
This behavior is intended by electron-builder. You can update from private repos, but it is only for very specific use cases. See the docs for more info.
Should i create a new issue for this?