Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application is not updating automatically via private GitHub repo #46

Open
muhsin-k opened this issue Feb 5, 2020 · 9 comments
Open

Comments

@muhsin-k
Copy link

muhsin-k commented Feb 5, 2020

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
Copy link
Author

muhsin-k commented Feb 6, 2020

@iffy Do you have any idea on this?

@ivangomes
Copy link

Any update guys?

@muhsin-k
Copy link
Author

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

@ivangomes
Copy link

ivangomes commented Mar 22, 2020

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
Copy link

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

@muhsin-k
Copy link
Author

muhsin-k commented Mar 22, 2020

@develar Yes

@ivangomes
Copy link

Working Again! Yay!

@mr339
Copy link

mr339 commented Nov 30, 2022

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?

@OldManMeta
Copy link

Any fix on this?

@mr339 I've got the exact same error message showing in a log. Did you get it fixed?

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants