mas-cli / mas-cli/mas

`outdated --accurate*` takes excessively long (5+ minutes) or hangs when lots of MAS apps installed

Open
#1,062 29 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Swift
Stars
12.4k
Forks
299
Avg merge
1d 2h
Merged PRs (30d)
1

Description

Configuration
mas ▁▁▁▁ 3.0.1
arch ▁▁▁ arm64
from ▁▁▁ homebrew/core/mas
origin ▁ https://github.com/mas-cli/mas.git
rev ▁▁▁▁ 67e5dfd18882ad294c58441f5d2308d4dfccb862
swift ▁▁ 6.2.1 (swiftlang-6.2.1.4.8 clang-1700.4.4.1)
driver ▁ 1.127.14.1
region ▁ CA
macos ▁▁ 26.1 (25B78)
mac ▁▁▁▁ Mac16,9
cpu ▁▁▁▁ Apple M4 Max
Bug description

I've noticed this on several machines. I wouldn't say I have a ton of MAS apps installed, less than 100. However mas outdated even with a pure 1Gbp/s pipe to my machine that is dedicated to that machine only can take longer then 5 minutes to complete. I have a script locally that exits the command on timeout of 5 minutes, which it always hits.

Updatest users are also reporting excessively long mas outdated runs on 3.0.0, which causes Updatest's internal timeout of 5 minutes to prevent command hanging to fail mas cli.

This did not happen on the old mas outdated command pre 3.0.0. I suspect the addition of a download/cancel to the logic is causing this issue.

Steps to reproduce
  • Have an assortment of MAS apps (over 35)
  • Run mas outdated
  • In most cases, it takes over 5 minutes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing mas outdated with more than 35 MAS apps and compare its behavior with the pre-3.0.0 command. Trace the download/cancel logic suspected in the report, then verify that the command completes without exceeding the five-minute timeout on a similarly populated installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.