Skip to content

Spotlight metadata must exist for mas to function #801

@gforien

Description

@gforien

mas config

mas ▁▁▁▁ 2.1.0
arch ▁▁▁ arm64
from ▁▁▁ homebrew/core/mas
origin ▁ https://github.com/mas-cli/mas.git
rev ▁▁▁▁ a4756e8c82a2bae5d5de1b137ec16fa7c1df8c94
driver ▁ 1.115.1
swift ▁▁ 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
region ▁ FR
macos ▁▁ 15.2 (24C101)
mac ▁▁▁▁ MacBookPro18,1
cpu ▁▁▁▁ Apple M1 Pro

Bug description

Issue

Hi,
First, thank you for mas. I've used it for 3 years now and it's one of these tiny
bricks that make my life a whole lot easier on macOS.

I use mas with homebrew and the homebrew-bundle integration.
I recently saw all my mas applications absent from the Brewfile following the 2.0 upgrade.

index e776c187..ff9a684e 100644
--- a/config/homebrew/Brewfile
+++ b/config/homebrew/Brewfile
@@ -550,16 +550,6 @@ cask "wireshark"
-mas "1Password for Safari", id: 1569813296
-mas "DaVinci Resolve", id: 571213070
-mas "Digital Clock", id: 1287009111
-mas "GarageBand", id: 682658836
-mas "OneDrive", id: 823766827
-mas "Pages", id: 409201541
-mas "Quick Camera", id: 598853070
-mas "Toggl Track", id: 1291898086
-mas "WhatsApp", id: 310633997
-mas "Windows App", id: 1295203466

I read the release notes, https://github.com/mas-cli/mas#-%EF%B8%8F-known-issues, and some issues, and tried

  • brew uninstall mas && brew reinstall mas
  • mas reset
  • uninstalled two apps from the mac app store (Quick Camera, Digital Clock)
  • reboot
  • mas install xxxxxxxx successfully

mas list still returns empty.

## After reinstall and reboot
$ mas install 598853070
==> Downloading Quick Camera (1.5.0)
==> Downloaded Quick Camera (1.5.0)
==> Installing Quick Camera (1.5.0)
==> Installed Quick Camera (1.5.0)

$ mas install 1287009111
==> Downloading Digital Clock - Bedside Alarm (4.9)
==> Downloaded Digital Clock - Bedside Alarm (4.9)
==> Installing Digital Clock - Bedside Alarm (4.9)
==> Installed Digital Clock - Bedside Alarm (4.9)

$ mas list
Error: No installed apps found

$ mdls /Applications/Quick\ Camera.app
kMDItemFSContentChangeDate = 2025-04-23 10:32:54 +0000
kMDItemFSCreationDate      = 2025-01-04 19:02:45 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "Quick Camera.app"
kMDItemFSNodeCount         = 1
kMDItemFSOwnerGroupID      = 0
kMDItemFSOwnerUserID       = 0
kMDItemFSSize              = 1
kMDItemFSTypeCode          = ""

$ mdls /Applications/DigitalClock.app
kMDItemFSContentChangeDate = 2025-04-23 10:31:54 +0000
kMDItemFSCreationDate      = 2022-01-23 04:11:20 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "DigitalClock.app"
kMDItemFSNodeCount         = 1
kMDItemFSOwnerGroupID      = 0
kMDItemFSOwnerUserID       = 0
kMDItemFSSize              = 1
kMDItemFSTypeCode          = ""

The only thing I notice is the missing userid/gid in these attributes, but I don't know if that is relevant.

Linked issues
Homebrew/brew#19750

Please tell me if I can provide additionnal debug output
Thank you for your time!

Steps to reproduce

  • upgrade to 2.1.0
  • mas list

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions