mist-cli: --compatible and "There was an error retrieving the 'devices' key from https://api.ipsw.me/v3/firmwares.json/condensed..."

1.9.1 (Latest: 1.9.1)

❯ sudo mist list firmware --compatible          
┌──────────────────┐
│ INPUT VALIDATION │
└──────────────────┘
  ├─ Search only for latest (first) result will be 'false'...
  ├─ Include betas in search results will be 'false'...
  ├─ Only include compatible firmwares will be 'true'...
  ├─ Output type will be 'ascii'...
┌────────┐
│ SEARCH │
└────────┘
  ├─ Searching for macOS Firmware versions...
  ├─ There was an error retrieving the 'devices' key from https://api.ipsw.me/v3/firmwares.json/condensed...
  ├─ This may indicate the API is being updated, please try again shortly...
  └─ Found 0 macOS Firmware(s) available for download
system_profiler SPHardwareDataType                   15:40:16
Hardware:

  Hardware Overview:

    Model Name: Mac mini
    Model Identifier: Macmini9,1
    Chip: Apple M1
    Total Number of Cores: 8 (4 performance and 4 efficiency)
    Memory: 16 GB
    System Firmware Version: 7459.141.1
    OS Loader Version: 7459.141.1
    Serial Number (system):XXX
    Hardware UUID: XXXX
    Provisioning UDID: XXXX
    Activation Lock Status: Enabled

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

@PicoMitchell thanks for your help with all the testing!

  • I have fixed the bug where /Users/Shared/Mist was not being created in time for the firmwares.json file to be written to disk
  • mist will now once again print the “This may indicate the API is being updated, please try again shortly…” message if the API lookup fails

So it looks like the worst that could happen if the cached firmwares.json is out-of-date and doesn’t list the newest version available from the --compatible query (like https://api.ipsw.me/v4/device/MacBookPro18,4?type=ipsw, for example) is that mist will simply not list the latest version yet as you can see here where I edited the cached firmwares.json to NOT include the 13.0.1 release even though 13.0.1 was in the listing retrieved from the model specific --compatible query:

mist-cli-feature-cache-firmwares-json/.build/apple/Products/Release/mist list firmware

┌──────────────────┐
│ INPUT VALIDATION │
└──────────────────┘
  ├─ Search only for latest (first) result will be 'false'...
  ├─ Include betas in search results will be 'false'...
  ├─ Only include compatible firmwares will be 'true'...
  ├─ macOS Firmware metadata cache path will be '/Users/Shared/Mist/firmwares.json'...
  ├─ Output type will be 'ascii'...
┌────────┐
│ SEARCH │
└────────┘
  ├─ Searching for macOS Firmware versions...
  ├─ There was an error retrieving macOS Firmware metadata from 'https://api.ipsw.me/v3/firmwares.json/condensed'
  ├─ Retrieving macOS Firmware metadata from '/Users/Shared/Mist/firmwares.json'...
  └─ Found 11 macOS Firmware(s) available for download

Signed │ Name           │ Version │ Build  │ Size     │ Date       │ Compatible
───────┼────────────────┼─────────┼────────┼──────────┼────────────┼───────────
True   │ macOS Ventura  │ 13.0    │ 22A380 │ 12.20 GB │ 2022-10-24 │ True      
True   │ macOS Monterey │ 12.6    │ 21G115 │ 14.08 GB │ 2022-09-12 │ True      
True   │ macOS Monterey │ 12.5.1  │ 21G83  │ 14.09 GB │ 2022-08-17 │ True      
True   │ macOS Monterey │ 12.5    │ 21G72  │ 14.08 GB │ 2022-07-20 │ True      
True   │ macOS Monterey │ 12.4    │ 21F79  │ 13.84 GB │ 2022-05-16 │ True      
True   │ macOS Monterey │ 12.3.1  │ 21E258 │ 13.88 GB │ 2022-03-31 │ True      
True   │ macOS Monterey │ 12.3    │ 21E230 │ 13.87 GB │ 2022-03-14 │ True      
True   │ macOS Monterey │ 12.2.1  │ 21D62  │ 14.14 GB │ 2022-02-10 │ True      
True   │ macOS Monterey │ 12.2    │ 21D49  │ 14.14 GB │ 2022-01-26 │ True      
True   │ macOS Monterey │ 12.1    │ 21C52  │ 14.14 GB │ 2021-12-13 │ True      
True   │ macOS Monterey │ 12.0.1  │ 21A559 │ 14.10 GB │ 2021-11-04 │ True

For full disclosure, I ran this test from my Intel Mac and just edited to mist source to trick it into thinking I was running from a MacBookPro18,4 which was a lot easier that setting up the development environment on my testing M1 Air that currently only has a un-setup clean install.

When there is no cache available, I think it wouldn’t hurt to still show a message about IPSW.me being updated and to try again in a few hours:

mist-cli-feature-cache-firmwares-json/.build/apple/Products/Release/mist list firmware

┌──────────────────┐
│ INPUT VALIDATION │
└──────────────────┘
  ├─ Search only for latest (first) result will be 'false'...
  ├─ Include betas in search results will be 'false'...
  ├─ Only include compatible firmwares will be 'false'...
  ├─ macOS Firmware metadata cache path will be '/Users/Shared/Mist/firmwares.json'...
  ├─ Output type will be 'ascii'...
┌────────┐
│ SEARCH │
└────────┘
  ├─ Searching for macOS Firmware versions...
  ├─ There was an error retrieving macOS Firmware metadata from 'https://api.ipsw.me/v3/firmwares.json/condensed'
  ├─ Unable to retrieve macOS Firmware metadata from missing cache '/Users/Shared/Mist/firmwares.json'
  └─ Found 0 macOS Firmware(s) available for download

On one basic test, it loading the cached firmwares.json appeared to work properly:

mist-cli-feature-cache-firmwares-json/.build/apple/Products/Release/mist list firmware

┌──────────────────┐
│ INPUT VALIDATION │
└──────────────────┘
  ├─ Search only for latest (first) result will be 'false'...
  ├─ Include betas in search results will be 'false'...
  ├─ Only include compatible firmwares will be 'false'...
  ├─ macOS Firmware metadata cache path will be '/Users/Shared/Mist/firmwares.json'...
  ├─ Output type will be 'ascii'...
┌────────┐
│ SEARCH │
└────────┘
  ├─ Searching for macOS Firmware versions...
  ├─ There was an error retrieving macOS Firmware metadata from 'https://api.ipsw.me/v3/firmwares.json/condensed'
  ├─ Retrieving macOS Firmware metadata from '/Users/Shared/Mist/firmwares.json'...
  └─ Found 27 macOS Firmware(s) available for download

Signed │ Name           │ Version │ Build   │ Size     │ Date       │ Compatible
───────┼────────────────┼─────────┼─────────┼──────────┼────────────┼───────────
True   │ macOS Ventura  │ 13.0.1  │ 22A400  │ 12.20 GB │ 2022-11-09 │ False     
True   │ macOS Ventura  │ 13.0    │ 22A380  │ 12.20 GB │ 2022-10-24 │ False     
True   │ macOS Monterey │ 12.6    │ 21G115  │ 14.08 GB │ 2022-09-12 │ False     
True   │ macOS Monterey │ 12.5.1  │ 21G83   │ 14.09 GB │ 2022-08-17 │ False     
True   │ macOS Monterey │ 12.5    │ 21G72   │ 14.08 GB │ 2022-07-20 │ False     
True   │ macOS Monterey │ 12.4    │ 21F2092 │ 13.70 GB │ 2022-06-16 │ False     
True   │ macOS Monterey │ 12.4    │ 21F2081 │ 14.08 GB │ 2022-06-14 │ False     
True   │ macOS Monterey │ 12.4    │ 21F79   │ 13.84 GB │ 2022-05-16 │ False     
True   │ macOS Monterey │ 12.3.1  │ 21E258  │ 13.88 GB │ 2022-03-31 │ False     
True   │ macOS Monterey │ 12.3    │ 21E230  │ 13.87 GB │ 2022-03-14 │ False     
True   │ macOS Monterey │ 12.2.1  │ 21D62   │ 14.14 GB │ 2022-02-10 │ False     
True   │ macOS Monterey │ 12.2    │ 21D49   │ 14.14 GB │ 2022-01-26 │ False     
True   │ macOS Monterey │ 12.1    │ 21C52   │ 14.14 GB │ 2021-12-13 │ False     
True   │ macOS Monterey │ 12.0.1  │ 21A559  │ 14.10 GB │ 2021-11-04 │ False     
True   │ macOS Big Sur  │ 11.6    │ 20G165  │ 13.96 GB │ 2021-09-17 │ False     
True   │ macOS Big Sur  │ 11.5.2  │ 20G95   │ 13.96 GB │ 2021-08-11 │ False     
True   │ macOS Big Sur  │ 11.5.1  │ 20G80   │ 13.97 GB │ 2021-07-26 │ False     
True   │ macOS Big Sur  │ 11.5    │ 20G71   │ 13.96 GB │ 2021-07-21 │ False     
True   │ macOS Big Sur  │ 11.4    │ 20F71   │ 13.93 GB │ 2021-05-24 │ False     
True   │ macOS Big Sur  │ 11.3.1  │ 20E241  │ 13.94 GB │ 2021-05-03 │ False     
True   │ macOS Big Sur  │ 11.3    │ 20E232  │ 13.95 GB │ 2021-04-26 │ False     
True   │ macOS Big Sur  │ 11.2.3  │ 20D91   │ 13.71 GB │ 2021-03-08 │ False     
True   │ macOS Big Sur  │ 11.2.2  │ 20D80   │ 13.70 GB │ 2021-02-25 │ False     
True   │ macOS Big Sur  │ 11.2.1  │ 20D74   │ 13.70 GB │ 2021-02-09 │ False     
True   │ macOS Big Sur  │ 11.2    │ 20D64   │ 13.70 GB │ 2021-02-01 │ False     
True   │ macOS Big Sur  │ 11.1    │ 20C69   │ 13.90 GB │ 2020-12-14 │ False     
True   │ macOS Big Sur  │ 11.0.1  │ 20B29   │ 13.61 GB │ 2020-11-18 │ False 

But, I plan to also do some testing on an Apple Silicon Mac so I can see how thing behave when the cache is out of sync with the latest individual model data from IPSW.me using the --compatible option.

Getting an error right off the bat:

mist-cli-feature-cache-firmwares-json/.build/apple/Products/Release/mist list firmware

┌──────────────────┐
│ INPUT VALIDATION │
└──────────────────┘
  ├─ Search only for latest (first) result will be 'false'...
  ├─ Include betas in search results will be 'false'...
  ├─ Only include compatible firmwares will be 'false'...
  ├─ macOS Firmware metadata cache path will be '/Users/Shared/Mist/firmwares.json'...
  ├─ Output type will be 'ascii'...
┌────────┐
│ SEARCH │
└────────┘
  ├─ Searching for macOS Firmware versions...
  ├─ Caching macOS Firmware metadata to '/Users/Shared/Mist/firmwares.json'...
  ├─ The folder “firmwares.json” doesn’t exist.
  └─ Found 0 macOS Firmware(s) available for download

UPDATE: This is because I manually deleted the /Users/Shared/Mist folder earlier during some other testing. Manually re-creating that folder makes the listing work properly, but mist should create that folder if needed to cache the firmwares.json file.

I like the idea of a local cache of the last valid firmwares.json file to fall back on when the IPSW.me API is being updated!