Install macOS High Sierra.app does not appear to be a valid OS installer application

Solution 1:

Here's what you need to do (example follows High Sierra):

  1. Format a USB stick with format Mac OS Extended, scheme GUID Partition Map and name it Untitled
  2. Get and run the installer from https://support.apple.com/en-us/HT208969
  3. Run through the installer all until you are asked to restart, but then exit the installer
  4. sudo mkdir /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport
  5. sudo cp -R /macOS\ Install\ Data/ Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/
  6. sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled

And... if you get an error while installing OSX, e.g. "Installer resource error", then follow these step:

  1. ctrl+command+shift+alt+H and open the Terminal
  2. cp -rf /Volumes/Install\ macOS\ High\ Sierra/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/* /Volumes/Untitled/macOS\ install\ data/
  3. Reboot!

You're welcome!

Solution 2:

To get the full installer:

Method 1

  • Start the installer, which will download the missing files
  • Quit when prompted to restart
  • Copy (or move) the downloaded files from /macOS Install Data to a new SharedSupport folder inside /Applications/Install macOS High Sierra.app/Contents/. You can do that with :

    sudo cp -Rv "/macOS Install Data" "/Applications/Install macOS High Sierra.app/Contents/SharedSupport"
    

If you are afraid that it will restart by itself before you had a chance to quit the installer, try the manual method below.

Method 2

You can also directly download the missing files from Apple's server :

temp_dir=~/High-Sierra
mkdir -p $temp_dir && cd $temp_dir

url=http://swcdn.apple.com/content/downloads/29/03/091-94326/45lbgwa82gbgt7zbgeqlaurw2t9zxl8ku7
curl -R --remote-name-all $url/{BaseSystem,AppleDiagnostics}.{dmg,chunklist} $url/Install{Info.plist,ESDDmg.pkg}

mv $temp_dir "/Applications/Install macOS High Sierra.app/Contents/SharedSupport"

The code above downloads the needed files and moves them to the right place inside the stub installer. It downloads the following files :

  • BaseSystem.dmg
  • BaseSystem.chunklist
  • AppleDiagnostics.dmg
  • AppleDiagnostics.chunklist
  • InstallInfo.plist
  • InstallESDDmg.pkg

If you need another version or another language, this XML file lists all the links for different versions up to High Sierra. It is however difficult to find out which URL contains what. One way seems to be to download the listed "*.pkm" or "*.dist"files, which are also xml, and look inside. (I wonder why it has to be so hard, instead of just being able to download the full installer from a normal web or appstore page...)