softwareupdate tool -- oddities with macOS Catalina

Tests and Observations

  1. I invoked the softwareupdate command this way to create an installer for High Sierra:

    sudo softwareupdate --fetch-full-installer --full-installer-version 10.13.6

    Obviously the download started. Then after reporting a progress of about 60% it failed:

    Downloading and installing 10.13.6 installer
    Install failed with error: Update not found 
    
  2. As I suspected the command would possibly refuse to create an installer for an older system
    version than the current one, I invoked the softwareupdate command to create an installer for Catalina:

    sudo softwareupdate --fetch-full-installer --full-installer-version 10.15.4

    This attempt also failed:

    Downloading and installing 10.15.4 installer
    Installing: 90.0%
    Install failed with error: 0 
    
  3. When using macOS 10.15.4 Catalina I noticed that the options --set-catalog and
    --clear-catalog have been removed. To be precise, these options are no longer displayed
    in the help text. If used on invocation this message is returned:

    Changing the Software Update catalog is deprecated.
    The ability to specify a custom catalog will be removed in a future release of macOS. 
    

    For me it remains open whether these options are still effective or not.

  4. Revise software update settings:
    defaults delete com.apple.softwareupdate
    Enable System Preferences > Sharing > Content Caching
    sudo shutdown -r now

    After restarting the machine establish Internet connection via Ethernet and run:

    sudo softwareupdate --fetch-full-installer --full-installer-version 10.13.6
    

    Message returned: Downloading and installing 10.13.6 installer. As
    the download process reported no progress I killed the job after
    about two hours.
    At this point run AssetCacheManagerUtil:

    2020-04-21 18:34:03.821 AssetCacheLocatorUtil[735:18328] AssetCacheLocatorUtil version 111.1, framework version 111.1
    2020-04-21 18:34:03.822 AssetCacheLocatorUtil[735:18328] Determining public IP address...
    2020-04-21 18:34:04.607 AssetCacheLocatorUtil[735:18328] This computer's public IP address is ...
    2020-04-21 18:34:04.608 AssetCacheLocatorUtil[735:18328] --- Information for system services:
    2020-04-21 18:34:04.608 AssetCacheLocatorUtil[735:18328] Checking whether there might be content caches available...
    2020-04-21 18:34:04.608 AssetCacheLocatorUtil[735:18328] There might be content caches available.
    2020-04-21 18:34:04.608 AssetCacheLocatorUtil[735:18328] Finding saved content caches supporting personal caching...
    2020-04-21 18:34:04.610 AssetCacheLocatorUtil[735:18328] Found 1 content cache
    2020-04-21 18:34:04.610 AssetCacheLocatorUtil[735:18328] Finding saved content caches supporting personal caching and import...
    2020-04-21 18:34:04.611 AssetCacheLocatorUtil[735:18328] Found 1 content cache
    2020-04-21 18:34:04.611 AssetCacheLocatorUtil[735:18328] Finding saved content caches supporting shared caching...
    2020-04-21 18:34:04.611 AssetCacheLocatorUtil[735:18328] Found 1 content cache
    2020-04-21 18:34:04.611 AssetCacheLocatorUtil[735:18328] localhost:49514, rank 0, not favored, healthy, guid 75AEDF55-6059-449C-BBF2-34DA550790F6, valid until 2020-04-21 18:50:24; supports personal caching: yes, and import: yes, shared caching: yes
    2020-04-21 18:34:04.611 AssetCacheLocatorUtil[735:18328] Determining saved configured public IP address ranges...
    2020-04-21 18:34:04.615 AssetCacheLocatorUtil[735:18328] No public IP address ranges are configured.
    2020-04-21 18:34:04.615 AssetCacheLocatorUtil[735:18328] Determining saved favored server ranges...
    2020-04-21 18:34:04.615 AssetCacheLocatorUtil[735:18328] No favored server ranges are configured.
    2020-04-21 18:34:04.615 AssetCacheLocatorUtil[735:18328] Finding refreshed content caches supporting personal caching...
    2020-04-21 18:34:04.617 AssetCacheLocatorUtil[735:18328] Found 1 content cache
    2020-04-21 18:34:04.617 AssetCacheLocatorUtil[735:18328] Finding refreshed content caches supporting personal caching and import...
    2020-04-21 18:34:04.617 AssetCacheLocatorUtil[735:18328] Found 1 content cache
    2020-04-21 18:34:04.617 AssetCacheLocatorUtil[735:18328] Finding refreshed content caches supporting shared caching...
    2020-04-21 18:34:04.618 AssetCacheLocatorUtil[735:18328] Found 1 content cache
    2020-04-21 18:34:04.618 AssetCacheLocatorUtil[735:18328] localhost:49514, rank 0, not favored, healthy, guid 75AEDF55-6059-449C-BBF2-34DA550790F6, valid until 2020-04-21 18:54:04; supports personal caching: yes, and import: yes, shared caching: yes
    2020-04-21 18:34:04.618 AssetCacheLocatorUtil[735:18328] Determining refreshed configured public IP address ranges...
    2020-04-21 18:34:04.621 AssetCacheLocatorUtil[735:18328] No public IP address ranges are configured.
    2020-04-21 18:34:04.621 AssetCacheLocatorUtil[735:18328] Determining refreshed favored server ranges...
    2020-04-21 18:34:04.621 AssetCacheLocatorUtil[735:18328] No favored server ranges are configured.
    2020-04-21 18:34:04.621 AssetCacheLocatorUtil[735:18328] --- Information for user 501 (results for other users may be different):
    2020-04-21 18:34:04.621 AssetCacheLocatorUtil[735:18328] Checking whether there might be content caches available...
    2020-04-21 18:34:04.651 AssetCacheLocatorUtil[735:18328] There might be content caches available.
    2020-04-21 18:34:04.651 AssetCacheLocatorUtil[735:18328] Finding saved content caches supporting personal caching...
    2020-04-21 18:34:04.652 AssetCacheLocatorUtil[735:18328] There is no saved result.  (This is not an error.)
    2020-04-21 18:34:04.652 AssetCacheLocatorUtil[735:18328] Finding saved content caches supporting personal caching and import...
    2020-04-21 18:34:04.653 AssetCacheLocatorUtil[735:18328] There is no saved result.  (This is not an error.)
    2020-04-21 18:34:04.653 AssetCacheLocatorUtil[735:18328] Finding saved content caches supporting shared caching...
    2020-04-21 18:34:04.654 AssetCacheLocatorUtil[735:18328] There is no saved result.  (This is not an error.)
    2020-04-21 18:34:04.654 AssetCacheLocatorUtil[735:18328] Determining saved configured public IP address ranges...
    2020-04-21 18:34:04.658 AssetCacheLocatorUtil[735:18328] No public IP address ranges are configured.
    2020-04-21 18:34:04.658 AssetCacheLocatorUtil[735:18328] Determining saved favored server ranges...
    2020-04-21 18:34:04.658 AssetCacheLocatorUtil[735:18328] No favored server ranges are configured.
    2020-04-21 18:34:04.658 AssetCacheLocatorUtil[735:18328] Finding refreshed content caches supporting personal caching...
    2020-04-21 18:34:04.659 AssetCacheLocatorUtil[735:18328] Found 1 content cache
    2020-04-21 18:34:04.659 AssetCacheLocatorUtil[735:18328] Finding refreshed content caches supporting personal caching and import...
    2020-04-21 18:34:04.660 AssetCacheLocatorUtil[735:18328] Found 1 content cache
    2020-04-21 18:34:04.660 AssetCacheLocatorUtil[735:18328] Finding refreshed content caches supporting shared caching...
    2020-04-21 18:34:04.660 AssetCacheLocatorUtil[735:18328] Found 1 content cache
    2020-04-21 18:34:04.660 AssetCacheLocatorUtil[735:18328] localhost:49514, rank 0, not favored, healthy, guid 75AEDF55-6059-449C-BBF2-34DA550790F6, valid until 2020-04-21 18:54:04; supports personal caching: yes, and import: yes, shared caching: yes
    2020-04-21 18:34:04.660 AssetCacheLocatorUtil[735:18328] Determining refreshed configured public IP address ranges...
    2020-04-21 18:34:04.664 AssetCacheLocatorUtil[735:18328] No public IP address ranges are configured.
    2020-04-21 18:34:04.664 AssetCacheLocatorUtil[735:18328] Determining refreshed favored server ranges...
    2020-04-21 18:34:04.664 AssetCacheLocatorUtil[735:18328] No favored server ranges are configured.
    2020-04-21 18:34:04.664 AssetCacheLocatorUtil[735:18328] Testing all found content caches for reachability...
    2020-04-21 18:34:04.667 AssetCacheLocatorUtil[735:18328] This computer is able to reach all of the above content caches.
    
    

    Now run
    sudo softwareupdate --fetch-full-installer --full-installer-version 10.15.4

    Returning message

    Downloading and installing 10.15.4 installer  
    Install finished successfully  
    

    Interim result: We succeeded creating the installer for Catalina while we were - for the moment - not able to create the installer for High Sierra.

    At this point again run AssetCacheManagerUtil:

    2020-04-21 19:55:56.573 AssetCacheLocatorUtil[1397:67863] AssetCacheLocatorUtil version 111.1, framework version 111.1
    2020-04-21 19:55:56.573 AssetCacheLocatorUtil[1397:67863] Determining public IP address...
    2020-04-21 19:55:57.351 AssetCacheLocatorUtil[1397:67863] This computer's public IP address is ...
    2020-04-21 19:55:57.351 AssetCacheLocatorUtil[1397:67863] --- Information for system services:
    2020-04-21 19:55:57.352 AssetCacheLocatorUtil[1397:67863] Checking whether there might be content caches available...
    2020-04-21 19:55:57.352 AssetCacheLocatorUtil[1397:67863] There might be content caches available.
    2020-04-21 19:55:57.352 AssetCacheLocatorUtil[1397:67863] Finding saved content caches supporting personal caching...
    2020-04-21 19:55:57.353 AssetCacheLocatorUtil[1397:67863] There is no saved result.  (This is not an error.)
    2020-04-21 19:55:57.354 AssetCacheLocatorUtil[1397:67863] Finding saved content caches supporting personal caching and import...
    2020-04-21 19:55:57.354 AssetCacheLocatorUtil[1397:67863] There is no saved result.  (This is not an error.)
    2020-04-21 19:55:57.354 AssetCacheLocatorUtil[1397:67863] Finding saved content caches supporting shared caching...
    2020-04-21 19:55:57.354 AssetCacheLocatorUtil[1397:67863] There is no saved result.  (This is not an error.)
    2020-04-21 19:55:57.354 AssetCacheLocatorUtil[1397:67863] Determining saved configured public IP address ranges...
    2020-04-21 19:55:57.358 AssetCacheLocatorUtil[1397:67863] No public IP address ranges are configured.
    2020-04-21 19:55:57.358 AssetCacheLocatorUtil[1397:67863] Determining saved favored server ranges...
    2020-04-21 19:55:57.358 AssetCacheLocatorUtil[1397:67863] No favored server ranges are configured.
    2020-04-21 19:55:57.358 AssetCacheLocatorUtil[1397:67863] Finding refreshed content caches supporting personal caching...
    2020-04-21 19:55:57.361 AssetCacheLocatorUtil[1397:67863] Found 1 content cache
    2020-04-21 19:55:57.361 AssetCacheLocatorUtil[1397:67863] Finding refreshed content caches supporting personal caching and import...
    2020-04-21 19:55:57.362 AssetCacheLocatorUtil[1397:67863] Found 1 content cache
    2020-04-21 19:55:57.362 AssetCacheLocatorUtil[1397:67863] Finding refreshed content caches supporting shared caching...
    2020-04-21 19:55:57.362 AssetCacheLocatorUtil[1397:67863] Found 1 content cache
    2020-04-21 19:55:57.362 AssetCacheLocatorUtil[1397:67863] localhost:49514, rank 0, not favored, healthy, guid 75AEDF55-6059-449C-BBF2-34DA550790F6, valid until 2020-04-21 20:15:57; supports personal caching: yes, and import: yes, shared caching: yes
    2020-04-21 19:55:57.362 AssetCacheLocatorUtil[1397:67863] Determining refreshed configured public IP address ranges...
    2020-04-21 19:55:57.366 AssetCacheLocatorUtil[1397:67863] No public IP address ranges are configured.
    2020-04-21 19:55:57.366 AssetCacheLocatorUtil[1397:67863] Determining refreshed favored server ranges...
    2020-04-21 19:55:57.366 AssetCacheLocatorUtil[1397:67863] No favored server ranges are configured.
    2020-04-21 19:55:57.366 AssetCacheLocatorUtil[1397:67863] --- Information for user 501 (results for other users may be different):
    2020-04-21 19:55:57.366 AssetCacheLocatorUtil[1397:67863] Checking whether there might be content caches available...
    2020-04-21 19:55:57.366 AssetCacheLocatorUtil[1397:67863] There might be content caches available.
    2020-04-21 19:55:57.366 AssetCacheLocatorUtil[1397:67863] Finding saved content caches supporting personal caching...
    2020-04-21 19:55:57.367 AssetCacheLocatorUtil[1397:67863] There is no saved result.  (This is not an error.)
    2020-04-21 19:55:57.367 AssetCacheLocatorUtil[1397:67863] Finding saved content caches supporting personal caching and import...
    2020-04-21 19:55:57.367 AssetCacheLocatorUtil[1397:67863] There is no saved result.  (This is not an error.)
    2020-04-21 19:55:57.367 AssetCacheLocatorUtil[1397:67863] Finding saved content caches supporting shared caching...
    2020-04-21 19:55:57.368 AssetCacheLocatorUtil[1397:67863] There is no saved result.  (This is not an error.)
    2020-04-21 19:55:57.368 AssetCacheLocatorUtil[1397:67863] Determining saved configured public IP address ranges...
    2020-04-21 19:55:57.371 AssetCacheLocatorUtil[1397:67863] No public IP address ranges are configured.
    2020-04-21 19:55:57.371 AssetCacheLocatorUtil[1397:67863] Determining saved favored server ranges...
    2020-04-21 19:55:57.371 AssetCacheLocatorUtil[1397:67863] No favored server ranges are configured.
    2020-04-21 19:55:57.372 AssetCacheLocatorUtil[1397:67863] Finding refreshed content caches supporting personal caching...
    2020-04-21 19:55:57.373 AssetCacheLocatorUtil[1397:67863] Found 1 content cache
    2020-04-21 19:55:57.373 AssetCacheLocatorUtil[1397:67863] Finding refreshed content caches supporting personal caching and import...
    2020-04-21 19:55:57.373 AssetCacheLocatorUtil[1397:67863] Found 1 content cache
    2020-04-21 19:55:57.374 AssetCacheLocatorUtil[1397:67863] Finding refreshed content caches supporting shared caching...
    2020-04-21 19:55:57.374 AssetCacheLocatorUtil[1397:67863] Found 1 content cache
    2020-04-21 19:55:57.374 AssetCacheLocatorUtil[1397:67863] localhost:49514, rank 0, not favored, healthy, guid 75AEDF55-6059-449C-BBF2-34DA550790F6, valid until 2020-04-21 20:15:57; supports personal caching: yes, and import: yes, shared caching: yes
    2020-04-21 19:55:57.374 AssetCacheLocatorUtil[1397:67863] Determining refreshed configured public IP address ranges...
    2020-04-21 19:55:57.378 AssetCacheLocatorUtil[1397:67863] No public IP address ranges are configured.
    2020-04-21 19:55:57.378 AssetCacheLocatorUtil[1397:67863] Determining refreshed favored server ranges...
    2020-04-21 19:55:57.378 AssetCacheLocatorUtil[1397:67863] No favored server ranges are configured.
    2020-04-21 19:55:57.378 AssetCacheLocatorUtil[1397:67863] Testing all found content caches for reachability...
    2020-04-21 19:55:57.381 AssetCacheLocatorUtil[1397:67863] This computer is able to reach all of the above content caches.
    

Questions

  1. Is there a way to get the --fetch-full-installer option up and running?

  2. Is there a different way to specify software update catalogs in order to be subseqently used by the softwareupdatecommand?

    Any advices are highly welcome.

Hardware-Software-Environment
MacBook Pro 2019 running macOS 10.15.4 Catalina. There is no encryption enabled.

References
This post is a spinn-off from
Create a bootable installer for High Sierra under macOS Catalina

Introducing the new --fetch-full-installeroption of the softwareupdate command
https://scriptingosx.com/2019/10/download-a-full-install-macos-app-with-softwareupdate-in-catalina/


First to answer your questions:

  1. Nothing has changed and your commands to download the installer are correct on Catalina (Build 19E287 and newer are confirmed). Both put the requested installers in /Applications for me
  2. I would remove any preferences, and then restart to double check that your Macs that error don't have things you can change before you look at the network.

    defaults delete com.apple.softwareupdate
    sudo shutdown -r now

Then repeat the commands to download the full installer apps.


Here are results of your first command:

me@dev ~ % sudo softwareupdate --fetch-full-installer --full-installer-version 10.13.6   
Downloading and installing 10.13.6 installer
SUPreferenceManager: Failed to set object of class: __NSCFConstantString for key: LastRecommendedMajorOSBundleIdentifier with error: Error Domain=SUPreferenceManagerErrorDomain Code=1 "(null)"
Installing: 85.0%SUPreferenceManager: Failed to set object of class: __NSCFConstantString for key: LastRecommendedMajorOSBundleIdentifier with error: Error Domain=SUPreferenceManagerErrorDomain Code=1 "(null)"
Install finished successfully
me@dev /Applications % codesign -vvv Install\ macOS\ High\ Sierra.app 
Install macOS High Sierra.app: resource envelope is obsolete (custom omit rules)
me@dev /Applications % du -sm Install\ macOS\ High\ Sierra.app 
5003    Install macOS High Sierra.app

Sorry for the messy listing above, but things ran through the first time on my Catalina machines.

  1. Do you manage your SU catalog on this machine to point to a staged update server?
  2. Do you have any of the newer Asset Cache servers running? (the AssetCacheLocatorUtil tool will enumerate any caching servers - I typically have these and I have verified that the commands you run will cache the updates properly)

10.15.5 appears to have broken the following command: softwareupdate -d --fetch-full-installer --full-installer-version 10.15.5

It gives the following error now: SUPreferenceManager: Failed to set object of class: __NSCFConstantString for key: LastRecommendedMajorOSBundleIdentifier with error: Error Domain=SUPreferenceManagerErrorDomain Code=1 “(null)”

The command worked on 10.15.4.