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

mas list does not list apps for macOS 15.4 developer beta 1 #724

Open
jcouball opened this issue Feb 25, 2025 · 6 comments
Open

mas list does not list apps for macOS 15.4 developer beta 1 #724

jcouball opened this issue Feb 25, 2025 · 6 comments
Labels

Comments

@jcouball
Copy link

jcouball commented Feb 25, 2025

mas config

mas ▁▁▁▁ 1.9.0
arch ▁▁▁ arm64
from ▁▁▁ homebrew/core/mas
origin ▁ https://github.com/mas-cli/mas.git
rev ▁▁▁▁ a5a928a2e6a28a5c751bca7f63f26b06cede8197
driver ▁ 1.115
swift ▁▁ 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
region ▁ US
macos ▁▁ 15.4 (24E5206s)
mac ▁▁▁▁ Mac14,6
cpu ▁▁▁▁ Apple M2 Max

Bug description

I am not sure if you accept bug reports against macOS developer betas... apologies if that isn't the case. I figured since you are relying on private/internal Apple APIs, this would be a good heads up.

Running on macOS 15.4 developer beta 1, mas list returns Error: No installed apps found. I discovered this because brew bundle dump ... was removing all mas apps from my .Brewfile (which indicates that the mas list command was functioning the last time I ran brew bundle dump).

I am happy to provide more details if that would be helpful.

Steps to reproduce

$ mas list
Error: No installed apps found
$ echo $?
0
$
@jcouball jcouball changed the title mas list does not returns Error: No installed apps found for macOS 15.4 developer beta 1 mas list does not list apps for macOS 15.4 developer beta 1 Feb 25, 2025
@rgoldberg
Copy link
Contributor

rgoldberg commented Feb 25, 2025

@jcouball Thanks for the heads up.

Unfortunately, I can't run macOS 13+ until summer 2025, so I can't directly investigate this issue.

mas could obtain most of the information used for mas list from the public Spotlight/MDS instead of from the private Apple framework that it current uses, except it doesn't actually have the app name. We could get that from the iTunes Search web API, but that means that every list of n apps will require n requests on that API. We can always fallback to other info from Spotlight/MDS that is similar to (and frequently the same as) the app name.

It might make sense to see if the functionality is reinstated in 15.4 release before switching over. Also, I'm in the middle of fixing issues in Swift Argument Parser (which is used by mas), so waiting for 15.4 release will give me time to finish (at least some of) that work.

@jcouball
Copy link
Author

Makes sense. I'll keep this issue updated as I upgrade macOS beta versions.

@rgoldberg
Copy link
Contributor

rgoldberg commented Feb 25, 2025

@jcouball if I cannot find the app name elsewhere on the local machine, mas can cache each app's full Apple iTunes Search web API JSON in an extended file attribute for its folder. I imagine that mas should also store the version of the app in the extended attributes, too, so if the app version changes, it downloads the app name again & caches it for the new app version.

The main problem is if there is an app that is no longer available from the iTunes Search web API (or if the store from which it was downloaded is not stored in Spotlight, or some other thing that would prevent downloading its data). It probably makes sense to use (& cache in extended file attributes on the folder) the downloaded JSON for the current version of the app if it exists, but fallback to Spotlight data if it is unavailable. I think we should not combine data from both sources, just provide data from one source or the other.

@jimscard
Copy link

FYI,

This also affects mas outdated and mas upgrade because they don't think there's anything installed either.

The interaction with the Mac App store does work, though. mas search and mas purchase do work, but even after downloading & installing an app, mas list doesn't show it.

@jcouball
Copy link
Author

jcouball commented Mar 3, 2025

@rgoldberg I just installed macOS 18.4 beta 2. mas list still is not functioning.

@rgoldberg
Copy link
Contributor

Options are:

  1. somehow fix CKSoftwareMap
  2. find a new private framework source for installed app info
  3. find a public framework source for installed app info other than Spotlight/MDS
  4. use public Spotlight/MDS:
    1. with the app folder name as the app name (which could be off)
    2. with another local source for the app name (anyone know of any?)
    3. to get app IDs with all data from the Apple iTunes Search web API:
      1. cached in extended attributes on the app folder; update cache on every new app version / if a command-line option is supplied (maybe --recache?)
      2. fallback to Spotlight/MDS data if no iTunes Search results
      3. could somehow merge Spotlight/MDS data with iTunes Search results, but simpler just to use iTunes Search results if available, and Spotlight/MDS data if not

How would this affect future output, including raw, raw JSON & standard JSON?

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

3 participants