Closed dan-gill closed 3 weeks ago
@dan-gill
It's possible that an extra copy of the application is in a subfolder of /Applications
.
Please look for extra copies in every subfolder of /Applications
, which can be done with the following zsh command:
\ls -d1 /Applications/(^*.app/)#*(Windows|Microsoft)*(D/)
If you don't find duplicates that way:
mas obtains the list of apps from an Apple data structure from a private framework. We filter it to ensure that we only deal with apps under /Applications
. Our code for mas list
shouldn't duplicate, add, filter, etc. any apps other than the aforementioned /Applications
path filter.
mas currently doesn't have good debugging output. That will be provided in a forthcoming release, but will involve a complete rewrite of our output code.
In the meantime, it's easiest to debug via Xcode. Are you familiar with development in Xcode?
If so, could you fork mas, clone it, and open the project in Xcode 14.2 or newer?
Could you then either debug or just include more info in the mas list
output?
Put a breakpoint in the for loop in AppListFormatter.format(products:)
, then debug mas
passing list
as the command-line argument via a scheme?
Find product.bundlePath
wherever ["Windows App", "Microsoft Remote Desktop"].contains(product.appName)
.
Then share the product.bundlePath
s you found.
The info is provided from Apple CKSoftwareProduct
s (defined in CKSoftwareProduct.h
) wrapped by the mas SoftwareProduct
protocol.
Change the following line in the AppListFormatter.format(products:)
:
output += "\(appID) \(appName) (\(version))\n"
to be:
output += "\(appID) \(appName) (\(version))\n \(product.bundlePath)"
Then run using list
as an argument, then share the results.
@rgoldberg - I think there is something wrong with this command.
ls -d1 /Applications/(^*.app/)#*(Windows|Microsoft)*(D/)
When I use it, I get this error:
zsh: bad pattern: /Applications/(^*.app/)#*(Windows|Microsoft)*(D/)
I am unfamiliar with Xcode for development.
@dan-gill I forgot to mention that you must enable extended globbing for that to work. Run the following before the \ls …
command:
setopt extendedglob
I enable extended globbing in my .zshrc
, so I never need to manually enable it.
Thank you, here is the output:
Can you try the following command lines?
\ls -dA /Applications/Windows\ App.app/Contents/MacOS
\ls -d1 /Applications/**/*(Windows|Microsoft)*.app(D/)
The first will be quick as it just lists one folder's contents; the second might take some time as it searches under /Applications
for any *.app
folder whose name contains Windows
or Microsoft
.
That seemed a bit much for a screenshot, so here is the output:
❯ \ls -A /Applications/Windows\ App.app/Contents/MacOS
Windows App
❯ \ls -d1 /Applications/**/*(Windows|Microsoft)*.app(D/)
/Applications/Microsoft Defender.app
/Applications/Microsoft Defender.app/Contents/MacOS/Microsoft Defender Helper.app
/Applications/Microsoft Defender.app/Contents/MacOS/Microsoft Defender.app
/Applications/Microsoft Edge.app
/Applications/Microsoft Edge.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/130.0.2849.56/Helpers/Microsoft Edge Helper (Alerts).app
/Applications/Microsoft Edge.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/130.0.2849.56/Helpers/Microsoft Edge Helper (GPU).app
/Applications/Microsoft Edge.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/130.0.2849.56/Helpers/Microsoft Edge Helper (Plugin).app
/Applications/Microsoft Edge.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/130.0.2849.56/Helpers/Microsoft Edge Helper (Renderer).app
/Applications/Microsoft Edge.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/130.0.2849.56/Helpers/Microsoft Edge Helper.app
/Applications/Microsoft Edge.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/130.0.2849.68/Helpers/Microsoft Edge Helper (Alerts).app
/Applications/Microsoft Edge.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/130.0.2849.68/Helpers/Microsoft Edge Helper (GPU).app
/Applications/Microsoft Edge.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/130.0.2849.68/Helpers/Microsoft Edge Helper (Plugin).app
/Applications/Microsoft Edge.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/130.0.2849.68/Helpers/Microsoft Edge Helper (Renderer).app
/Applications/Microsoft Edge.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/130.0.2849.68/Helpers/Microsoft Edge Helper.app
/Applications/Microsoft Excel.app
/Applications/Microsoft Excel.app/Contents/SharedSupport/Microsoft Error Reporting.app
/Applications/Microsoft Excel.app/Contents/SharedSupport/Microsoft.Mashup.Container.app
/Applications/Microsoft OneNote.app
/Applications/Microsoft OneNote.app/Contents/SharedSupport/Microsoft Error Reporting.app
/Applications/Microsoft Outlook.app
/Applications/Microsoft Outlook.app/Contents/SharedSupport/Microsoft Error Reporting.app
/Applications/Microsoft PowerPoint.app
/Applications/Microsoft PowerPoint.app/Contents/SharedSupport/Microsoft Error Reporting.app
/Applications/Microsoft Teams.app
/Applications/Microsoft Teams.app/Contents/Helpers/Microsoft Teams ModuleHost.app
/Applications/Microsoft Teams.app/Contents/Helpers/Microsoft Teams WebView.app
/Applications/Microsoft Teams.app/Contents/Helpers/Microsoft Teams WebView.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/128.0.2739.75/Helpers/Microsoft Teams WebView Helper (GPU).app
/Applications/Microsoft Teams.app/Contents/Helpers/Microsoft Teams WebView.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/128.0.2739.75/Helpers/Microsoft Teams WebView Helper (Plugin).app
/Applications/Microsoft Teams.app/Contents/Helpers/Microsoft Teams WebView.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/128.0.2739.75/Helpers/Microsoft Teams WebView Helper (Renderer).app
/Applications/Microsoft Teams.app/Contents/Helpers/Microsoft Teams WebView.app/Contents/Frameworks/Microsoft Edge Framework.framework/Versions/128.0.2739.75/Helpers/Microsoft Teams WebView Helper.app
/Applications/Microsoft Word.app
/Applications/Microsoft Word.app/Contents/SharedSupport/Microsoft Error Reporting.app
/Applications/OneDrive.app/Contents/Microsoft SharePoint.app
/Applications/Windows App.app
I just realized that we can use a dry run of an uninstall to see the paths to the apps reported by mas:
sudo mas uninstall --dry-run 1295203466
This will NOT uninstall anything. sudo
is required, though, even for a dry run.
And thanks for the prior command outputs. They obviously don't show any reason why Microsoft Remote Desktop
would be showing up in the mas output.
Interesting:
Is that an AWS server, or some other virtual server? This could be something weird from Amazon / some virtualization thing.
Can you try:
sudo ls -ld '/Applications/Microsoft Remote Desktop.app'
Is this an Apple Silicon or Intel? (it probably won't help me figure anything out, but…)
Also, maybe try to reset the Mac App Store services via:
mas reset --debug
You could also try: on the Account page in App Store.app
(accessible by clicking on the text at the bottom of the left pane that says the name of the Apple ID for which you're signed in in the Mac App Store), try to reload the page via the keyboard (Command-r) or via the menu (Store > Reload Page). Before you do that, check to see if Microsoft Remote Desktop
is listed amongst your Purchased apps.
That is just part of my profile in ~/.aws/config for the AWS CLI. It lets me know which region I'm in when running AWS commands. I'm running this on my MacBook Pro - Apple Silicon.
You could also try: on the Account page in
App Store.app
(accessible by clicking on the text at the bottom of the left pane that says the name of the Apple ID for which you're signed in in the Mac App Store), try to reload the page via the keyboard (Command-r) or via the menu (Store > Reload Page). Before you do that, check to see ifMicrosoft Remote Desktop
is listed amongst your Purchased apps.
This did the trick! However, I didn't read the entire post first and did not see the last sentence "Before you do that..."
@dan-gill no problem.
Did you try mas reset --debug
beforehand? If so, i assume that didn't solve the problem.
Yes, that is correct. I did everything in the order you listed.
Cool. I assume the sudo ls …
command didn't return any results, right?
Correct.
@dan-gill Thanks for the info.
I'll close this issue since it seems to have been resolved.
I created #633, a new issue about implementing the equivalent of "Reload Page" in mas, if you feel like subscribing to that.
It'll probably be a while before we get to that as it will take research, and it might not be possible to do.
Your Environment
mas version
: 1.8.7system_profiler SPSoftwareDataType -detailLevel mini
): macOS 15.1 (24B83)mas Install Method
brew install mas
(homebrew-core).pkg
installer from releasesDescribe the Bug
To Reproduce
Steps to reproduce the behavior:
mas outdated
to see that an update is available to Windows App.mas upgrade
mas outdated
again and see that it offers to upgrade again. Repeat loop.Expected Behavior
Actual Behavior
Screenshots, Terminal Output
Additional Context