mas-cli / mas

:package: Mac App Store command line interface
MIT License
10.78k stars 272 forks source link

🐛 [BUG] Certain Items Returned from Search Results with Negative ID #498

Open hao-lh opened 1 year ago

hao-lh commented 1 year ago

Your Environment

mas Install Method

Describe the Bug

When use keyword with mas to search apps, some items returned with a negative MAS ID.

To Reproduce

Steps to reproduce the behavior:

  1. mas search xcode
  2. some items from search results returned a negative ID
  3. already highlighted details from below screenshot
  4. should be type overflow

Screenshots, Terminal Output

IMG_2023-06-16_12-09-04
bjesuiter commented 7 months ago

I have the same problem with "Lockera Widgets".

mas search "Lockera Widgets" returns -2123114745 Lockera Widgets (1.6)

and trying to install this with mas "Lockera Widgets", id: -2123114745 fails.

voodooGQ commented 6 months ago

Having the same issue with "iBar" showing up as -2146090692 iBar-Menubar icon control tool (1.2.4)

tvlieg commented 6 months ago

I have the same with "Noteshelf 3": -2131199389 Noteshelf 3 (1.4.8)

jandamm commented 6 months ago

Same here for StopTheMadness Pro and Keymapp.

Seems like the InstallOptions need an Int instead of UInt64: https://github.com/mas-cli/mas/blob/763392cb23359064b14b0a099b62f050c093b2df/Sources/MasKit/Commands/Install.swift#L54

deed02392 commented 1 month ago

I think it's the other way around @jandamm – we want UInt64 throughout Search: https://github.com/mas-cli/mas/blob/main/Sources/MasKit/Controllers/MasStoreSearch.swift#L15

edit: it's mainly an output/formatting bug, fixed in: https://github.com/mas-cli/mas/pull/479UInt64 would still be a more proper type though