Electron-builder: Error checking for updates: 404

Created on 10 Aug 2017  Â·  7Comments  Â·  Source: electron-userland/electron-builder

Electron Updater: v2.8.5
Electron Builder: v19.20.0

Anytime I try to update it goes to a folder that I do not want and ends up being a 404 error because it does not exist.

Right now in my package.json I have publish that looks like this:

"publish": [
        {
          "provider": "github",
          "owner": "ahadcove",
          "repo": "lumia-twitch",
          "private": true
        }
      ]

and since this wasn't working, I set the feed url in autoUpdater:

  autoUpdater.setFeedUrl = "https://github.com/AhadCove/lumia-twitch";

This is private, so I also have my GH_TOKEN inside my ENV and made sure the GH_TOKEN has full access to repo.

Here is the error I am getting:

Cannot check for updates: HttpError: 404 Not Found
"method: undefined url: https://github.com/ahadcove/lumia-twitch/releases.atom\n\n    Please double check that your authentication token is correct. Due to security reasons actual status maybe not reported, 
but 404.\n    "
Headers: {
  "cache-control": [
    "no-cache"
  ],
  "content-encoding": [
    "gzip"
  ],
  "content-security-policy": [
    "default-src 'none'; base-uri 'self'; connect-src 'self'; form-action 'self'; img-src data:; script-src 'self'; style-src 'unsafe-inline'"
  ],
  "content-type": [
    "text/plain; charset=utf-8"
  ],
  "date": [
    "Thu, 10 Aug 2017 19:21:15 GMT"
  ],
  "public-key-pins": [
    "max-age=5184000; pin-sha256=\"WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=\"; pin-sha256=\"RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=\"; pin-sha256=\"k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws=\"; pin-sha256=\"K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q=\"; pin-sha256=\"IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=\"; pin-sha256=\"iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0=\"; pin-sha256=\"LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A=\"; includeSubDomains"
  ],
  "server": [
    "GitHub.com"
  ],
  "status": [
    "404 Not Found"
  ],
  "strict-transport-security": [
    "max-age=31536000; includeSubdomains; preload"
  ],
  "transfer-encoding": [
    "chunked"
  ],
  "vary": [
    "X-PJAX"
  ],

question

All 7 comments

Do you understand that your users will need to have token? Are you on macOS?

I have the same issue here. Any updates?

@marcionicolau Answer to my question ;)

Sorry @develar
Yes I'm using mac. So injecting my ghtoken in at build time won't be enough?

You should not use private github repo. Only if you understand what are you doing (e.g. you have GitHub org and create special read-only user to access releases).

  1. You must not inject token during build using configuration. It is only for runtime.
  2. terminal env on mac not available for mac app (https://github.com/sindresorhus/shell-env).

So, if you are not sure — do not use private repo. If you don't have public repo — just use s3.

I see. Will try it again and update. Thank you

@AhadCove did you manage to have it working with GitHub?
Because I cannot understand what is the proper url for setFeedURL, I'm always getting [error] autoUpdater: Error: Update check failed. The server sent an invalid response. Try again later.

Was this page helpful?
0 / 5 - 0 ratings