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

Regression in nsis-web target for appPackageUrl option #8581

Open
grovesNL opened this issue Oct 10, 2024 · 6 comments
Open

Regression in nsis-web target for appPackageUrl option #8581

grovesNL opened this issue Oct 10, 2024 · 6 comments

Comments

@grovesNL
Copy link
Contributor

  • Electron-Builder Version: 25.0.5
  • Node Version: n/a
  • Electron Version: n/a
  • Electron Type (current, beta, nightly): n/a
  • Target: nsis-web, Windows x64

Since #6964 the appPackageUrl doesn't work as intended because extra paths are appended to the URL, which means it's not possible to download the latest at a single URL (see #7732 for an example).

My understanding is that APP_PACKAGE_URL_IS_INCOMPLETE intentionally tried to skip setting the package name based on architecture, instead using the name specified with appPackageUrl, but #6964 will use the regular naming.

@mmaietta
Copy link
Collaborator

Would you mind sharing a minimum reproducible repo/gist for this issue? I'd like to create a unit test for this

Re: the PR, I'm wondering if it's just safer to revert, but I'd still like to do the unit test to prevent future regressions.

@AlijonMurodov
Copy link

Hi would you like to share an example of nsis-web downloader. I made it but web-setup.exe says that 404 url not found. url is working. I upload x.nsis.7z file in github releases

 "publish":{
      "provider":"generic",
      "url": "https://github.com/AlijonMurodov/dark-mode/releases/download/1.0.0/dark-mode-1.0.0-x64.nsis.7z"
    }  

@grovesNL
Copy link
Contributor Author

grovesNL commented Nov 5, 2024

@mmaietta

Would you mind sharing a minimum reproducible repo/gist for this issue? I'd like to create a unit test for this

You could take any plain electron-builder setup and add something like this:

"nsisWeb": {
  "appPackageUrl": "https://website.example/latest.7z",
  "artifactName": "${productName} Setup.${ext}"
},

with any nsis-web target, so something like:

"win": {
  "target": [
    {
      "target": "nsis-web"
    }
  ]
}

The expectation is that we upload the produced 7z file at the location of the appPackageUrl, then the setup file will always be able to download the latest. This used to work but now it tries to download the package from a different URL similar to latest.7z/name-x64.nsis.7z instead of just latest.7z (the previous behavior).

@AlijonMurodov
Copy link

Thanks, it works fine. I found a bug which is I give full url to "appPackageUrl":"https://www.github.com/releases/download/1.0.0/package-name.nsis.7z" but programm tries to download url/package-name-${version}.nsis.7z.
I think for now we need manually edit version number because program can't download latest version

github release example:
"appPackageUrl":"https://github.com/AlijonMurodov/dark-mode/releases/download/1.0.0/"

Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Jan 10, 2025
@grovesNL
Copy link
Contributor Author

Still an issue

@github-actions github-actions bot removed the Stale label Jan 12, 2025
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