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

Error Update 10.14 or 11.x from 10.13.6 #169

Closed
bertocea85 opened this issue Nov 25, 2021 · 10 comments
Closed

Error Update 10.14 or 11.x from 10.13.6 #169

bertocea85 opened this issue Nov 25, 2021 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@bertocea85
Copy link

bertocea85 commented Nov 25, 2021

Describe the bug
hello!
When we try to upgrade from 10.13.6 with the following command, erase-install.sh --os = 11 --force-curl --update --reinstall --confirm --depnotify, BigSur does not appear in the list of available versions. on the other hand, if I try to update from 10.13.3 to 10.14.6, which if it appears in the list, several errors appear and no image is downloaded.
Attached log

To Reproduce
erase-install.sh --os = 11 --force-curl --update --reinstall --confirm --depnotify
ships with a JAMF policy, posted on SelfService

Expected behavior
A clear and concise description of what you expected to happen.

Code/log output

   [erase-install] v25.0 script execution started: jueves, 25 de noviembre de 2021, 09:35:26 CET
   [erase-install] Caffeinating this script (pid=1602)
   [check_free_space] OK - 231 GB free/purgeable disk space detected
   [erase-install] Looking for existing installer app or pkg
   [find_existing_installer] No valid installer found.
   [erase-install] Opening DEPNotify download message (language=en)
   [get_installinstallmacos] Downloading installinstallmacos.py...
/Library/Management/erase-install/installinstallmacos.py: OK
   [get_installinstallmacos] downloaded new installinstallmacos.py successfully.
   [get_installinstallmacos] installinstallmacos.py is in /Library/Management/erase-install
   [get_relocatable_python] Relocatable Python is installed in /Library/Management/erase-install
   [run_installinstallmacos] Checking that selected OS 10.14.6 is available

   [run_installinstallmacos] This command is now being run:

   installinstallmacos.py --workdir /Library/Management/erase-install --ignore-cache --raw --os 10.14.6 --validate

installinstallmacos.py - get macOS installers from the Apple software catalog

This Mac:
Model Identifier : MacBookPro14,2
Board ID         : Mac-CA
OS Version       : 10.13.6
Build ID         : 17G66

 #  ProductID       Version    Build    Post Date   Title                          
 1  041-91741       10.13.6    17G2208  2019-10-13  macOS High Sierra              
 2  061-26578       10.14.5    18F2059  2019-10-14  macOS Mojave                   
 3  061-26589       10.14.6    18G103   2019-10-14  macOS Mojave                   
 4  041-91758       10.13.6    17G66    2019-10-19  macOS High Sierra              
Traceback (most recent call last):
  File "/Library/Management/erase-install/installinstallmacos.py", line 1328, in <module>
    main()
  File "/Library/Management/erase-install/installinstallmacos.py", line 971, in main
    get_latest_version(build_info[0], product_info[product_id]["version"])
  File "/Library/Management/erase-install/installinstallmacos.py", line 681, in get_latest_version
    if LooseVersion(current_item) > LooseVersion(latest_item):
  File "/Library/Management/erase-install/Python.framework/Versions/3.9/lib/python3.9/distutils/version.py", line 64, in __gt__
    c = self._cmp(other)
  File "/Library/Management/erase-install/Python.framework/Versions/3.9/lib/python3.9/distutils/version.py", line 341, in _cmp
    if self.version < other.version:
TypeError: '<' not supported between instances of 'int' and 'str'
   [run_installinstallmacos] Error obtaining valid installer. Cannot continue.

   [erase-install] 'caffeinate' ended
/Library/Management/erase-install/erase-install.sh: line 962:  1614 Terminated: 15          /usr/bin/caffeinate -dimsu -w $pid
/Library/Management/erase-install/erase-install.sh: line 735:  1639 Killed: 9               dep_notify_progress installinstallmacos > /dev/null 2>&1

Log to update 11

   [erase-install] Caffeinating this script (pid=1890)
   [check_free_space] OK - 231 GB free/purgeable disk space detected
   [erase-install] Looking for existing installer app or pkg
   [find_existing_installer] No valid installer found.
   [erase-install] Opening DEPNotify download message (language=en)
   [get_installinstallmacos] Downloading installinstallmacos.py...
/Library/Management/erase-install/installinstallmacos.py: OK
   [get_installinstallmacos] downloaded new installinstallmacos.py successfully.
   [get_installinstallmacos] installinstallmacos.py is in /Library/Management/erase-install
   [get_relocatable_python] Relocatable Python is installed in /Library/Management/erase-install
   [run_installinstallmacos] Checking that selected OS 11 is available

   [run_installinstallmacos] This command is now being run:

   installinstallmacos.py --workdir /Library/Management/erase-install --ignore-cache --raw --os 11 --validate

installinstallmacos.py - get macOS installers from the Apple software catalog

This Mac:
Model Identifier : MacBookPro14,2
Board ID         : Mac-CA
OS Version       : 10.13.6
Build ID         : 17G66

 #  ProductID       Version    Build    Post Date   Title                          
 1  041-91741       10.13.6    17G2208  2019-10-13  macOS High Sierra              
 2  061-26578       10.14.5    18F2059  2019-10-14  macOS Mojave                   
 3  061-26589       10.14.6    18G103   2019-10-14  macOS Mojave                   
 4  041-91758       10.13.6    17G66    2019-10-19  macOS High Sierra              
Traceback (most recent call last):
  File "/Library/Management/erase-install/installinstallmacos.py", line 1328, in <module>
    main()
  File "/Library/Management/erase-install/installinstallmacos.py", line 971, in main
    get_latest_version(build_info[0], product_info[product_id]["version"])
  File "/Library/Management/erase-install/installinstallmacos.py", line 681, in get_latest_version
    if LooseVersion(current_item) > LooseVersion(latest_item):
  File "/Library/Management/erase-install/Python.framework/Versions/3.9/lib/python3.9/distutils/version.py", line 64, in __gt__
    c = self._cmp(other)
  File "/Library/Management/erase-install/Python.framework/Versions/3.9/lib/python3.9/distutils/version.py", line 341, in _cmp
    if self.version < other.version:
TypeError: '<' not supported between instances of 'int' and 'str'
   [run_installinstallmacos] Error obtaining valid installer. Cannot continue.

   [erase-install] 'caffeinate' ended
/Library/Management/erase-install/erase-install.sh: line 962:  1902 Terminated: 15          /usr/bin/caffeinate -dimsu -w $pid
/Library/Management/erase-install/erase-install.sh: line 735:  1927 Killed: 9               dep_notify_progress installinstallmacos > /dev/null 2>&1```

**Environment (please complete the following information):**
 - OS version 10.13.6
@bertocea85 bertocea85 added the bug Something isn't working label Nov 25, 2021
@grahampugh
Copy link
Owner

grahampugh commented Nov 25, 2021

@bertocea85
Please make sure you use the correct arguments. You said that you used this:

erase-install.sh --os = 11 --force-curl --update --reinstall --confirm --depnotify

You can't have spaces in --os = 11. It has to be --os=11 or --os 11.

However, the output says that you ran --os 10.14.6. If you did, then make sure it is --version 10.14.6, not --os.

(I don't think this is causing the error, but please try anyway).

To test this I would need to get a hold of a 10.13.6 client that can be upgraded. That might take a while.

@bertocea85
Copy link
Author

sorry!!
the correct line
/Library/Management/erase-install/erase-install.sh --os=11 --force-curl --update --reinstall --confirm --depnotify
with this line
/Library/Management/erase-install/erase-install.sh --force-curl --reinstall --update --os=10.14.6 --version=10.14.6 --depnotify
same error

@grahampugh
Copy link
Owner

Again, please choose either os or version, not both. --os=10.14 or --version=10.14.6 should actually do the same thing, since 10.14.6 is the latest available version of macOS 10.14.

@bertocea85
Copy link
Author

Hello!

I have tried both with only the OS and with the version and the same error

@cfatechsupport
Copy link

cfatechsupport commented Dec 2, 2021

Hey Graham, I just stumbled across this as well. Attempting to go from 10.13.6 to 10.15.7 using the following with v25:
/Library/Management/erase-install/erase-install.sh --reinstall --check-power --update --current-user --depnotify --version=10.15.7

Logs indicate the built-in installinstallmacos.py is only returning the following available options:
1 041-91741 10.13.6 17G2208 2019-10-13 macOS High Sierra
2 061-26578 10.14.5 18F2059 2019-10-14 macOS Mojave
3 061-26589 10.14.6 18G103 2019-10-14 macOS Mojave
4 041-91758 10.13.6 17G66 2019-10-19 macOS High Sierra

However, if I run installinstallmacos.py manually (pulled from v25 pkg) I see all available macOS versions up to and including Monterey.

Also tried this which resulted in the same issue:
/Library/Management/erase-install/erase-install.sh --reinstall --check-power --update --current-user --depnotify --os=10.15


Here's the full tail end of the log:

[run_installinstallmacos] Checking that selected OS 10.15 is available
[run_installinstallmacos] This command is now being run:
installinstallmacos.py --workdir /Library/Management/erase-install --ignore-cache --raw --os 10.15 --validate
installinstallmacos.py - get macOS installers from the Apple software catalog

This Mac:
Model Identifier : MacBookPro14,1

Board ID : Mac-B4831CEBD52A0C4C
OS Version : 10.13.6
Build ID : 17G66

ProductID Version Build Post Date Title
1 041-91741 10.13.6 17G2208 2019-10-13 macOS High Sierra
2 061-26578 10.14.5 18F2059 2019-10-14 macOS Mojave
3 061-26589 10.14.6 18G103 2019-10-14 macOS Mojave
4 041-91758 10.13.6 17G66 2019-10-19 macOS High Sierra
Traceback (most recent call last):
File "/Library/Management/erase-install/installinstallmacos.py", line 1328, in
main()
File "/Library/Management/erase-install/installinstallmacos.py", line 971, in main
get_latest_version(build_info[0], product_info[product_id]["version"])
File "/Library/Management/erase-install/installinstallmacos.py", line 681, in get_latest_version
if LooseVersion(current_item) > LooseVersion(latest_item):
File "/Library/Management/erase-install/Python.framework/Versions/3.9/lib/python3.9/distutils/version.py", line 64, in gt
c = self._cmp(other)
File "/Library/Management/erase-install/Python.framework/Versions/3.9/lib/python3.9/distutils/version.py", line 341, in _cmp
if self.version < other.version:
TypeError: '<' not supported between instances of 'int' and 'str'
[run_installinstallmacos] Error obtaining valid installer. Cannot continue.

[erase-install] 'caffeinate' ended
/Library/Management/erase-install/erase-install.sh: line 962: 4210 Terminated: 15 /usr/bin/caffeinate -dimsu -w $pid
/Library/Management/erase-install/erase-install.sh: line 735: 4238 Killed: 9 dep_notify_progress installinstallmacos > /dev/null 2>&1

@cfatechsupport
Copy link

cfatechsupport commented Dec 2, 2021

Graham, I think I found the bug.

I believe installinstallmacos.py is stumbling over Apple's default sucatalog for Darwin 17 (High Sierra)... Take a look at the manual run below. The version number for the 2019-10-22 macOS High Sierra is missing, and according to the erase-install log, basically where it gives up looking for a valid installer (if sorting by Post Date).

Board ID : Mac-B4831CEBD52A0C4C
OS Version : 10.13.6
Build ID : 17G14033

ProductID       Version    Build    Post Date   Title                          
1  001-04366       10.15.4    19E2269  2020-05-04  macOS Catalina                 
2  001-68446       10.15.7    19H15    2020-11-11  macOS Catalina                 
3  041-91741       10.13.6    17G2208  2019-10-13  macOS High Sierra              
4  002-23774       12.0.1     21A559   2021-12-01  macOS Monterey                 
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  001-57224       10.15.7    19H4     2020-10-27  macOS Catalina                 
8  041-90860                  17E199   2019-10-22  macOS High Sierra              
9  061-26589       10.14.6    18G103   2019-10-14  macOS Mojave                   
10  001-51042       10.15.7    19H2     2020-09-24  macOS Catalina                 
11  001-36735       10.15.6    19G2006  2020-08-06  macOS Catalina                 
12  041-88800       10.14.4    18E2034  2019-10-23  macOS Mojave                   
13  041-90855       10.13.5    17F66a   2019-10-23  Install macOS High Sierra Beta 
14  061-26578       10.14.5    18F2059  2019-10-14  macOS Mojave                   
15  071-78704       11.5.2     20G95    2021-08-18  macOS Big Sur                  
16  001-36801       10.15.6    19G2021  2020-08-12  macOS Catalina  

If I force the latest catalog like so, I have no trouble. Thanks so much for your amazing work by the way!!!!! -JonW

/Library/Management/erase-install/erase-install.sh --reinstall --check-power --update --current-user --depnotify --os=10.15 --catalogurl=https://swscan.apple.com/content/catalogs/others/index-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog

@grahampugh
Copy link
Owner

Nice, I was wondering if that might be the case, but still don't have access to a 10.13.6 Mac that I could upgrade.

I'm on vacation this week but starting to think about testing the latest catalog regardless of which OS is running. That breaks the convention in installinstallmacos.py, but might solve a few problems (or cause some - hence the need to test!).

@bertocea85
Copy link
Author

hi @grahampugh.
I hope your more than deserved vacations have gone very well!
were you able to test?

@grahampugh
Copy link
Owner

@bertocea85 yes, I created a pre-release version that uses the latest catalog for every OS. But, it is also causing problems for people running Big Sur, because Apple are not consistent about which catalog contains which versions. Under that regime, it's impossible to guarantee that either method is correct.

I'm considering just making it easier to select which catalog you want to override to. So, instead of having to add --catalogurl=https://swscan.apple.com/content/catalogs/others/index-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog, you could just add something like --swcatalog=12, or --swcatalog=10.15. I'm not sure there's a better way to be honest.

@grahampugh
Copy link
Owner

I've fixed this bug in v26.0. It was occurring because there is missing information in the 10.13 catalog (an empty version string in one of the listings - see #5 below)

 #  ProductID       Version    Build    Post Date   Title                          Notes/Warnings
 1  041-91741       10.13.6    17G2208  2019-10-13  macOS High Sierra              Unsupported macOS version
 2  061-26578       10.14.5    18F2059  2019-10-14  macOS Mojave                   Unsupported macOS version
 3  061-26589       10.14.6    18G103   2019-10-14  macOS Mojave                   Unsupported macOS version
 4  041-91758       10.13.6    17G66    2019-10-19  macOS High Sierra              Unsupported macOS version
 5  041-90860                  17E199   2019-10-22  macOS High Sierra              Unsupported macOS version
 6  041-88800       10.14.4    18E2034  2019-10-23  macOS Mojave                   Unsupported macOS version
 7  041-90855       10.13.5    17F66a   2019-10-23  Install macOS High Sierra Beta Unsupported macOS version
 8  061-86291       10.15.3    19D2064  2020-03-23  macOS Catalina                 Unsupported macOS version
 9  001-04366       10.15.4    19E2269  2020-05-04  macOS Catalina                 Unsupported macOS version
10  001-36735       10.15.6    19G2006  2020-08-06  macOS Catalina                 Unsupported macOS version
11  001-36801       10.15.6    19G2021  2020-08-12  macOS Catalina                 Unsupported macOS version
12  001-51042       10.15.7    19H2     2020-09-24  macOS Catalina                 Unsupported macOS version
13  001-57224       10.15.7    19H4     2020-10-27  macOS Catalina                 Unsupported macOS version
14  001-68446       10.15.7    19H15    2020-11-11  macOS Catalina                 Unsupported macOS version
15  071-78704       11.5.2     20G95    2021-08-18  macOS Big Sur                  Unsupported macOS version
16  002-57041       12.2       21D49    2022-01-26  macOS Monterey                 Unsupported macOS version
17  002-66265       12.2.1     21D62    2022-02-10  macOS Monterey                 Unsupported macOS version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants