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

The parameter "useAppIdAsId" have no effect. #282

Open
morgan-wild opened this issue Mar 16, 2024 · 0 comments
Open

The parameter "useAppIdAsId" have no effect. #282

morgan-wild opened this issue Mar 16, 2024 · 0 comments

Comments

@morgan-wild
Copy link

morgan-wild commented Mar 16, 2024

Describe the bug

The parameter "useAppIdAsId" doesn't have any effect in the url of the squirrel updater.

It is still using the "name" of the entire nx solution (package.json), not the app's (from its project.json) or the id (from maker.options.json).

To Reproduce
Steps to reproduce the behavior:

  1. Name you solution 'my-nx-solution' in the main package.json file
  2. Configure your electron app to use windows.squirrel
  3. Set the following configuration in the maker.options.json file:
{
    "$schema": "../../../../../node_modules/nx-electron/src/validation/maker.schema.json",
    "productName": "my-app",
    "appId": "com.company.myapp",
    "win": {
        "icon": "apps/my-app/src/assets/favicon.ico",
        "target": "squirrel"
    },
    "squirrelWindows": {
        "useAppIdAsId": false,
    }
}
  1. Build, Make and install the app after enabling the auto update service.
  2. Observe the requested url:
https://my-domain/updates/win32/0.0.0/RELEASES?id=my-nx-solution&localVersion=0.0.0&arch=amd64
  1. Note the id is the name of the nx solution, not the app's.

  2. Enable the option "useAppIdAsId"

{
    "$schema": "../../../../../node_modules/nx-electron/src/validation/maker.schema.json",
    "productName": "my-app",
    "appId": "com.company.myapp",
    "win": {
        "icon": "apps/my-app/src/assets/favicon.ico",
        "target": "squirrel"
    },
    "squirrelWindows": {
        "useAppIdAsId": true, <------
    }
}
  1. Build, Make and install the app.

  2. Observe the requested url:

https://my-domain/updates/win32/0.0.0/RELEASES?id=my-nx-solution&localVersion=0.0.0&arch=amd64

There is no changes.

Expected behavior

When useAppIdAsId is false, we should have the app name from its project.json file:

https://my-domain/updates/win32/0.0.0/RELEASES?id=my-app&localVersion=0.0.0&arch=amd64

When useAppIdAsId is true, we should have the app id from the maker.options.json file:

https://my-domain/updates/win32/0.0.0/RELEASES?id=com.company.myapp&localVersion=0.0.0&arch=amd64

Desktop (please complete the following information):

  • OS: Windows
  • Nx Electron Version 29.1
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

1 participant