Installing updates with /usr/sbin/softwareupdate or App Store Fail.

Number:rdar://35510039 Date Originated:10/13/2017
Status:Open Resolved:
Product:macOS Product Version:10.12+
Classification:Serious Bug Reproducible:Sometimes
Hide Description
Software Update

After caching a download with `/usr/sbin/softwareupdate -d -a` and waiting a certain period of time, usually 2-3 days, and then trying to install the update with `/usr/sbin/softwareupdate --verbose --install “item” --no-scan` results in a successful output from Standard Out. Checking again for available updates results in the same update being available.

Steps to Reproduce:
1.  Run `/usr/sbin/softwareupdate -d -a` to download/cache the updates on a 10.12.* or 10.13.* machine.
2. Wait a certain amount of time. Usually 2-3 Days.
3. Attempt to install the updates with `/usr/sbin/softwareupdate --verbose --install “item” --no-scan`
4. Receive a standard out of “Installing ‘item’”; “Done with ‘item’; “Done.”… There is no mention of a failure.
5. Run `/usr/sbin/softwareupdate -d -a` again to see that the update is downloaded again.
6. Investigating `/var/log/install.log` reveals a message of “Invalid or incomplete local product ‘PRODUCT ID NUMBER’”


Expected Results:
After running step 3 the update should successfully install or at least note in the output that it failed. Ideally it should install without issue. 

Actual Results:
The update fails to install. 

Happens to mostly all of our 3000 plus machines we attempt to install.

The only work around that we’ve found is to delete the Cached Update in `/Library/Updates/${PRODUCT ID}` and re-download them immediately install. This happens on a machine if it is on or off the network. I can successfully reproduce this on a machine if I copy over the `/Library/Updates/` directory to a random directory, say `/Users/Shared/`, run the install. on the failure softwareupdate removes `/Library/Updates/${PRODUCT ID}/*.pkgs`. I can copy the updates from `/Users/Shared/` and try again and it will fail fairly consistently. Happens if a user is logged in a or if at login window. Attempting to install the update from the App Store reveals a Failure Dialog as well.


Only seems to effect machines enabled with FileVault.

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!