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

[MacOS] My App is not receiving updates #322

Open
colinrw opened this issue Feb 14, 2023 · 3 comments
Open

[MacOS] My App is not receiving updates #322

colinrw opened this issue Feb 14, 2023 · 3 comments

Comments

@colinrw
Copy link

colinrw commented Feb 14, 2023

Hi, i've managed to get my Electron Release Server running. The issue im facing is that my app is not receiving new updates after I upload a new version to the release server admin dashboard.

Operating system: MacOS

How I use the release server: I uploaded 2 versions to the dashboard, V1 and V2 (with .dmg and .zip files), but when I upload V2, it does not do anything in the app. For the URL i use this:

  const server = 'localhost:1337'
  const platform = `${os.platform}_${os.arch()}`
  const url = `${server}/update/${platform}/${app.getVersion()}/stable`
  autoUpdater.setFeedURL(url)

The URL that is created points to the download link (checked with postman):

{
    "url": "localhost:1337/download/flavor/default/0.1.3/osx_arm64?filetype=zip",
    "name": "0.1.3",
    "notes": "## 0.1.3\nV3",
    "pub_date": "2023-02-10T16:24:38.482Z"
}

In my main.ts (main process) file I use the following code to check if there are new updates available:

app.on('ready', () => {
    autoUpdater.checkForUpdatesAndNotify()
})

Additional Question: I currently don't have a code signing certificate yet, since i would like to have this running before actually purchasing this. Would it be possible to get the auto updates working on my local device without a code signing certificate? I package the app and try to use the auto updater on this local packaged version.

If you need any other info or code, please let me know. I feel like im almost there! Thank you 🙂

@colinrw
Copy link
Author

colinrw commented Feb 15, 2023

i got a bit further, but now im struggling with the following issue. did not found anything useful online yet. hope someone can help!

auto updater error: Error: Cannot find channel "latest-mac.yml" update info: HttpError: 404 Not Found
"method: GET url: http://localhost:1337/update/darwin_arm64/0.1.2/stable/latest-mac.yml?noCache=1gpb4pcmu
Please double check that your authentication token is correct. Due to security reasons, actual status maybe not reported, but 404."
Headers: {
  "x-powered-by": "Sails <sailsjs.com>",
  "content-type": "application/json; charset=utf-8",
  "date": "Wed, 15 Feb 2023 18:18:32 GMT",
  "connection": "keep-alive",
  "keep-alive": "timeout=5",
  "content-length": "0"
}

when i navigate to the setFeedURL > http://localhost:1337/update/darwin_arm64/0.1.2/stable in my app. the URL returns a valid response (named above already):

{
    "url": "localhost:1337/download/flavor/default/0.1.3/osx_arm64?filetype=zip",
    "name": "0.1.3",
    "notes": "## 0.1.3\nv3",
    "pub_date": "2023-02-15T18:15:10.201Z"
}

I was wondering where the latest-mac.yml file should be located or how I can find this. When i build my app, i get the latest-mac.yml file (see image), but I have no idea what to do with it.
image

any help appreciated! 🙂

@colinrw
Copy link
Author

colinrw commented Feb 17, 2023

I've read the following from the Windows setup:

Electron Release Server will auto-generate the .yml files for the corresponding channel (latest.yml, beta.yml, alpha.yml).

Is this also the case for MacOS? If so, where can I check if the latest-mac.yml file is added correctly? I can't seem to find it anywhere, which might also be the issue for my situation (see comment above).

Any helps is appreciated since I feel like i am almost there! Thanks :)
@ArekSredzki sorry for tagging (if it works), i've been stuck at this step for a while and was curious if you know what the issue might be.

@royorange
Copy link

the yml is auto generated for the specific request, see: electronUpdaterMac.

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

2 participants