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

Some apps are always shown as outdated even though they're already the latest version (CFBundleShortVersionString vs. CFBundleVersion) #384

Closed
1 of 4 tasks
luispuerto opened this issue May 18, 2021 · 23 comments

Comments

@luispuerto
Copy link

luispuerto commented May 18, 2021

Your Environment

  • mas version: 1.8.2
  • macOS version (system_profiler SPSoftwareDataType -detailLevel mini): 11.3.1 (20E241)

mas Install Method

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

Describe the Bug

Ninja Cookie gets updated from 0.7 to 0.7.1, but if I run mas upgrade it updates again because mas outdated still show it as outdated. On other words, just seem that or mas is not able to read the version of the app properly, or the app doesn't states its version properly. I think it's the latter one.

To Reproduce

Steps to reproduce the behavior:

  1. Install Ninja Cookie 1535219336
  2. mas outdated or mas upgrade
  3. See that Ninja Cookie upgrades every time

Expected Behavior

Detect the version properly?

Actual Behavior

Upgrade, upgrade, upgrade

Additional Context

Perhaps it would be great to have a pin command or ignore this version or something.

@lougreenwood
Copy link

I also get this for 1Blocker 3.16 and Endel 2.3.264.

Not sure if these should go in separate issues as application specific or if it's a general mas bug?

@luispuerto
Copy link
Author

@lougreenwood I don't know either and at least in the case of Ninja Cookie the short version is just 0.7, so perhaps that the confusion.

@phatblat
Copy link
Member

Yep, I get the same, even immediately after installing the app.

↪️ mas search "ninja cookie"
  1535219336  Ninja Cookie (0.7.1)

↪️  mas info 1535219336   
Ninja Cookie 0.7.1 [0.0]
By: Theo GOUDOUT
Released: 2021-05-14
Minimum OS: 10.14
Size: 4 MB
From: https://apps.apple.com/us/app/ninja-cookie/id1535219336?mt=12&uo=4

↪️  mas purchase 1535219336
==> Downloading Ninja Cookie
==> Installed Ninja Cookie

↪️  mas outdated
1535219336 Ninja Cookie (0.7 -> 0.7.1)

@phatblat
Copy link
Member

Sorry. There have been a handful of annoying issues like this since we fixed the outdated and upgrade commands.

Noticed that both the version numbers in the outdated output are listed in the app's "About" window and Info.plist file.

Screen Shot 2021-05-19 at 10 46 38 PM

<key>CFBundleShortVersionString</key>
<string>0.7</string>
<key>CFBundleVersion</key>
<string>0.7.1</string>

@luispuerto
Copy link
Author

Great that you can reproduce @phatblat. I think that the issue can have two fold fixes…

  1. Have a way that you can ask mas ignore an update of an app. Like pin in brew. Of course it could still be updated on the app store if there is a real update, but if would be nice to ignore app updated on the mas.
  2. Fix the correct reading of the version.

@chris-araman
Copy link
Contributor

I recently fixed the case where the bundle version is newer than the App Store version. This is the opposite case. We don't have a way to get the bundle version from the App Store without downloading the app again every time we want to check for the latest release.

We could heuristically parse both CFBundleShortVersionString and CFBundleVersion, and if they're both parseable as Semantic Versions, use the greater of the two as the "installed" version to be compared against the App Store version. It'll catch cases like this one, but there are probably still more edge and corner cases.

@chris-araman chris-araman self-assigned this Jun 3, 2021
@brzzdev
Copy link

brzzdev commented Jul 27, 2021

I'm still seeing this myself with 1Blocker 3.16.2

@chris-araman
Copy link
Contributor

We could heuristically parse both CFBundleShortVersionString and CFBundleVersion, and if they're both parseable as Semantic Versions, use the greater of the two as the "installed" version to be compared against the App Store version.

It seems this plan isn't going to work, as CFBundleVersion seems to have no relation to CFBundleShortVersionString for many apps.

As things are today, using only CKSoftwareProduct.bundleVersion, which is generally expected to match CFBundleShortVersionString:

1489275350  Crossy Castle             (5.1)
1480068668  Messenger                 (97.11.116)
640199958   Developer                 (9.2.2)
1376509945  Populus Run               (1.3)
409183694   Keynote                   (11.1)
784801555   Microsoft OneNote         (16.51)
823766827   OneDrive                  (21.129.0627)
462058435   Microsoft Excel           (16.51)
1142578753  OmniGraffle               (7.18.5)
1482454543  Twitter                   (8.75)
1462114288  Grammarly for Safari      (9.36)
1496833156  Playgrounds               (3.4.1)
682658836   GarageBand                (10.4.3)
462062816   Microsoft PowerPoint      (16.51)
1206020918  Battery Indicator         (2.9.1)
1289197285  MindNode                  (2021.2.2)
1153157709  Speedtest                 (1.20)
409203825   Numbers                   (11.1)
497799835   Xcode                     (12.5.1)
1464883939  Frogger in Toy Town       (1.5.2)
409201541   Pages                     (11.1)
1448916662  Step Two                  (3.1.1)
1475387142  Tailscale                 (1.10.1)
408981434   iMovie                    (10.2.5)
985367838   Microsoft Outlook         (16.51)
1295203466  Microsoft Remote Desktop  (10.6.7)
1450874784  Transporter               (1.2.2)
803453959   Slack                     (4.18.0)
1470584107  Dato                      (3.0.1)
462054704   Microsoft Word            (16.51)
1263070803  Lungo                     (1.9.0)

However, using the greater of CKSoftwareProduct.bundleVersion, CFBundleShortVersionString, and CFBundleVersion, we see that CFBundleVersion is frequently unrelated to the former two:

1489275350  Crossy Castle             (7740.0.0)
1480068668  Messenger                 (283133794.0.0)
640199958   Developer                 (922.3.2)
1376509945  Populus Run               (210630606.0.0)
409183694   Keynote                   (7031.0.102)
784801555   Microsoft OneNote         (16.51.21071101)
823766827   OneDrive                  (21129.627.2)
462058435   Microsoft Excel           (16.51.21071101)
1142578753  OmniGraffle               (204.16.0)
1482454543  Twitter                   (8.75.0)
1462114288  Grammarly for Safari      (16.0.302203)
1496833156  Playgrounds               (1302.34.0)
682658836   GarageBand                (5433.0.0)
462062816   Microsoft PowerPoint      (16.51.21071101)
1206020918  Battery Indicator         (33.0.0)
1289197285  MindNode                  (2021.2.2)
1153157709  Speedtest                 (1.20.4)
409203825   Numbers                   (7031.0.102)
497799835   Xcode                     (18212.0.0)
1464883939  Frogger in Toy Town       (341.0.0)
409201541   Pages                     (7031.0.102)
1448916662  Step Two                  (23.0.0)
1475387142  Tailscale                 (101.10.1)
408981434   iMovie                    (400096.0.0)
985367838   Microsoft Outlook         (16.51.21071101)
1295203466  Microsoft Remote Desktop  (1896.0.0)
1450874784  Transporter               (1256.0.0)
803453959   Slack                     (6748.0.0)
1470584107  Dato                      (58.0.0)
462054704   Microsoft Word            (16.51.21071101)
1263070803  Lungo                     (18.0.0)

Unfortunately, more reports of the problem aren't helping us reach a solution. We understand the cause of the problem, but we need a viable proposal for how to address it in order to move forward.

Perhaps there's some investigation to be done into the private CommerceKit and StoreFoundation that might shed some light on this sort of versioning discrepancy? Maybe some magic to CKSoftwareProduct.versionIdentifier, expectedBundleVersion, or expectedStoreVersion? 🤷🏻‍♂️✨

@melgu
Copy link

melgu commented Sep 4, 2021

I have the same issues with:

1515959873 Theu2007Survivalists (1.0.747221 -> 1.4)
1513822917 Baldo The Guardian Owls (1.1.1 -> 1.1.4)
1538650027 Alto's Odyssey The Lost City (1.1.1 -> 1.1.2)

Running e.g. mas info 1538650027 shows the latest version as 1.1.2, but the English as well as the German App Store pages show the latest version as 1.1.1.

@chris-araman chris-araman mentioned this issue Sep 8, 2021
1 task
@chris-araman chris-araman changed the title 🐛 [BUG] Ninja Cookie app always upgrade although it's already upgraded to the last version 🐛 [BUG] some apps are always shown as outdated even though they're already the latest version Sep 8, 2021
@chris-araman chris-araman pinned this issue Sep 8, 2021
@chris-araman chris-araman unpinned this issue Nov 4, 2021
@aumuell
Copy link

aumuell commented Nov 17, 2021

I get a current version of 1Blocker reported as outdated:
1365531024 1Blocker (4.1 -> 5.1)

I would like to highlight this, as I didn't see this mentioned yet:
On the German Mac App Store, 4.1 is the current version of 1Blocker, but 5.1 is the current version of 1Blocker in the iOS store.

I'm on 12.0.1 on Apple Silicon, so also some apps from the iOS store are installable, but not 1Blocker. mas reports version 1.8.5.

@chris-araman
Copy link
Contributor

I've summarized this in the Known Issues section of the README.

Additional reports of apps with mismatched app bundle versions are unfortunately not helpful at this point. Pull requests are welcome!

@ChrisChinchilla
Copy link

Out of interest (and yes I have my own persistent list of apps that are always getting updated), I also use CleanMy Mac and it's updater list generally has the correct versions for the same two apps, could be worth asking them how they get updated version lists?

@TheDen
Copy link

TheDen commented Jul 21, 2022

I had this issue with Zentuner, where it would upgrade every time

$ mas outdated
1550640624 ZenTuner (0.2.0 -> 0.2.2)

The workaround was to edit /Applications/ZenTuner.app/Contents/Info.plist

...
  <key>CFBundleShortVersionString</key>
  <string>0.2.0</string>
...

and and the value to 0.2.2. This isn't recommended, but useful if you have mas upgrade running on schedule and don't want to reinstall certain applications every time

@nicerloop
Copy link

nicerloop commented Oct 19, 2022

See Feature Request #468

$ mas outdated
1550640624 ZenTuner (0.2.0 -> 0.2.2)

$ mas-versions 1550640624
{
"platform": "osx",
"version": "0.2.0"
}
{
"platform": "ios",
"version": "0.2.2"
}

@rgoldberg rgoldberg changed the title 🐛 [BUG] some apps are always shown as outdated even though they're already the latest version Some apps are always shown as outdated even though they're already the latest version Sep 14, 2024
@rgoldberg rgoldberg changed the title Some apps are always shown as outdated even though they're already the latest version Some apps are always shown as outdated even though they're already the latest version (CFBundleShortVersionString vs. CFBundleVersion) Sep 14, 2024
@rgoldberg rgoldberg assigned rgoldberg and unassigned chris-araman Oct 9, 2024
@koalalorenzo
Copy link

Same with mas 1.8.6

@rgoldberg
Copy link
Contributor

@koalalorenzo For which app IDs and app versions is this occurring for you? What version of macOS? What country do you use for the App Store?

Thanks.

@koalalorenzo
Copy link

koalalorenzo commented Oct 14, 2024

@koalalorenzo For which app IDs and app versions is this occurring for you? What version of macOS? What country do you use for the App Store?

Thanks.

@rgoldberg

Here we go:

803453959 Slack (4.40.128 -> 4.40.133)
310633997 ‎WhatsApp (24.19.80 -> 24.20.78)
1358823008 Flighty (4.1.1 -> 4.1.3)
1365531024 1Blocker (4.6 -> 5.8)
905953485 NordVPN (8.27.3 -> 8.33.2)

Mas Version: 1.8.6 I am on the latest (ATM) macOS Sequoia 15.0.1 (24A348)

EDIT: I have it installed using nix (but I have the issue with both stable (24.05) and unstable pkgs)

@rgoldberg
Copy link
Contributor

rgoldberg commented Oct 14, 2024

@koalalorenzo Thanks for the info. If you can, please don't update/upgrade these apps so we can diagnose & fix the issue(s).

I've just merged a ton of fixes in main, but we won't be able to release them for a bit. To see if those fixes fix your problem, can you install from the main branch of mas (either via nix or brew install --HEAD mas; if mas was already installed by brew, please uninstall it first via brew uninstall mas)?

If the code in main doesn't fix your issue:

  • Are you Intel or Apple Silicon?
  • What version of each of these apps is actually installed? You can get this from each app by opening the app, then opening the "" menu -> "About ". Please copy all version strings from each dialog.
  • What version of each of these app does the App Store GUI say is installed? Does the App Store GUI report that any updates are available? If so, what are the reported versions of those updates?

I know nothing about nix; I'm not sure if nix might cause any issues.

@koalalorenzo
Copy link

@rgoldberg

I've just merged a ton of fixes in main, but we won't be able to release them for a bit. To see if those fixes fix your problem, can you install from the main branch of mas (either via nix or brew install --HEAD mas; if mas was already installed by brew, please uninstall it first via brew uninstall mas)?

As I wrote, I am using Nix, not brew. I tried to install it using brew and the main branch HEAD commit, not much success over some dependencies requiring different versions of macOS 😅

Screenshot 2024-10-15 at 15 32 59

I am on Apple Sillicon, I have this issue with both M1 Pro and M3 Pro.
The versions of the apps I have installed, is the version reported to the left (the outdated version according to mas) and if I open the App Store, it does not ask to update, and the version reported as the latest one is the version currently installed.

@rgoldberg
Copy link
Contributor

rgoldberg commented Oct 15, 2024

@koalalorenzo I don't get those mismatched version errors when I build, and we don't get those errors on the GitHub test servers.

What version of Xcode did you get those errors on? Was it Xcode 16, as you earlier said you were running Sequoia 15.01?

4 of your outdated apps all seem to be spurious confusions between the macOS & the iOS versions; the problem should be fixed in main via PR #496.

1 of your outdated apps, Slack, does appear to be truly outdated. Try updating it. If that works, then you should be fine once the new version of mas is released.

In the meantime, if you want the current version of mas from main instead of the released 1.8.6, we can try to fix the testing macOS version errors, or you can see if you can disable testing from the mas formula build, either via command line options or via editing the formula itself. I don't know if that can be done in nix, or if you can pass a binary that you've built elsewhere to nix.

Thanks for the info.

@rgoldberg
Copy link
Contributor

@koalalorenzo I fixed the testing macOS version errors in main. Can you try brew install --HEAD mas to install the current unreleased main code, then let me know if everything works fine for you?

@tdimeco
Copy link

tdimeco commented Oct 23, 2024

Hi! I have just tested the HEAD version, it seems to work well:

➜  mas outdated
360593530 Notability (14.9.17 -> 14.9.21)
1365531024 1Blocker (4.6 -> 5.8)
➜  brew uninstall mas             
...
➜  brew install --HEAD mas
...
➜  mas outdated
1444636541 Photomator (3.4.1 -> 3.4.2)
➜  ~ 

mas previously reported Notability and 1Blocker (the iOS versions) but not Photomator (which is the only one that actually needs to be updated on Mac). After the update, this is the expected result. 🎉 Thanks!

@rgoldberg
Copy link
Contributor

Closing because most of the issues reported here seem to be duplicates of the problem described in #491.

The few other issues reported here seem to be duplicates of the problem described in #540.

Fixes for these issues are in main waiting to be released in the next version (either 1.8.7, 1.9.0, or 2.0.0, whatever we decide to call it).

There is no real evidence that the problems noted here stem from a mismatch between CFBundleShortVersionString & CFBundleVersion.

If anyone experiences any problems with incorrect mas outdated or mas upgrade results with the code in main, or with any stable mas releases > 1.8.6, please open a new issue. I will try to get @phatblat update the beta releases with these & other fixes soon, but, currently, the beta releases suffer from the same problems as 1.8.6.

@rgoldberg rgoldberg closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests