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.

Error: Unable to find latest version on GitHub

See original GitHub issue
  • Electron-Builder Version: 23.0.3
  • Electron-Updater Version: 5.0.1
  • Node Version: 17.9.0
  • Electron Version: 18.0.3
  • Electron Type (current, beta, nightly): Current
  • Target: nsis

electron-updater 5.0.1 fails to auto update from private Github repo. If I build my app using v5.0.1 and a newer release is available on the private repo, I now get an error after autoUpdater.checkForUpdatesAndNotify()

autoUpdater.on('error', (error) => {
  console.error(error)
})

logs:

Error: Unable to find latest version on GitHub (https://api.github.com/api/v3/repos/<private-repo>), please ensure a production release exists: HttpError: 404 “method: GET url: https://api.github.com/api/v3/repos/<private-repo>/releases\n\nPlease double check that your authentication token is correct. Due to security reasons, actual status maybe not reported, but 404.\n” Headers: { “server”: “GitHub.com”, “date”: “Mon, 11 Apr 2022 16:02:57 GMT”, “content-type”: “application/json; charset=utf-8”, “x-oauth-scopes”: “repo, workflow, write:packages”, “x-accepted-oauth-scopes”: “repo”, “x-github-media-type”: “github.v3; format=json”, “x-ratelimit-limit”: “5000”, “x-ratelimit-remaining”: “4983”, “x-ratelimit-reset”: “1649694314”, “x-ratelimit-used”: “17”, “x-ratelimit-resource”: “core”, “access-control-expose-headers”: “ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset”, “access-control-allow-origin”: “*”, “strict-transport-security”: “max-age=31536000; includeSubdomains; preload”, “x-frame-options”: “deny”, “x-content-type-options”: “nosniff”, “x-xss-protection”: “0”, “referrer-policy”: “origin-when-cross-origin, strict-origin-when-cross-origin”, “content-security-policy”: “default-src ‘none’”, “vary”: “Accept-Encoding, Accept, X-Requested-With”, “content-encoding”: “gzip”, “x-github-request-id”: “E97B:0C3D:222588:2C9CBB:62545131” } at createHttpError (<local-install-path>\resources\app.asar\node_modules\builder-util-runtime\out\httpExecutor.js:14:12) at ElectronHttpExecutor.handleResponse (<local-install-path>\resources\app.asar\node_modules\builder-util-runtime\out\httpExecutor.js:116:20) at ClientRequest. (<local-install-path>\resources\app.asar\node_modules\builder-util-runtime\out\httpExecutor.js:82:26) at ClientRequest.emit (node:events:390:28) at SimpleURLLoaderWrapper. (node:electron/js2c/browser_init:101:6917) at SimpleURLLoaderWrapper.emit (node:events:390:28)

Looks like it may be failing to authenticate with the private token which I include in my package.json. Here is the build part of my package.json:

"build": {
    "publish": [
      {
        "provider": "github",
        "releaseType": "release",
        "private": true,
        "token": "<private-token>"
      }
    ],
    "win": {
      "target": "nsis"
    },
    "nsis": {
      "deleteAppDataOnUninstall": true,
      "oneClick": false
    },
    "directories": {
      "buildResources": "assets"
    }
  }

Reverting back to v4.6.5 of electron-updater fixes the issue.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
mozainuddincommented, Apr 20, 2022

+, I downgrade Electron-Updater to version 4.6.5 and it works fine now.

1reaction
odusseyscommented, Oct 12, 2022

I am still getting this using 5.2.1 - public repo, releases are there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to find latest version on GitHub, please ensure a ...
I'm using electron-updade, I can generate the builds using localhost and update normal, but when I use Github I can't see the versions,...
Read more >
Github Action broken (unable to find version "stable") #2079
I'm pretty sure this isn't my fault, but our Github Action just started failing with the following message: Error: Unable to resolve action ......
Read more >
Action fails to find latest releases in GitHub Enterprise #442
I'm running on Enterprise edition, any tests using this action are failing with: Looking for latest release on branch: main with prefix: ....
Read more >
actions/checkout@v2.4.0 , unable to find version v2.4.0 #661
i tried. uses: actions/checkout@v2.4.0. but. actions/checkout@v2.4.0, unable to find version v2.4.0. error displayed plz help me ...
Read more >
Poetry not always find latest version from PyPi #3543 - GitHub
SolverProblemError Because p2 depends on p1 (>=2.0,<3.0) which doesn't match any versions, version solving failed. but poetry run pip install p1 ...
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