Skip to content

Getting a 404 stacktrace when fetching update #86

@nathanvogel

Description

@nathanvogel

Hi,
I'm using Hazel to auto-update a Windows app built with electron-forge.
autoUpdater fails to download the update a throws a 404, opening an error dialog. Any idea why?

Here's the relevant SquirrelSetup.log part:

2020-02-17 16:14:30> CheckForUpdateImpl: Downloading RELEASES file from https://myproject-hazel.now.sh/update/win32/0.1.5
2020-02-17 16:14:30> FileDownloader: Downloading url: https://myproject-hazel.now.sh/update/win32/0.1.5/RELEASES?id=myproject&localVersion=0.1.5&arch=amd64
2020-02-17 16:14:30> FileDownloader: Downloading file: https://myproject-hazel.now.sh/update/win32/0.1.5/myproject-0.1.6-full.nupkg
2020-02-17 16:14:30> IEnableLogger: Failed downloading URL: https://myproject-hazel.now.sh/update/win32/0.1.5/myproject-0.1.6-full.nupkg: System.Net.WebException: The remote server returned an error: (404) Not Found.

I don't understand why it would look for the 0.1.6 release under the 0.1.5 folder...

My update code (onReady):

  const server = "https://myproject-hazel.now.sh";
  const feed = `${server}/update/${process.platform}/${app.getVersion()}`;
  autoUpdater.setFeedURL({ url: feed });

  // Check after a few seconds seconds
  setTimeout(() => {
    // Fail if not a Squirrel-installed app
    try {
      autoUpdater.checkForUpdates();
    } catch (error) {
      // Nothing to do here.
    }
  }, 10 * 1000);

Any help would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions