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

Open
1 of 4 tasks
luispuerto opened this issue May 18, 2021 · 14 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
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

10 participants