mas-cli / mas

:package: Mac App Store command line interface
MIT License
10.81k stars 273 forks source link

🐛 [BUG] 500: Internal Server Error for some apps. #495

Closed FracKenA closed 4 days ago

FracKenA commented 1 year ago

Your Environment

mas Install Method

Describe the Bug

Getting error "The server gave an error during download: 500 internal Server Error." for an app that supports Mac/iPad/iPhone universal. Is this related to #321 ? This is a purchased app, previously purchased.

To Reproduce

Steps to reproduce the behavior:

  1. mas search opencat
  2. copy opencat id in results. 2143935391
  3. mas install 2143935391

Expected Behavior

Expecting app to install.

Actual Behavior

Error stated above, 500 internal server error.

Screenshots, Terminal Output

If applicable, add screenshots to help explain your problem.

 15:07:27 ~
$ mas search opencat
 -2143935391  OpenCat                       (1.3.0)
 -2143867999  Charming - 莫斯                 (0.8.6)
 -2143951518  PingPongChat                  (2.0.9)
 -2141890190  Tapkey - Customize key sounds (1.0.0)
 -2143841923  AssisChat - AI Assistant Chat (1.5)
 -2143615333  MyChatAI                      (1.11.0)
 -2142158273  Motrix - AI Chat Client       (1.8.1)
 -2144055741  Chat X - AI Assistant         (1.2.0)
 -2141086998  KnowBot-AI chat robot client  (1.0.8)
 -2143455284  AICat: GPT Open Chat          (1.0.3)
 -2141877205  ChatPrompt - AI Open Chats    (1.1.30508)
 -2143799715  White Bird - AI Chat Copilot  (4.0)

 15:07:27 ~
$ mas install 2143935391
Error: Download request failed: The server gave an error during download: 500 Internal Server Error.
thatrobotdev commented 6 months ago

I had the same problem, where mas "Magnet", id: 441258766 in a Brewfile with brew bundle installed with no issue but mas "CrystalFetch ISO Downloader", id: 2135503303 triggered the 500 Internal Server Error.

Brewfile

mas "CrystalFetch ISO Downloader", id: 2135503303
mas "Magnet", id: 441258766

Terminal input:

~ % brew bundle
Installing CrystalFetch ISO Downloader

At this point, the following pop-up appeared:

Screenshot of App Store error that says "Error del servidor durante la descarga: 500 Internal Server Error. Then, on a new line: "Internal Server Error". The pop-up has two button choices: "Cancelar" and "Reintentar""

("Error del servidor durante la descarga" translated to English is "Server error during the download". "Cancelar" is "Cancel", "Reintentar" is "Retry").

I clicked "Reintentar", and this pop-up appeared:

Screenshot of App Store error that says "AMD-Action:buyProduct:SM". The pop-up has two button choices: "Cancelar" and "Reintentar"

Clicking "Reintentar" again brings you back to the first pop-up, and the first pop-up keeps re-appearing with every time I click "Reintentar" unless I click "Cancelar". Then this pops up in my terminal:

Error: Download request failed: Error del servidor durante la descarga: 500 Internal Server Error.
Installing CrystalFetch ISO Downloader has failed!

Installing Magnet
...
Homebrew Bundle failed! 1 Brewfile dependency failed to install.

Environment: mas version: 1.8.6 macOS version (system_profiler SPSoftwareDataType -detailLevel mini): macOS 14.4 (23E214)

mas Install Method: brew install mas (homebrew core)

rhaslund commented 1 month ago

Same issue for: 2085073091 Ghostery Privacy Ad Blocker

rgoldberg commented 1 week ago

This is all because mas search incorrectly outputs app IDs as signed Int32, instead of as UInt64, as per #478.

PR #479 is an initial fix for this.

In the meantime, get the ID from the Apple MAS GUI, or convert yourself all negative IDs from Int32 to UInt64.

Opened #533 about improving error messages.

Can we close this as a duplicate?.

rgoldberg commented 4 days ago

This is a duplicate of #478 (please follow that issue). PR #535 has been submitted to fix the issue.

Please follow $533 for error message improvements.

If you think this issue is different than #478, please let us know.