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

🐛 [BUG] Some apps display a blank name in outdated & their bundleId in list output #490

Open
1 task done
carlosfrodriguez opened this issue Apr 18, 2023 · 1 comment
Labels

Comments

@carlosfrodriguez
Copy link

Your Environment

  • mas version:1.8.6
  • macOS version (system_profiler SPSoftwareDataType -detailLevel mini): 13.3.1

mas Install Method

  • brew install mas (homebrew-core)
  • [] mas-cli/tap
  • [] .pkg installer from releases
  • [] Built from source
    • Fork/branch: ? (e.g. mas-cli/main)
    • Xcode version: 10.?

Describe the Bug

Bandwidth+ App name does not show correctly or even does not show, depends on the command.

App link https://apps.apple.com/es/app/bandwidth/id490461369?l=en&mt=12

To Reproduce

Steps to reproduce the behavior:

  1. Download the app from the official app store
  2. Execute mas list
  3. Execute mas outdated

Expected Behaviour

The name of the App (Bandwidth+) is displayed correctly and consistent among the mas commands

Actual Behaviour

  • For the list command it shows as au.id.haroldchu.mac.Bandwidth
  • For the outdated command it shows no name

Screenshots, Terminal Output

$ mas list
1219074514  Vectornator                    (4.13.3)
409183694   Keynote                        (13.0)
1541482816  PSWD                           (3.2)
1278508951  Trello                         (2.13.10)
1185488696  Money                          (7.0.25)
439654198   SimpleMind                     (2.0.2)
490461369   au.id.haroldchu.mac.Bandwidth  (1.21)
$ mas outdated
490461369  (1.21 -> 1.22)
439654198 SimpleMind (2.0.2 -> 2.1.0)
1219074514 Vectornator (4.13.3 -> 4.13.4)
1185488696 Money (7.0.25 -> 7.0.26)

Additional Context

Add any other context about the problem here.
Did it work in a previous version?

@rgoldberg
Copy link
Contributor

rgoldberg commented Sep 5, 2024

@phatblat @chris-araman I didn't want to install a random app on my computer, but I'm assuming that somehow the appName for this app is empty.

It looks like installed SoftwareProducts are provided by CKSoftwareMap.shared(). That's undocumented/unsupported Apple code, right?

If so, I assume that the empty appName isn't mas's fault, right? (unless mas can somehow configure CKSoftwareMap.shared() better)

If that is correct, I propose:

Getting rid of appNameOrBundleIdentifier.

Using a new displayName wherever appNameOrBundleIdentifier was previously used, and probably everywhere (or most places) appName was used.

displayName would output any non-empty appName, while for empty appNames, we can decide to have it output either:

  • the basename of the *.app directory from the bundlePath (provided by this regex (?<=/)[^/]+(?=\.app$))
  • the trackName from a storeSearch.lookup(app: appId)

The first option relies on the *.app name from the file system, while the second option requires contacting the MAS servers an extra time, but would probably provide a more accurate fallback app name.

Which do you prefer?

@rgoldberg rgoldberg changed the title 🐛 [BUG] 🐛 [BUG] Some apps display a blank name in outdated & their bundleId in list output Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants