mas icon indicating copy to clipboard operation
mas copied to clipboard

`outdated` & `upgrade` fail on Catalina

Open misc-activities opened this issue 6 years ago • 53 comments

I just installed mas on my macOS Catalina installation. I have signed into the app store from the Mac App Store. When I run mas list, I can see all the installed apps. There is an update available for Xcode which I want to try installing using mas. However, when I run mas outdated, it doesn't show the available update. I ran mas reset and then ran mas outdated again but that didn't work as well.

misc-activities avatar Oct 22 '20 04:10 misc-activities

I have the same issue but not only with Xcode, but all pending updates. There is no output from mas outdated.

Looks like CKUpdateController.shared().availableUpdates() is always returning an empty list.

hernancorigliano avatar Oct 22 '20 07:10 hernancorigliano

I'm experiencing the same situation.

  • mas outdated has no output even though I have apps that need to be updated
  • Similarly, mas upgrade returns Everything is up-to-date, which is not true
  • Trying to update individual apps by running mas upgrade XXXXXXXX where XXXXXXXX is the relevant ID returns Warning: Nothing found to upgrade

Luminus avatar Oct 26 '20 18:10 Luminus

Doesn’t seem to work on Catalina I have never got it to work fully. I can only get list, install and remove to work. At least I can install all my applications scripted on Big Sur the question is do all the Mas features work on Big Sur or is it going to be like Catalina?

andrewcrook avatar Nov 12 '20 12:11 andrewcrook

same for me, updates are available in AppStore, but when I run mas outdated it doesn't show the available update... same for mas upgrade/install (i'm on catalina)

Yelles avatar Nov 14 '20 13:11 Yelles

Outdated switch dead on Catalina.

drewauff avatar Nov 19 '20 02:11 drewauff

not working on Catalina after the recent security patch

ke11 avatar Nov 19 '20 12:11 ke11

I may be seeing something similar on Mojave. I came here to see if I could figure out why the App Store app is telling me there is an update for BlackMagic Speed Disk (425264550) but mas (which I usually run to avoid the aggravation with the GUI I've had in the past) just told me everything was up to date.

When I do a manual list of everything installed: mas list | grep Disk 425264550 Disk Speed Test (3.2)

When I tell mas to search the store: mas search "Disk Speed Test" | grep Disk 425264550 Blackmagic Disk Speed Test (3.3)

When I just run mas outdated, nothing is returned. And mas upgrade does nothing.

Obviously there is a difference between the names but I wouldn't think that would cause mas to mismatch since the app ID are the same?

UPDATE: Interestingly (?), I decided to try a forced reinstall: mas install 425264550 --force ==> Installed Blackmagic Disk Speed Test

only to find once again the resulting name in the listing didn't match after the "update": mas list | grep Disk 425264550 Disk Speed Test (3.3)

I don't know where the "Blackmagic" reference keeps disappearing to. Maybe it's blackmagic ??? ..... ;-)

brian163 avatar Nov 27 '20 16:11 brian163

Also not working on BigSur

Stanzilla avatar Dec 02 '20 23:12 Stanzilla

Apple has changed the way the AppStore works this may mean mas might not ever fully work with it.

andrewcrook avatar Dec 03 '20 09:12 andrewcrook

Not working for me on Catalina and Bigsur. As others have pointed, only "mas list" works. Outdated and upgrade don't, and never have for me since Catalina.

benftrex avatar Dec 08 '20 16:12 benftrex

I have the same issue but not only with Xcode, but all pending updates. There is no output from mas outdated.

Looks like CKUpdateController.shared().availableUpdates() is always returning an empty list.

If mas info and mas list works, isn't it an easy fix to use the info to decide if an upgrade is needed? This might be clumsy and slower but at least it works.

duhd1993 avatar Dec 27 '20 16:12 duhd1993

If mas info and mas list works, isn't it an easy fix to use the info to decide if an upgrade is needed

I just verified that mas info shows the current version of the app in the store while mas list shows the version of the app installed on my machine, so this should work.

I'd be willing to work on fixing this, but I haven't used Xcode, Mac APIs, Swift, or Objective-C before (I mainly code in Java & Kotlin).

I forked the repo, cloned the fork, and opened the project in Xcode 12.3 (12C33) on macOS 11.1 on Intel.

I received the following 8 errors & 1 warning when I build.

If someone can help me fix the build problems, I'll continue working on a PR for this issue.

~/Code/fork/mas/mas/main.swift:9:8:
No such module 'Commandant'

~/Code/fork/mas/MasKit/Commands/Account.swift:9:8:
No such module 'Commandant'

SwiftLint not installed, download from https://github.com/realm/SwiftLint

~/Code/fork/mas/Carthage/Build/Mac/Commandant.framework:
No such file or directory

~/Library/Developer/Xcode/DerivedData/mas-gwgogfusotbawbfpkrdgrxttzbny/Build/Intermediates.noindex/mas-cli.build/Debug/MasKit.build/module.modulemap:9:12:
Header 'MasKit-Swift.h' not found

~/Code/fork/mas/MasKitTests/Commands/AccountCommandSpec.swift:9:18:
Could not build Objective-C module 'MasKit'

~/Code/fork/mas/Carthage/Build/Mac/Quick.framework:
No such file or directory

~/Code/fork/mas/Carthage/Build/Mac/Nimble.framework:
No such file or directory

~/Code/fork/mas/Carthage/Build/Mac/Commandant.framework:
No such file or directory

rgoldberg avatar Jan 15 '21 04:01 rgoldberg

If mas info and mas list works, isn't it an easy fix to use the info to decide if an upgrade is needed

I just verified that mas info shows the current version of the app in the store while mas list shows the version of the app installed on my machine, so this should work.

I'd be willing to work on fixing this, but I haven't used Xcode, Mac APIs, Swift, or Objective-C before (I mainly code in Java & Kotlin).

I forked the repo, cloned the fork, and opened the project in Xcode 12.3 (12C33) on macOS 11.1 on Intel.

I received the following 8 errors & 1 warning when I built.

If someone can help me fix the build problems, I'll continue working on a PR for this issue.

~/Code/fork/mas/mas/main.swift:9:8:
No such module 'Commandant'

~/Code/fork/mas/MasKit/Commands/Account.swift:9:8:
No such module 'Commandant'

SwiftLint not installed, download from https://github.com/realm/SwiftLint

~/Code/fork/mas/Carthage/Build/Mac/Commandant.framework:
No such file or directory

~/Library/Developer/Xcode/DerivedData/mas-gwgogfusotbawbfpkrdgrxttzbny/Build/Intermediates.noindex/mas-cli.build/Debug/MasKit.build/module.modulemap:9:12:
Header 'MasKit-Swift.h' not found

~/Code/fork/mas/MasKitTests/Commands/AccountCommandSpec.swift:9:18:
Could not build Objective-C module 'MasKit'

~/Code/fork/mas/Carthage/Build/Mac/Quick.framework:
No such file or directory

~/Code/fork/mas/Carthage/Build/Mac/Nimble.framework:
No such file or directory

~/Code/fork/mas/Carthage/Build/Mac/Commandant.framework:
No such file or directory

Looks like you are just missing some package, for example, https://github.com/Carthage/Commandant

duhd1993 avatar Jan 15 '21 04:01 duhd1993

A git repo for Commandant already exists under ./Carthage/Checkouts/Commandant in the mas repo.

So the files should be there, it's just that the build doesn't know where they are.

Are there build setup instructions for mas?

I didn't see any in the readme or contributing docs.

I'm used to the build system (Gradle, for my projects) automatically downloading listed dependencies and producing the correct classpath for the compiler.

Do Apple ecosystem builds really require manual setup these days?

rgoldberg avatar Jan 15 '21 08:01 rgoldberg

A git repo for Commandant already exists under ./Carthage/Checkouts/Commandant in the mas repo.

So the files should be there, it's just that the build doesn't know where they are.

Are there build setup instructions for mas?

I didn't see any in the readme or contributing docs.

I'm used to the build system (Gradle, for my projects) automatically downloading listed dependencies and producing the correct classpath for the compiler.

Do Apple ecosystem builds really require manual setup these days?

Try the build script maybe. https://github.com/mas-cli/mas/blob/master/script/build

duhd1993 avatar Jan 15 '21 14:01 duhd1993

Looks like you need Ruby with Bundler, Brew and Xcode

it uses the standard make tool

The, to me, it looks like you to do the following first:

  • use the brewfile - brew Brewfile install
  • make init uses swiftenv to install the correct version of swift.
  • then make bootstrap to install all the dependencies

Looks like you need to run Brew on brewfile to install dependences this includes mint a swift dependency manager The mint file includes Carthage a cocoa dependency manager the Carfile includes the Commandant command line framework.

ruby packages are also managed Bundler with a gem file

Brewfile also installs make

so looking at the Makefile it looks like the build commands are initiated through the make tool and make runs the appropreate scripts in the script directory.

The bootstrap option seems to call all the dependency managers in turn to setup the environment in which to build.

You may need to look into these files for clues.

andrewcrook avatar Jan 15 '21 15:01 andrewcrook

Is the Apple ecosystem so poor that Xcode cannot recognize standard build scripts & run without manual configuration?

Or is this project just an oddity?

If Xcode does recognize standard build scripts, but many projects don't use them, then that's still a failure of the Apple ecosystem.

rgoldberg avatar Jan 15 '21 16:01 rgoldberg

Xcode has every thing to build products for Apple devices it uses project files and a majority of app developers just use Xcode. It is very good at it.

There are also many developers who prefer using other tools with the Xcode command line tools. Developers may like like to build custom dev/ environments , automated a host of other tasks, different versioning, different code management , target different platforms/architectures, customise their build CI/CD pipelines and use third party services.

Swift is also open sourced so some developers are using it server side with a host of different open source tools.

One thing to consider is that MAS might be using non-public apis.

andrewcrook avatar Jan 15 '21 16:01 andrewcrook

I have a basic version of mas outdated working in Xcode debug. It isn't working yet on the command line (I assume because of dylib selection issues), but I'll deal with this later (I haven't previously had to deal with dylib issues since I normally develop for the jvm, and I haven't ever used Xcode before).

A few questions:

Can I consider an app outdated if the version strings for the locally-installed version & the store version are different? Or must I implement a version ordering scheme to ensure that the store version is newer, not just different?

If no store app is found for the identifier for a local app, should I output an error to stderr? Should I silently ignore? Should I do something else? Should I output red (or another color) text for errors, or just output plain text? Should errors be output as they occur, or should they be saved to all be output after non-error output?

There might be some rough edges. I'm only building for x86_64 (instead of for both x86_64 & arm64) on my Intel Mac due to some error(s). I don't know if existing mas won't build for arm64, or if something is wrong with my Xcode setup. etc.

The sooner I have answers to the above, the sooner I'll be able to submit a PR (which will probably have to be revised, due to my inexperience with all the associated tech).

rgoldberg avatar Jan 16 '21 02:01 rgoldberg

I think you need to mimic availableUpdates as much as you can. Not sure how it behaves since it's undocumented. Basically what outdated produces should be the same as what AppStore prompt you to update. I never encountered situations that app version is reverted in appstore. But it seems no harm to add. For removed app, a message would be good to have.

duhd1993 avatar Jan 16 '21 02:01 duhd1993