Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are Big Sur installers working? #86

Closed
craig65535 opened this issue Mar 31, 2021 · 27 comments
Closed

Are Big Sur installers working? #86

craig65535 opened this issue Mar 31, 2021 · 27 comments

Comments

@craig65535
Copy link
Contributor

I have a 2008 (Intel) Mac Mini running macOS 11.2.3.

I was trying to download/create a Big Sur installer and was unable to download either 11.2.3 or 11.2.1. Here is the log for 11.2.1:

$ sudo python installinstallmacos.py 
Downloading https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog...
Downloading http://swcdn.apple.com/content/downloads/20/55/001-51042-A_2EJTJOSUC2/rsvf13iphg5lvcqcysqcarv8cvddq8igek/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/20/55/001-51042-A_2EJTJOSUC2/rsvf13iphg5lvcqcysqcarv8cvddq8igek/001-51042.English.dist...
No server metadata for 071-08935
Downloading https://swdist.apple.com/content/downloads/37/23/071-08935-A_VI70PU5ZSV/dxl5i8eyczg8zje0wiks3r03r91euyi9sa/071-08935.English.dist...
Downloading http://swcdn.apple.com/content/downloads/59/18/001-15219-A_EE9FN7UHJA/efuz3h0zlmx4qlinf4bxlguigo9jvhcr55/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/59/18/001-15219-A_EE9FN7UHJA/efuz3h0zlmx4qlinf4bxlguigo9jvhcr55/001-15219.English.dist...
Downloading http://swcdn.apple.com/content/downloads/34/54/041-88800-A_HLMBDM42FL/anrmoj880qkj0lbybqm0c3830p70nawjrv/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/34/54/041-88800-A_HLMBDM42FL/anrmoj880qkj0lbybqm0c3830p70nawjrv/041-88800.English.dist...
Downloading http://swcdn.apple.com/content/downloads/41/23/061-26578-A_FF0C6M87LS/ylvl0phx6uy3i444qt9p57n8wz0xnylmd9/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/41/23/061-26578-A_FF0C6M87LS/ylvl0phx6uy3i444qt9p57n8wz0xnylmd9/061-26578.English.dist...
Downloading http://swcdn.apple.com/content/downloads/61/24/001-57224/0o1xetys5n505gocjsil5qo0p4kg939elb/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/61/24/001-57224/0o1xetys5n505gocjsil5qo0p4kg939elb/001-57224.English.dist...
Downloading http://swcdn.apple.com/content/downloads/23/45/001-36735-A_IRCLJ5YYKF/z8vka6xfykydycui5b7atpc52btxmbffdn/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/23/45/001-36735-A_IRCLJ5YYKF/z8vka6xfykydycui5b7atpc52btxmbffdn/001-36735.English.dist...
Downloading http://swcdn.apple.com/content/downloads/08/44/041-90855-A_452WLVQACP/mzfvoi59bljh3w4w4lvwenfk0r1a2f7212/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/08/44/041-90855-A_452WLVQACP/mzfvoi59bljh3w4w4lvwenfk0r1a2f7212/041-90855.English.dist...
Downloading http://swcdn.apple.com/content/downloads/06/50/041-91758-A_M8T44LH2AW/b5r4og05fhbgatve4agwy4kgkzv07mdid9/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/06/50/041-91758-A_M8T44LH2AW/b5r4og05fhbgatve4agwy4kgkzv07mdid9/041-91758.English.dist...
Downloading http://swcdn.apple.com/content/downloads/01/28/061-86291-A_JPEIWIOZES/enpozvvbmj3mj2dhulhevlt8b429qd5kw0/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/01/28/061-86291-A_JPEIWIOZES/enpozvvbmj3mj2dhulhevlt8b429qd5kw0/061-86291.English.dist...
Downloading http://swcdn.apple.com/content/downloads/26/37/001-68446/r1dbqtmf3mtpikjnd04cq31p4jk91dceh8/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/26/37/001-68446/r1dbqtmf3mtpikjnd04cq31p4jk91dceh8/001-68446.English.dist...
Downloading http://swcdn.apple.com/content/downloads/10/06/001-36801-A_9MBEQ97Z9M/672a1q4u8978ize3s15ygivp2dqwmk10qb/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/10/06/001-36801-A_9MBEQ97Z9M/672a1q4u8978ize3s15ygivp2dqwmk10qb/001-36801.English.dist...
Downloading http://swcdn.apple.com/content/downloads/17/32/061-26589-A_8GJTCGY9PC/25fhcu905eta7wau7aoafu8rvdm7k1j4el/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/17/32/061-26589-A_8GJTCGY9PC/25fhcu905eta7wau7aoafu8rvdm7k1j4el/061-26589.English.dist...
Downloading http://swcdn.apple.com/content/downloads/37/41/001-04366/a6boefh8b6bee4k2x6v5lwyfjr7od2ica3/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/37/41/001-04366/a6boefh8b6bee4k2x6v5lwyfjr7od2ica3/001-04366.English.dist...
No server metadata for 071-05432
Downloading https://swdist.apple.com/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/071-05432.English.dist...
No server metadata for 071-14766
Downloading https://swdist.apple.com/content/downloads/12/32/071-14766-A_Q2H6ELXGVG/zx8saim8tei7fezrmvu4vuab80m0e8a5ll/071-14766.English.dist...
 #      ProductID    Version    Build   Post Date  Title
 1      001-15219    10.15.5  19F2200  2020-06-15  macOS Catalina
 2      001-68446    10.15.7    19H15  2020-11-11  macOS Catalina
 3      001-04366    10.15.4  19E2269  2020-05-04  macOS Catalina
 4      071-08935     11.2.2    20D80  2021-03-01  macOS Big Sur
 5      061-86291    10.15.3  19D2064  2020-03-23  macOS Catalina
 6      041-91758    10.13.6    17G66  2019-10-19  macOS High Sierra
 7      041-88800    10.14.4  18E2034  2019-10-23  macOS Mojave
 8      071-14766     11.2.3    20D91  2021-03-08  macOS Big Sur
 9      061-26589    10.14.6   18G103  2019-10-14  macOS Mojave
10      071-05432     11.2.1    20D75  2021-02-15  macOS Big Sur
11      001-51042    10.15.7     19H2  2020-09-24  macOS Catalina
12      001-36735    10.15.6  19G2006  2020-08-06  macOS Catalina
13      001-57224    10.15.7     19H4  2020-10-27  macOS Catalina
14      041-90855    10.13.5   17F66a  2019-10-23  Install macOS High Sierra Beta
15      061-26578    10.14.5  18F2059  2019-10-14  macOS Mojave
16      001-36801    10.15.6  19G2021  2020-08-12  macOS Catalina

Choose a product to download (1-16): 10  
Downloading http://swcdn.apple.com/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/BuildManifest.plist...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 35624    0 35624    0     0  40298      0 --:--:-- --:--:-- --:--:-- 40253
Downloading http://swcdn.apple.com/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/UpdateBrain.zip...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1935k  100 1935k    0     0  1751k      0  0:00:01  0:00:01 --:--:-- 1751k
Downloading http://swcdn.apple.com/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/MajorOSInfo.pkg...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2571k  100 2571k    0     0  2015k      0  0:00:01  0:00:01 --:--:-- 2013k
Downloading https://swdist.apple.com/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/MajorOSInfo.pkm...
Downloading http://swcdn.apple.com/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/InstallInfo.plist...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   188  100   188    0     0    773      0 --:--:-- --:--:-- --:--:--   770
Downloading http://swcdn.apple.com/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/Info.plist...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1705  100  1705    0     0   7104      0 --:--:-- --:--:-- --:--:--  7104
Downloading http://swcdn.apple.com/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/InstallAssistant.pkg...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11.3G  100 11.3G    0     0  9124k      0  0:21:45  0:21:45 --:--:-- 8607k
Downloading https://swdist.apple.com/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/InstallAssistant.pkm...
Making empty sparseimage...
installer: Package name is macOS Big Sur
installer: Installing at base path /private/tmp/dmg.y9IuqG
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An error occurred while running scripts from the package 

install.log:

2021-03-26 17:47:14-06 rtp-crdaviso-nitro4 installer[41524]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: location = file://localhost
2021-03-26 17:47:14-06 rtp-crdaviso-nitro4 installer[41524]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: file://localhost/Users/crdaviso/Downloads/macadmin-scripts-main/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf0
4s/InstallAssistant.pkg
2021-03-26 17:47:14-06 rtp-crdaviso-nitro4 installer[41524]: Set authorization level to root for session
2021-03-26 17:47:14-06 rtp-crdaviso-nitro4 installer[41524]: Administrator authorization granted.
2021-03-26 17:47:14-06 rtp-crdaviso-nitro4 installer[41524]: Set authorization level to root for session
2021-03-26 17:47:14-06 rtp-crdaviso-nitro4 installer[41524]: Will use PK session
2021-03-26 17:47:14-06 rtp-crdaviso-nitro4 installer[41524]: Using authorization level of root for IFPKInstallElement
2021-03-26 17:47:14-06 rtp-crdaviso-nitro4 installer[41524]: PackageKit: Bypassing the enforcement checker since the destination is read/write
2021-03-26 17:47:14-06 rtp-crdaviso-nitro4 installer[41524]: Starting installation:
2021-03-26 17:47:15-06 rtp-crdaviso-nitro4 installer[41524]: Configuring volume "Install_macOS_11.2.1-20D75"
2021-03-26 17:47:15-06 rtp-crdaviso-nitro4 installer[41524]: Preparing disk for local booted install.
2021-03-26 17:47:15-06 rtp-crdaviso-nitro4 installer[41524]: Free space on "Install_macOS_11.2.1-20D75": 16.81 GB (16807059456 bytes).
2021-03-26 17:47:15-06 rtp-crdaviso-nitro4 installer[41524]: Create temporary directory "/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T//Install.41524yZvWpE"
2021-03-26 17:47:15-06 rtp-crdaviso-nitro4 installer[41524]: IFPKInstallElement (1 packages)
2021-03-26 17:47:15-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: Adding client PKInstallDaemonClient pid=41524, uid=0 (/usr/sbin/installer)
2021-03-26 17:47:15-06 rtp-crdaviso-nitro4 installer[41524]: PackageKit: Enqueuing install with framework-specified quality of service (utility)
2021-03-26 17:47:15-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: ----- Begin install -----
2021-03-26 17:47:15-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: request=PKInstallRequest <1 packages, destination=/private/tmp/dmg.y9IuqG>
2021-03-26 17:47:15-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: packages=(
            "PKLeopardPackage <id=com.apple.pkg.InstallAssistant.macOSBigSur, version=20.3.75, url=file://localhost/Users/crdaviso/Downloads/macadmin-scripts-main/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/InstallAssistant.pkg>"
        )
2021-03-26 17:47:15-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: Extracting file://localhost/Users/crdaviso/Downloads/macadmin-scripts-main/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/InstallAssistant.pkg (destination=/pr
ivate/tmp/dmg.y9IuqG/.PKInstallSandboxManager-SystemSoftware/EAC88AED-52B4-4D28-BC8D-BFC17943F52C.activeSandbox/Root, uid=0)
2021-03-26 17:47:16-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: prevent user idle system sleep
2021-03-26 17:47:16-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: suspending backupd
2021-03-26 17:47:16-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: Using system content trashcan path /private/tmp/dmg.y9IuqG/.PKInstallSandboxManager-SystemSoftware/EAC88AED-52B4-4D28-BC8D-BFC17943F52C.activeSandbox/Trashes for sandbox /private/tmp/dmg.y9IuqG/
.PKInstallSandboxManager-SystemSoftware/EAC88AED-52B4-4D28-BC8D-BFC17943F52C.activeSandbox
2021-03-26 17:47:16-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: Shoving /private/tmp/dmg.y9IuqG/.PKInstallSandboxManager-SystemSoftware/EAC88AED-52B4-4D28-BC8D-BFC17943F52C.activeSandbox/Root (1 items) to /private/tmp/dmg.y9IuqG
2021-03-26 17:47:16-06 rtp-crdaviso-nitro4 shove[41526]: [src=noflags] /tmp/dmg.y9IuqG: restored flags 0x100000
2021-03-26 17:47:16-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit (package_script_service): Preparing to execute script "./postinstall.zsh" in /private/tmp/PKInstallSandbox.Evrpmv/Scripts/com.apple.pkg.InstallAssistant.macOSBigSur.jQNxL0
2021-03-26 17:47:16-06 rtp-crdaviso-nitro4 package_script_service[20253]: PackageKit: Executing script "postinstall.zsh" in /tmp/PKInstallSandbox.Evrpmv/Scripts/com.apple.pkg.InstallAssistant.macOSBigSur.jQNxL0
2021-03-26 17:47:16-06 rtp-crdaviso-nitro4 package_script_service[20253]: Set responsibility to pid: 580, responsible_path: /System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/Resources/system_installd
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 package_script_service[20253]: ./postinstall.zsh: Linking /Users/crdaviso/Downloads/macadmin-scripts-main/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/InstallAssistant.pkg into /private/tmp/dmg.y9IuqGApplications/Install macOS Big Sur.app/Contents/SharedSupport
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 package_script_service[20253]: ./postinstall.zsh: ln: /private/tmp/dmg.y9IuqGApplications/Install macOS Big Sur.app/Contents/SharedSupport/SharedSupport.dmg: Operation not permitted
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 package_script_service[20253]: ./postinstall.zsh: chmod: /private/tmp/dmg.y9IuqGApplications/Install macOS Big Sur.app/Contents/SharedSupport/SharedSupport.dmg: No such file or directory
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 package_script_service[20253]: ./postinstall.zsh: chown: /private/tmp/dmg.y9IuqGApplications/Install macOS Big Sur.app/Contents/SharedSupport/SharedSupport.dmg: No such file or directory
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 package_script_service[20253]: ./postinstall.zsh: chflags: /private/tmp/dmg.y9IuqGApplications/Install macOS Big Sur.app/Contents/SharedSupport/SharedSupport.dmg: No such file or directory
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 package_script_service[20253]: Responsibility set back to self.
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: releasing backupd
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: allow user idle system sleep
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “InstallAssistant.pkg”." UserInfo={NSFilePath=./postinstall.zsh, NSURL=file://localhost/Users/crdaviso/Downloads/macadmin-scripts-main/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/InstallAssistant.pkg, PKInstallPackageIdentifier=com.apple.pkg.InstallAssistant.macOSBigSur, NSLocalizedDescription=An error occurred while running scripts from the package “InstallAssistant.pkg”.} {
            NSFilePath = "./postinstall.zsh";
            NSLocalizedDescription = "An error occurred while running scripts from the package \U201cInstallAssistant.pkg\U201d.";
            NSURL = "file://localhost/Users/crdaviso/Downloads/macadmin-scripts-main/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/InstallAssistant.pkg";
            PKInstallPackageIdentifier = "com.apple.pkg.InstallAssistant.macOSBigSur";
        }
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: Running idle tasks
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 installer[41524]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “InstallAssistant.pkg”." UserInfo={NSFilePath=./postinstall.zsh, NSURL=file://localhost/Users/crdaviso/Downloads/macadmin-scripts-main/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/InstallAssistant.pkg, PKInstallPackageIdentifier=com.apple.pkg.InstallAssistant.macOSBigSur, NSLocalizedDescription=An error occurred while running scripts from the package “InstallAssistant.pkg”.}
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: Removing client PKInstallDaemonClient pid=41524, uid=0 (/usr/sbin/installer)
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 system_installd[580]: PackageKit: Done with sandbox removals
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 installer[41524]: PackageKit: Bypassing the enforcement checker since the destination is read/write
2021-03-26 17:47:17-06 rtp-crdaviso-nitro4 installer[41524]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.

Two observations:

  • Install macOS Big Sur.app/Contents/SharedSupport/SharedSupport.dmg does not exist, but seems to be expected by postinstall.zsh.
  • The No server metadata for 071-05432 warning for 11.2.1 and the other BigSur versions.
@blacktop
Copy link

grahampugh#39

@craig65535
Copy link
Contributor Author

craig65535 commented Mar 31, 2021

@blacktop This happens with an empty content subdir, and does not appear to have anything to do with the downloads themselves.

@craig65535 craig65535 changed the title Are Big Sur downloads working? Are Big Sur installers working? Apr 1, 2021
@craig65535
Copy link
Contributor Author

Building a Catalina installer (e.g. 001-68446 10.15.7 19H15 2020-11-11 macOS Catalina) seems to work. So, I think this issue is isolated to building a Big Sur installer.

@gregneagle
Copy link
Contributor

I’ve built Big Sur installers for each release without issue. Haven’t tried in the last week or so.

@craig65535
Copy link
Contributor Author

craig65535 commented Apr 1, 2021

@gregneagle I've built them before, too, so maybe something changed.

Taking a look at my install.log...

The .dist file that is being installed contains a reference to InstallAssistant.pkg. That pkg file contains Scripts/postinstall.zsh which calls Scripts/postinstall_actions/link_shared_support.zsh. When run, the latter tries to find SharedSupport.dmg in the nonsense path /private/tmp/dmg.y9IuqGApplications/Install macOS Big Sur.app/Contents/SharedSupport/SharedSupport.dmg. Note the lack of / before Applications.

Maybe the script in InstallAssistant.pkg is now broken and will only work when the target is / and not something like /private/tmp/dmg.XXXXXX?

@craig65535
Copy link
Contributor Author

Could also be different behaviour with /usr/sbin/installer on 11.2.3.

@blacktop
Copy link

blacktop commented Apr 2, 2021

@gregneagle I've built them before, too, so maybe something changed.

Taking a look at my install.log...

The .dist file that is being installed contains a reference to InstallAssistant.pkg. That pkg file contains Scripts/postinstall.zsh which calls Scripts/postinstall_actions/link_shared_support.zsh. When run, the latter tries to find SharedSupport.dmg in the nonsense path /private/tmp/dmg.y9IuqGApplications/Install macOS Big Sur.app/Contents/SharedSupport/SharedSupport.dmg. Note the lack of / before Applications.

Maybe the script in InstallAssistant.pkg is now broken and will only work when the target is / and not something like /private/tmp/dmg.XXXXXX?

Interesting, I seem to recall a block of code in your installer where you rename the /private/tmp/dmg.y9IuqGApplications to /private/tmp/dmg.y9IuqG/Applications here - https://github.com/munki/macadmin-scripts/blob/main/installinstallmacos.py#L228

So maybe Apple got lazy and now just tries to use the "mistake" /private/tmp/dmg.y9IuqGApplications instead of fixing it?

@craig65535
Copy link
Contributor Author

@blacktop It definitely seems to be a related issue. In this case the script is half-correct - writing to the correct path, but then reading from the wrong one.

@craig65535
Copy link
Contributor Author

I found something interesting: running the script from a different directory, e.g. ~/devel/macadmin-scripts, works. It fails when running from ~/Downloads, e.g. ~/Downloads/macadmin-scripts-main.

I noticed the same for ~/Documents. I think this is a SIP thing?

It looks like the script will need to be be updated to refuse to run from certain protected folders.

@blacktop
Copy link

blacktop commented Apr 2, 2021

Whoa! that's very interesting. I've also been running out of my Downloads folder, I'll try again in a different one

@gregneagle
Copy link
Contributor

gregneagle commented Apr 2, 2021

Or you could read the Read Me :-)

https://github.com/munki/macadmin-scripts#important-note-for-catalina

@craig65535
Copy link
Contributor Author

@gregneagle I noticed that there was a check for the current directory, but it wasn't working for me (my script was in a subdir under Downloads, not Downloads itself). #87 should address that, and also make the warning more noticeable to users.

@leftbones
Copy link

The most recent Big Sur update (11.3.1) is now giving me the error:

curl: (22) The requested URL returned error: 416

@gregneagle
Copy link
Contributor

Can you be more specific about what you are trying to do?
I can successfully download the Bug Sur 11.3.1 installer using installinstallmacos.py:

./installinstallmacos.py 
Downloading https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog...
Downloading http://swcdn.apple.com/content/downloads/20/55/001-51042-A_2EJTJOSUC2/rsvf13iphg5lvcqcysqcarv8cvddq8igek/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/20/55/001-51042-A_2EJTJOSUC2/rsvf13iphg5lvcqcysqcarv8cvddq8igek/001-51042.English.dist...
No server metadata for 071-08935
Downloading https://swdist.apple.com/content/downloads/37/23/071-08935-A_VI70PU5ZSV/dxl5i8eyczg8zje0wiks3r03r91euyi9sa/071-08935.English.dist...
Downloading http://swcdn.apple.com/content/downloads/59/18/001-15219-A_EE9FN7UHJA/efuz3h0zlmx4qlinf4bxlguigo9jvhcr55/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/59/18/001-15219-A_EE9FN7UHJA/efuz3h0zlmx4qlinf4bxlguigo9jvhcr55/001-15219.English.dist...
Downloading http://swcdn.apple.com/content/downloads/34/54/041-88800-A_HLMBDM42FL/anrmoj880qkj0lbybqm0c3830p70nawjrv/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/34/54/041-88800-A_HLMBDM42FL/anrmoj880qkj0lbybqm0c3830p70nawjrv/041-88800.English.dist...
Downloading http://swcdn.apple.com/content/downloads/41/23/061-26578-A_FF0C6M87LS/ylvl0phx6uy3i444qt9p57n8wz0xnylmd9/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/41/23/061-26578-A_FF0C6M87LS/ylvl0phx6uy3i444qt9p57n8wz0xnylmd9/061-26578.English.dist...
Downloading http://swcdn.apple.com/content/downloads/61/24/001-57224/0o1xetys5n505gocjsil5qo0p4kg939elb/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/61/24/001-57224/0o1xetys5n505gocjsil5qo0p4kg939elb/001-57224.English.dist...
Downloading http://swcdn.apple.com/content/downloads/23/45/001-36735-A_IRCLJ5YYKF/z8vka6xfykydycui5b7atpc52btxmbffdn/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/23/45/001-36735-A_IRCLJ5YYKF/z8vka6xfykydycui5b7atpc52btxmbffdn/001-36735.English.dist...
Downloading http://swcdn.apple.com/content/downloads/08/44/041-90855-A_452WLVQACP/mzfvoi59bljh3w4w4lvwenfk0r1a2f7212/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/08/44/041-90855-A_452WLVQACP/mzfvoi59bljh3w4w4lvwenfk0r1a2f7212/041-90855.English.dist...
Downloading http://swcdn.apple.com/content/downloads/06/50/041-91758-A_M8T44LH2AW/b5r4og05fhbgatve4agwy4kgkzv07mdid9/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/06/50/041-91758-A_M8T44LH2AW/b5r4og05fhbgatve4agwy4kgkzv07mdid9/041-91758.English.dist...
Downloading http://swcdn.apple.com/content/downloads/01/28/061-86291-A_JPEIWIOZES/enpozvvbmj3mj2dhulhevlt8b429qd5kw0/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/01/28/061-86291-A_JPEIWIOZES/enpozvvbmj3mj2dhulhevlt8b429qd5kw0/061-86291.English.dist...
No server metadata for 071-29172
Downloading https://swdist.apple.com/content/downloads/40/42/071-29172-A_50FL5BT4I6/5w0xm8c31yigcf2iov4n4mlsvnw1upzo2q/071-29172.English.dist...
Downloading http://swcdn.apple.com/content/downloads/26/37/001-68446/r1dbqtmf3mtpikjnd04cq31p4jk91dceh8/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/26/37/001-68446/r1dbqtmf3mtpikjnd04cq31p4jk91dceh8/001-68446.English.dist...
No server metadata for 071-32414
Downloading https://swdist.apple.com/content/downloads/16/05/071-32414-A_33YH16R8HF/28ment5qr993c0l9i1qbh4fuknli9wzglp/071-32414.English.dist...
Downloading http://swcdn.apple.com/content/downloads/10/06/001-36801-A_9MBEQ97Z9M/672a1q4u8978ize3s15ygivp2dqwmk10qb/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/10/06/001-36801-A_9MBEQ97Z9M/672a1q4u8978ize3s15ygivp2dqwmk10qb/001-36801.English.dist...
Downloading http://swcdn.apple.com/content/downloads/17/32/061-26589-A_8GJTCGY9PC/25fhcu905eta7wau7aoafu8rvdm7k1j4el/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/17/32/061-26589-A_8GJTCGY9PC/25fhcu905eta7wau7aoafu8rvdm7k1j4el/061-26589.English.dist...
Downloading http://swcdn.apple.com/content/downloads/37/41/001-04366/a6boefh8b6bee4k2x6v5lwyfjr7od2ica3/InstallAssistantAuto.smd...
Downloading https://swdist.apple.com/content/downloads/37/41/001-04366/a6boefh8b6bee4k2x6v5lwyfjr7od2ica3/001-04366.English.dist...
No server metadata for 071-05432
Downloading https://swdist.apple.com/content/downloads/00/60/071-05432-A_QOY2QE0UMR/puuz6c0epc7o0ozyovvi6tjxhzpf6uf04s/071-05432.English.dist...
No server metadata for 071-14766
Downloading https://swdist.apple.com/content/downloads/12/32/071-14766-A_Q2H6ELXGVG/zx8saim8tei7fezrmvu4vuab80m0e8a5ll/071-14766.English.dist...
 #      ProductID    Version    Build   Post Date  Title
 1      001-15219    10.15.5  19F2200  2020-06-15  macOS Catalina
 2      001-68446    10.15.7    19H15  2020-11-11  macOS Catalina
 3      001-36801    10.15.6  19G2021  2020-08-12  macOS Catalina
 4      071-32414     11.3.1   20E241  2021-05-03  macOS Big Sur
 5      001-04366    10.15.4  19E2269  2020-05-04  macOS Catalina
 6      071-08935     11.2.2    20D80  2021-03-01  macOS Big Sur
 7      061-86291    10.15.3  19D2064  2020-03-23  macOS Catalina
 8      041-91758    10.13.6    17G66  2019-10-19  macOS High Sierra
 9      041-88800    10.14.4  18E2034  2019-10-23  macOS Mojave
10      071-14766     11.2.3    20D91  2021-03-08  macOS Big Sur
11      061-26589    10.14.6   18G103  2019-10-14  macOS Mojave
12      071-05432     11.2.1    20D75  2021-02-15  macOS Big Sur
13      001-51042    10.15.7     19H2  2020-09-24  macOS Catalina
14      001-36735    10.15.6  19G2006  2020-08-06  macOS Catalina
15      001-57224    10.15.7     19H4  2020-10-27  macOS Catalina
16      041-90855    10.13.5   17F66a  2019-10-23  Install macOS High Sierra Beta
17      061-26578    10.14.5  18F2059  2019-10-14  macOS Mojave
18      071-29172       11.3   20E232  2021-04-26  macOS Big Sur

Choose a product to download (1-18): 4
Downloading http://swcdn.apple.com/content/downloads/16/05/071-32414-A_33YH16R8HF/28ment5qr993c0l9i1qbh4fuknli9wzglp/MajorOSInfo.pkg...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2571k  100 2571k    0     0  41.1M      0 --:--:-- --:--:-- --:--:-- 41.8M
Downloading https://swdist.apple.com/content/downloads/16/05/071-32414-A_33YH16R8HF/28ment5qr993c0l9i1qbh4fuknli9wzglp/MajorOSInfo.pkm...
Downloading http://swcdn.apple.com/content/downloads/16/05/071-32414-A_33YH16R8HF/28ment5qr993c0l9i1qbh4fuknli9wzglp/InstallAssistant.pkg...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11.5G  100 11.5G    0     0   105M      0  0:01:52  0:01:52 --:--:--  112M
Downloading https://swdist.apple.com/content/downloads/16/05/071-32414-A_33YH16R8HF/28ment5qr993c0l9i1qbh4fuknli9wzglp/InstallAssistant.pkm...
Downloading http://swcdn.apple.com/content/downloads/16/05/071-32414-A_33YH16R8HF/28ment5qr993c0l9i1qbh4fuknli9wzglp/UpdateBrain.zip...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1921k  100 1921k    0     0  1542k      0  0:00:01  0:00:01 --:--:-- 1542k
Downloading http://swcdn.apple.com/content/downloads/16/05/071-32414-A_33YH16R8HF/28ment5qr993c0l9i1qbh4fuknli9wzglp/BuildManifest.plist...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 35251  100 35251    0     0   124k      0 --:--:-- --:--:-- --:--:--  124k
Downloading http://swcdn.apple.com/content/downloads/16/05/071-32414-A_33YH16R8HF/28ment5qr993c0l9i1qbh4fuknli9wzglp/Info.plist...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1683  100  1683    0     0  54290      0 --:--:-- --:--:-- --:--:-- 54290
Downloading http://swcdn.apple.com/content/downloads/16/05/071-32414-A_33YH16R8HF/28ment5qr993c0l9i1qbh4fuknli9wzglp/InstallInfo.plist...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   188  100   188    0     0   6482      0 --:--:-- --:--:-- --:--:--  6482
Making empty sparseimage...
installer: Package name is macOS Big Sur
installer: Installing at base path /private/tmp/dmg.7mftYx
installer: The install was successful.
*********************************************************
*** Working around a very dumb Apple bug in a package ***
*** postinstall script that fails to correctly target ***
*** the Install macOS.app when installed to a volume  ***
*** other than the current boot volume.               ***
***       Please file feedback with Apple!            ***
*********************************************************
Product downloaded and installed to /Users/Shared/macadmin-scripts-main/Install_macOS_11.3.1-20E241.sparseimage
Making read-only compressed disk image containing Install macOS Big Sur.app...
...................................................................................................................................
created: /Users/Shared/macadmin-scripts-main/Install_macOS_11.3.1-20E241.dmg
Disk image created at: ./Install_macOS_11.3.1-20E241.dmg

@gregneagle
Copy link
Contributor

416 is "range not satisfiable" so that sounds like an error attempting to resume a partial download. I'd clear your local content directory (in the same directory as the installinstallmacos.py tool) and try again.

@gregneagle
Copy link
Contributor

I'm closing this because Big Sur installers are working and always have been -- there are no issues with the script itself. External issues are not predicable or on me to fix :-)

@leftbones
Copy link

416 is "range not satisfiable" so that sounds like an error attempting to resume a partial download. I'd clear your local content directory (in the same directory as the installinstallmacos.py tool) and try again.

That seems to have fixed my issue, not sure what went wrong. Thanks though!

@craig65535
Copy link
Contributor Author

craig65535 commented May 25, 2021

@evprkr In most cases, HTTP error 416 just means the file is already up-to-date, and no new download is necessary. The message is logged only because it's output by curl.

@gregneagle This error could be suppressed if it's causing confusion. Basically, stderr could be collected from curl and then only printed if it's not error 416.

@gregneagle
Copy link
Contributor

Sounds like a fragile bug if "In most cases, HTTP error 416 just means the file is already up-to-date". What about the other cases? And how do we tell them apart?

@craig65535
Copy link
Contributor Author

craig65535 commented May 25, 2021

I agree it's not ideal, but I'm not sure it's really a bug. If we're resuming, our request contains:

  • A date condition (If-Unmodified-Since:, the curl -z -<date> option). This is set to the date of the downloaded file on disk.
  • A range (Range: bytes, the curl -C -) option. This is set to >= the current file size.

The server returns 416 ("Range not satisfiable") if it can't satisfy the range condition. This could happen if the file is 100 bytes, we already have all 100 bytes, and the script asks for Range: bytes 100-. It could also happen in edge cases, like the user appending junk bytes to the end of a downloaded file.

The server returns 412 ("Precondition failed") if it can't satisfy the date condition. This could happen if the file was updated server-side. In this case, we delete the file and download again.

Beyond suppressing the error message, another fix for the 416 error would be to not attempt to re-download if we are sure we already have the file. We would need to track successful downloads in a file (maybe a zero-byte file for each downloaded file), and if that file exists, issue a HEAD request with no range (just a date condition) instead of a GET request. If that HEAD with no range returns 200, take no action. If it returns 412, delete both the download and the zero-byte file, and download again. @gregneagle is that worth pursuing? The current behaviour is less complex.

@gregneagle
Copy link
Contributor

Even less complex would be to not attempt to resume partial downloads.

If the current code, which does attempt to resume partial downloads, causes too much confusion, or more importantly, too many questions/support requests/GitHub issues, it needs to change, even if that means removing or disabling that feature.

I've made my work available for others to use, but I don't have to set things up to make it a chore for me...

@craig65535
Copy link
Contributor Author

So I guess that's 3 options -

  • Suppress the HTTP 416 error (I'm happy to make a PR to do this)
  • Implement a more complex resume feature to never make a request with an unsatisfiable range
  • Remove the resume feature entirely

It's your call, of course, but there is a usability advantage to having resume functionality when the downloads are measured in GB. The feature (with my previous PR) also seems to work well, outside of logging this error message.

@gregneagle
Copy link
Contributor

A problem with suppressing the 416 error is that it isn't always because you have a complete file.

@craig65535
Copy link
Contributor Author

I think that unless the user is sabotaging their own downloaded content, that is what it means. (Unless there's something I haven't thought of)

@gregneagle
Copy link
Contributor

And there's the problem: I'm expected to support software whose behavior I don't completely understand (and it sounds like possibly you don't, either). I'd rather hoped curl itself would handle partial download resumption without a lot of poorly-understood logic having to be written around it.

@craig65535
Copy link
Contributor Author

craig65535 commented May 25, 2021

The key thing is that we have a script that is asking to resume an already completed file. That wouldn't happen in a typical web browser situation. Maybe the solution is to act more like a browser and download to <file>.download and then rename to <file> on completion.

That's easier than what I laid out above. I can look into making this change.

@craig65535
Copy link
Contributor Author

@gregneagle PTAL at #90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants