electron-updater-example icon indicating copy to clipboard operation
electron-updater-example copied to clipboard

Application is not updating automatically via private GitHub repo

Open muhsin-k opened this issue 5 years ago • 9 comments

I have followed all the steps in this doc

Version:

  • electron: 7.1.3
  • electron-updater: 4.2.0
  • electron-builder: 21.2.0
  • electron-notarize: 0.2.1
  • Working on: MacOS Catalina 10.15

Build Config

"build": {
      {
        "repo": <REPO_NAME>,
        "private": true,
        "owner": "muhzi4u",
        "provider": "github",
        "publishAutoUpdate": true,
        "GH_TOKEN": <GITHUB_TOKEN>
      }
    ]
  }

Electron Entry


const { autoUpdater } = require('electron-updater');
app.on('ready', async () => {
  autoUpdater.checkForUpdatesAndNotify();
  createWindow();
});

The app is uploading to GitHub releases.

Screenshot 2020-02-05 at 5 09 59 PM

But when I release the further versions. The app is not updating automatically. What is the issue here?

muhsin-k avatar Feb 05 '20 14:02 muhsin-k

@iffy Do you have any idea on this?

muhsin-k avatar Feb 06 '20 04:02 muhsin-k

Any update guys?

ivangomes avatar Mar 22 '20 15:03 ivangomes

@ivangomes Finally I managed to fix the issue. Could you please share the configuration. I can help you with this?

muhsin-k avatar Mar 22 '20 16:03 muhsin-k

My package.json:

{ "name": "coldstorage", "version": "1.0.0", "description": "Go Cold Storage", "main": "main.js", "repository": { "type": "git", "url": "DEMO" }, "scripts": { "start": "electron .", "build": "electron-builder build --mac --publish never", "deploy": "electron-builder build --mac -p always" }, "author": "Ivan Gomes", "license": "ISC", "devDependencies": { "electron": "^3.0.2", "electron-builder": "^22.4.1" }, "dependencies": { "electron-log": "^1.3.0", "electron-updater": "^4.0.6" } }

My electron-builder.json

{ "productName": "coldstorage", "appId": "com.wmsgosoftware.coldstorage", "directories": { "output": "dist/${version}" }, "publish": [ { "provider": "github", "repo": "coldstorage", "owner": "ivangomes", "vPrefixedTagName": true, "token": "", "private": true, "releaseType": "draft", "publishAutoUpdate": true } ] }

Sure any help will be very welcome!

ivangomes avatar Mar 22 '20 16:03 ivangomes

update: using "electron-updater": "^4.0.6" works for me!

Are you using:

electron: 7.1.3 electron-updater: 4.2.0 electron-builder: 21.2.0 electron-notarize: 0.2.1

ivangomes avatar Mar 22 '20 16:03 ivangomes

@develar Yes

muhsin-k avatar Mar 22 '20 17:03 muhsin-k

Working Again! Yay!

ivangomes avatar Mar 23 '20 21:03 ivangomes

Hi @ivangomes @muhsin-k does your app work if the repo is private? i get this error when i open the app downloaded from the asset of latest release. "Error in auto-updater. HttpError: 404 "method: GET url: https://github.com/user/electron-updater-example/releases.atom\n\nPlease double check that your authentication token is correct" But if i change the repo to public , the same app works if i reopen it. electron": "^14.0.1", "electron-builder": "^22.11.7", "electron-notarize": "^1.1.1" }, "dependencies": { "electron-log": "^4.4.1", "electron-updater": "^4.3.9" },

Any idea on this? or does this auto-update only work if the repo if public?

mr339 avatar Nov 30 '22 16:11 mr339