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

rizwan92 #0247 i am facing System.aggregate Exception 81513513 is notvalid string error while checking for update. #154

Open
rizwan92 opened this issue Oct 19, 2022 · 4 comments

Comments

@rizwan92
Copy link

I have electron.js file

const path = require("path");
const { app, BrowserWindow, ipcMain, autoUpdater } = require("electron");
const isDev = require("electron-is-dev");

if (!isDev) {
  if (require("electron-squirrel-startup")) return app.quit();
}

const server = "https://random-server.com";
const updateUrl = `${server}/update/${process.platform}/${app.getVersion()}`;

autoUpdater.setFeedURL({ url: updateUrl });

if (!isDev) {
  setTimeout(() => {
    autoUpdater.checkForUpdates();
  }, 60000);
}

function createWindow() {
  const win = new BrowserWindow({
    width: 800,
    height: 600,
    icon: "desktop-icons/icon.png",
    webPreferences: {
      preload: path.join(__dirname, "preload.js"),
      nodeIntegration: false,
      contextIsolation: true,
      enableRemoteModule: false,
    },
  });

  win.loadURL(
    isDev
      ? "http://localhost:3001"
      : `file://${path.join(__dirname, "./index.html")}`
  );

}

and hazel server running in vercel fetching my release from github repostitory image is attched .

after 60 seconds i am facing an error image is attached
i am usinf electron forge with gihub publish package to publish my release

module.exports = {
  packagerConfig: {
    icon: "desktop-icons/icon",
    name: "chikupos",
    appBundleId: "billing.chikupos.com",
    asar: true,
    hardenedRuntime: true,
  },
  makers: [
    {
      name: "@electron-forge/maker-squirrel",
      config: {
        iconUrl: "https://billing.chikupos.com/desktop-icons/icon.png",
        setupIcon: "desktop-icons/icon.ico",
      },
    },
    {
      name: "@electron-forge/maker-zip",
    },
  ],
  publishers: [
    {
      name: "@electron-forge/publisher-github",
      config: {
        repository: {
          owner: "myusernam",
          name: "my-repository",
        },
        authToken: "my token",
      },
    },
  ],
  buildIdentifier: "billing.chikupos.com",
};

Screenshot 2022-10-19 135834
image

@rizwan92
Copy link
Author

i am getting this logs at release path

directCache [ 'exe', 'dmg', 'rpm', 'deb', 'AppImage' ]
directCache [ 'exe', 'dmg', 'rpm', 'deb', 'AppImage' ]
Finished caching version 1.0.0
releases {
  version: '1.0.0',
  notes: null,
  pub_date: '2022-10-21T13:06:27Z',
  platforms: {
    exe: {
      name: 'chikupos-Setup-1.0.0.exe',
      api_url: 'https://api.github.com/repos/rizwan92/chikupos-software-update/releases/assets/81806373',
      url: 'https://github.com/rizwan92/chikupos-software-update/releases/download/1.0.0/chikupos-Setup-1.0.0.exe',
      content_type: 'application/octet-stream',
      size: 103
    }
  },
  files: {
    RELEASES: 'F2CCE1CA5E1E6060FBC2312E9A33DDC3598C034B https://api.github.com/repos/rizwan92/chikupos-software-update/releases/assets/81806374 101743115'
  }
}

@sergeichestakov
Copy link

I'm seeing the same thing. Looks like this is an issue when Squirrel.Windows tries to parse the release file. It seems that it's treating the URL as a local path to the nupkg and expecting a semver string which is not present in the download URL.

Did you end up finding a solution @rizwan92?

@rizwan92
Copy link
Author

you need to buy code signing certificates to make it work

@sergeichestakov
Copy link

Hmm our app is signed.

Anyways we ended up figuring it out - we just needed to update the download URL in the release file to end in the .nupkg filename, including the version, rather than a more generic link.

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