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

Error: Download request failed: The network connection was lost. #649

Open
jebediah2 opened this issue Nov 21, 2024 · 5 comments
Open

Error: Download request failed: The network connection was lost. #649

jebediah2 opened this issue Nov 21, 2024 · 5 comments

Comments

@jebediah2
Copy link

First-time user.

mas version: 1.8.8-beta.9
macOS version: 10.15.7

mas Install Method

[] mas GitHub Releases

Bug Description

When running the mas purchase command, an App Store dialog appears with "The network connection was lost.", a Cancel and a Retry button. Nothing else happens. I don't have connection problems, a firewall or anything else, and purchasing/download apps from the App Store works perfectly.

Steps to Reproduce

  1. Have an active internet connection, be logged in to the App Store app and ensure apps can be downloaded.
  2. run mas purchase

Shell Output, Screenshots…

Error: Download request failed: The network connection was lost.

Console

com.apple.CommerceKit.TransactionService StorePurchaseBatchOperation: Cancelling 1 purchases from batch after error: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSLocalizedDescription=The network connection was lost.}

@rgoldberg
Copy link
Contributor

rgoldberg commented Nov 21, 2024

What other mas commands suffer the same network error?

I would guess install, lucky & upgrade, but likely none of the others.

The released 1.8.7 probably won't work on macOS 10.15.7 due to release problems, but the existing 1.8.6 & the forthcoming 1.8.8 and later versions should.

After trying other commands in 1.8.8 beta, can you try mas 1.8.6?

@rgoldberg
Copy link
Contributor

@jebediah2 have you had a chance to try out other commands, or to try rerunning mas purchase?

Have you had a chance to try out mas 1.8.6?

@rgoldberg
Copy link
Contributor

@jebediah2 mas 1.8.8 was just released. It is available for upgrade/install from homebrew-core, mas-cli/tap/mas, and the 1.8.8 GitHub Release.

Please let me know if your problem persists on it or not.

@jebediah2
Copy link
Author

I'm really sorry I haven't reported back earlier.

Gave it a go with 1.8.6 and 1.8.8 and results are identical. mas is indeed functional, but will not get passed the previously mentioned error 'Download request failed: The network connection was lost.', regardless of the commands used, i.e. purchase, install, lucky, or upgrade. The search command returns intended results.

Screenshot 2024-12-30 at 00 34 56

@rgoldberg
Copy link
Contributor

@jebediah2 No problem about delay. Thanks for the info. Sorry you're experiencing problems.

You mentioned at the start of the issue that you installed via the .pkg installer. The mas Homebrew custom tap should be able to install on macOS 10.15 now. If you are willing to use Homebrew:

If you haven't already installed Homebrew, please follow the installation instructions at https://brew.sh.

Then please move the mas installed by the *.pkg from its location (presumably /usr/local/bin/mas) somewhere else, then run:

brew uninstall mas
brew untap mas-cli/tap
brew tap mas-cli/tap
brew install mas-cli/tap/mas
mas version

The first 2 commands are just to ensure that you don't have a vestigial install of either the mas formulae or the mas-cli/tap custom tap. You can skip those 2 commands if you've just installed Homebrew for the first time.

The last command is to ensure that 1.8.8 was installed.

Then please run the mas commands again.

Does the following command work fine (it should return the App Store info for Xcode)? I assume it should.

mas info 497799835

You mentioned that you don't have a firewall or anything else; does that include VPNs, Private Relay, etc.? If you do have any of them, please try the mas commands with them disabled. Also, please search in your macOS System Preferences for firewall, then ensure that the builtin macOS firewall is off for your mas tests.

I'm assuming the problem is that you're on macOS 10.15 and that something is incompatible with such an older macOS. mas 1.8.7+ is supposed to be able to run on macOS 10.13+, but I don't have any older macOS version Macs on which to test.

I assume that you cannot upgrade to any newer macOS versions, including macOS 11+ or a newer version of macOS 10.15. If you can, however, you probably should do so; if you do, please try mas again on the newer macOS version.

Unfortunately, I probably won't have the time to look into this much as there is tons of other mas work, and I'm basically working solo right now. It will probably be very hard to diagnose this problem. I wish I had more bandwidth / other contributors / a better handle on Mac development to be able to fix this quickly without requiring much investigation.

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

2 participants