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

Update installation error #145

Open
qq253498229 opened this issue Jan 14, 2025 · 3 comments
Open

Update installation error #145

qq253498229 opened this issue Jan 14, 2025 · 3 comments

Comments

@qq253498229
Copy link

When I was updating the app, an exception was thrown. I checked the network and found that the request had already been completed, so I'm not sure what this error means:

image image

My code looks like this:

    app.getConfig().then(config => {
      let currentApplicationId = config.version;
      let url = 'https://docs.codeforfun.cn/static/update_manifest.json';
      updater.checkForUpdates(url).then(manifest => {
        console.log('checkForUpdates r', manifest);
        if (manifest.version !== currentApplicationId) {
          console.log('该升级啦');
          updater.install().then();
          // app.restartProcess().then();
        }
      });
    });

I searched for some Neutralino applications and found that other projects implement updates in this way. What are the differences between these two?

          let command = `curl ${manifest.resourcesURL} --output resources.neu`;
          os.execCommand(command).then(() => {
            app.restartProcess().then();
          });
@SkullPratyush
Copy link

basically in the first code snippet , you are first checking whether your current version is the updated version or not , while in the second code you are directly downloading the file from a specific url using the curl command .Any other questions?

@qq253498229
Copy link
Author

basically in the first code snippet , you are first checking whether your current version is the updated version or not , while in the second code you are directly downloading the file from a specific url using the curl command .Any other questions?

What I want to ask is why this line of code doesn't work properly.

updater.install().then();

@DevalGarg129
Copy link

I believe that in this issue the content is not defined in the boilerplate which cause issues during rendering and body variable is not passed properly when the update is being installed

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

3 participants