ninxsoft / mist-cli

A Mac command-line tool that automatically downloads macOS Firmwares / Installers.
MIT License
620 stars 29 forks source link

Request: Show More Informative Error Message When ipsw.me Is Updating Firmware Information #49

Closed PicoMitchell closed 2 years ago

PicoMitchell commented 2 years ago

When ipsw.me is updating firmware information for new releases, the v3 API can take a few hours to be updated (because of slower caching: https://twitter.com/icj_/status/1368997997200171016 & https://twitter.com/icj_/status/1176583207531241479 & https://twitter.com/icj_/status/1440043400049295372)

While the updates are being processed, the "devices" object returned from https://api.ipsw.me/v3/firmwares.json/condensed will be null, but the "iTunes" object will still have data in it.

Currently, when the "devices" object is null, mist shows an error that "There was an error retrieving firmwares from https://api.ipsw.me/v3/firmwares.json/condensed..." from: https://github.com/ninxsoft/Mist/blob/4ad02fd4bae57368be932be340ce061c29097138/Mist/Helpers/HTTP.swift#L36

Screen Shot 2021-12-22 at 3 27 51 PM

Since it is possible to detect the difference between not being able to load the firmwares.json file at all, and the "devices" object being temporarily null (either by detecting that the "iTunes" object has data, or by detecting that a "devices" key was present with a null value as opposed to not existing at all), I think it would be nice (and easy) for mist to present a different more informative error message stating the ipsw.me is currently updating the firmware information and to try again later today (or something like that).

ninxsoft commented 2 years ago

Sounds good, will look into adding this functionality!