mas-cli / mas

:package: Mac App Store command line interface
MIT License
10.94k stars 275 forks source link

🐛 [BUG] MAS keeps updating the same app #627

Closed emaba closed 2 weeks ago

emaba commented 3 weeks ago

Your Environment

mas Install Method

Describe the Bug

MAS keeps updating the same apps even if the app is already up to date.

To Reproduce

Steps to reproduce the behavior:

run mas upgrade

Expected Behavior

Update only app to be updated.

Actual Behavior

It keeps updating already up to date apps

Screenshots, Terminal Output

First execution:

 ❯ mas upgrade
Upgrading 5 outdated applications:
Goodnotes (6.5.7), WhatsApp (24.21.81)
==> Downloading Goodnotes 6
==> Installed Goodnotes 6
==> Downloading WhatsApp Messenger
==> Installed WhatsApp Messenger

Second execution of the same command:

 ❯ mas upgrade
Upgrading 2 outdated applications:
Goodnotes (6.5.7), WhatsApp (24.21.81)
==> Downloading Goodnotes 6
==> Installed Goodnotes 6
==> Downloading WhatsApp Messenger
==> Installed WhatsApp Messenger

Additional Context

No

tplobo commented 2 weeks ago

this should be closed after release 1.8.7

rgoldberg commented 2 weeks ago

@emaba Version 1.8.7, which was just released, should fix this. Can you please confirm?

dan-gill commented 2 weeks ago

Unfortunately the update did not fix the name change from Microsoft Remote Desktop to Windows App. image You can see here that the app is listed twice with mas list and will keep trying to update the app when running mas upgrade.

rgoldberg commented 2 weeks ago

@dan-gill Most likely, you have 2 instances of the same app installed.

Please run the following from the command line to find all locations of apps with app ID == 1295203466:

mdfind 'kMDItemAppStoreAdamID == 1295203466'

If you only have one instance installed, then we must investigate the issue. I, however, have that app installed & upgraded it from "Microsoft Remote Desktop" to "Windows App"; mas list only lists "Windows App" for me.

mas can currently only update one instance of an app ID, given the Apple update libraries that it uses. #462 is about updating all installed instances of an app.

If you do have duplicates, just delete the older version.

dan-gill commented 2 weeks ago

@dan-gill Most likely, you have 2 instances of the same app installed.

Please run the following from the command line to find all locations of apps with app ID == 1295203466:

mdfind 'kMDItemAppStoreAdamID == 1295203466'

If you only have one instance installed, then we must investigate the issue. I, however, have that app installed & upgraded it from "Microsoft Remote Desktop" to "Windows App"; mas list only lists "Windows App" for me.

mas can currently only update one instance of an app ID, given the Apple update libraries that it uses. #462 is about updating all installed instances of an app.

If you do have duplicates, just delete the older version.

I got one result from that command.

image
emaba commented 2 weeks ago

@emaba Version 1.8.7, which was just released, should fix this. Can you please confirm?

I confirm that at the moment the issue appear to be resolved.

rgoldberg commented 2 weeks ago

@dan-gill Can you open a new issue for your problem, as it's different from the original problem here?

Can you also check your /Applications folder, and all sub folders, for any Microsoft Remote Desktop.app or extra Windows App.app apps, or anything with a similar name (like Microsoft Remote Desktop 10.app)?

Thanks.

emanuele-ermit commented 2 weeks ago

@emaba Version 1.8.7, which was just released, should fix this. Can you please confirm?

I confirm that at the moment the issue appear to be resolved.

But now I see a new issue:

image
rgoldberg commented 2 weeks ago

@emaba mas not seeing those upgrades is probably a function of the Mac App Store running on eventual consistency.

Please do not update from the App Store.app, and just try mas outdated and/or mas upgrade every few hours / every day.

If you want to investigate more, please run mas outdated & mas list and reply with their output. Please copy & paste the output as text instead of as a screenshot (it's easier to read & copy).

Please provide the new versions for the upgrades that App Store.app says are available but that aren't seen by mas.

Also, please ensure that the installed apps are macOS-native, not for iOS or iPadOS.

emanuele-ermit commented 2 weeks ago

@emaba mas not seeing those upgrades is probably a function of the Mac App Store running on eventual consistency.

Please do not update from the App Store.app, and just try mas outdated and/or mas upgrade every few hours / every day.

If you want to investigate more, please run mas outdated & mas list and reply with their output. Please copy & paste the output as text instead of as a screenshot (it's easier to read & copy).

Please provide the new versions for the upgrades that App Store.app says are available but that aren't seen by mas.

Also, please ensure that the installed apps are macOS-native, not for iOS or iPadOS.

Here the output:

~
 ❯ mas outdated

~
 ❯ mas upgrade

~
 ❯ mas list
302584613   Kindle                (7.22)
1289583905  Pixelmator Pro        (3.6.12)
1209754386  eDrawings             (32.3.0020)
1444383602  Goodnotes             (6.5.7)
1342896380  Hex Fiend             (2.15)
1462114288  Grammarly for Safari  (9.75)
425424353   The Unarchiver        (4.3.8)
577085396   Unclutter             (2.2.9)
1451685025  WireGuard             (1.0.16)
1153157709  Speedtest             (1.27)
985367838   Microsoft Outlook     (16.90.3)
497799835   Xcode                 (16.1)
310633997   WhatsApp             (24.21.81)
1672085276  Aiko                  (1.8.1)
1475387142  Tailscale             (1.76.1)
408981434   iMovie                (10.4.2)
1274495053  Microsoft To Do       (2.130)
803453959   Slack                 (4.41.97)
1440147259  AdGuard for Safari    (1.11.19)
639968404   Parcel                (7.14)
1439378680  StandUp               (2.7)
899247664   TestFlight            (3.6.0)
6473019059  Folder Hub            (2.3.2)
1663047912  Screens 5             (5.4.2)

Goodnote is versione 6.5.10 and Whatsapp is version 24.22.78 in the App Store.app,

rgoldberg commented 2 weeks ago

On the Updates tab of App Store.app, try to reload the page via keyboard (Command-r) or via the menu (Store > Reload Page)

Then run mas outdated.

Do the updates show up now?

emanuele-ermit commented 2 weeks ago

On the Updates tab of App Store.app, try to reload the page via keyboard (Command-r) or via the menu (Store > Reload Page)

Then run mas outdated.

Do the updates show up now?

Unfortunately, during the night, my Mac updated the app autonomously. Sorry. I'll try the next time it will happen.

emaba commented 2 weeks ago

On the Updates tab of App Store.app, try to reload the page via keyboard (Command-r) or via the menu (Store > Reload Page)

Then run mas outdated.

Do the updates show up now?

I'm experiencing the same issue:

image

I tried with CMD+R, but nothing changed.

rgoldberg commented 2 weeks ago

@emaba These outdated inconsistencies should go away over time because the Mac App Store works via eventual consistency.

We can try to investigate ways to speed up getting mas to know about new updates. If you can, please turn off auto-updates for apps from the Mac App Store, so we can ensure that updates aren't installed automatically outside of mas.

To ensure that things didn't get resolved since the last time you tried because the update data has been shared to the Apple servers to which you're connecting, always run mas outdated before you run any new tests.

If mas outdated doesn't report the new update being available, try reloading the Purchased app list in your Account page in App Store.app, which you can open via the bottom option in the left pane (it's labeled with the name associated with your Apple ID).

Then try mas outdated again.

emaba commented 2 weeks ago

Thank you for the feedback. I can confirm that after the night, without doing anything, the updates appeared in mas.

Thank you.

rgoldberg commented 2 weeks ago

Closing, as all appears fixed by 1.8.7 or just standard eventual consistency delay.