ninxsoft / Mist

A Mac utility that automatically downloads macOS Firmwares / Installers.
MIT License
2.79k stars 112 forks source link

macos 12.6 monterey download invalid shasum error #10

Closed ssbarnea closed 2 years ago

ssbarnea commented 2 years ago

While downloading MacOS 12.6 Monterey (the 14GB firmware version, not the 12GB download), I got:

An error has occurred!
Invalid Shasum: '3bae26d997c8ad246bb6ca4bd85bb8498f0680e9', should be: ''

Date/Time:        2022-09-21 07:39:19.617 +0100
End time:         2022-09-21 07:47:22.054 +0100
OS Version:       macOS 12.5.1 (Build 21G83)
Architecture:     arm64e
Report Version:   35.1
Incident Identifier: F7902552-B5F0-4253-A1DB-39348AEDDD50

Data Source:      Microstackshots
Shared Cache:     F8AB76FB-504C-32DD-A5DB-15A1F2F028F8 slid base address 0x1b8428000, slide 0x38428000

Command:          Mist
Path:             /Applications/Mist.app/Contents/MacOS/Mist
Identifier:       com.ninxsoft.mist
Version:          0.2 (0.2)
Team ID:          7K3HVCLV7Z
Architecture:     arm64
Parent:           UNKNOWN [1]
PID:              30585

Event:            disk writes
Action taken:     none
Writes:           8589.95 MB of file backed memory dirtied over 482 seconds (17.81 MB per second average), exceeding limit of 99.42 KB per second over 86400 seconds
Writes limit:     8589.93 MB
Limit duration:   86400s
Writes caused:    8589.95 MB
Writes duration:  482s
Duration:         482.44s
Duration Sampled: 481.94s
Steps:            814 ( (10.49 MB/step))

Hardware model:   MacBookPro18,2
Active cpus:      10
HW page size:     16384
VM page size:     16384

Advisory levels:  Battery -> 2, User -> 2, ThermalPressure -> 0, Combined -> 2
Free disk space:  1161.52 GB/1858.19 GB, low space threshold 3072 MB

Heaviest stack for the target process:
  814  start_wqthread + 8 (libsystem_pthread.dylib + 8320) [0x1b874f080]
  814  _pthread_wqthread + 228 (libsystem_pthread.dylib + 13092) [0x1b8750324]
  814  _dispatch_worker_thread2 + 164 (libdispatch.dylib + 90372) [0x1b85a2104]
  814  _dispatch_root_queue_drain + 396 (libdispatch.dylib + 88296) [0x1b85a18e8]
  814  _dispatch_queue_override_invoke + 784 (libdispatch.dylib + 29384) [0x1b85932c8]
  814  _dispatch_client_callout + 20 (libdispatch.dylib + 16820) [0x1b85901b4]
  814  _dispatch_disk_perform + 512 (libdispatch.dylib + 211920) [0x1b85bfbd0]
  814  __write_nocancel + 8 (libsystem_kernel.dylib + 23184) [0x1b871aa90]

Powerstats for:   Mist [30585]
UUID:             8DEF3962-1987-339D-973E-65E3CEC548A5
Path:             /Applications/Mist.app/Contents/MacOS/Mist
Identifier:       com.ninxsoft.mist
Version:          0.2 (0.2)
Team ID:          7K3HVCLV7Z
Architecture:     arm64
Parent:           UNKNOWN [1]
UID:              501
Footprint:        83.20 MB -> 87.05 MB (+3936 KB) (max 87.72 MB )
Start time:       2022-09-21 07:39:19.666 +0100
End time:         2022-09-21 07:47:21.603 +0100
Num samples:      814 (100%)
Primary state:    814 samples Non-Frontmost App, Suppressed, Kernel mode, Effective Thread QoS User Initiated, Requested Thread QoS User Initiated, Override Thread QoS Unspecified
User Activity:    0 samples Idle, 814 samples Active
Power Source:     814 samples on Battery, 0 samples on AC
  814  start_wqthread + 8 (libsystem_pthread.dylib + 8320) [0x1b874f080]
    814  _pthread_wqthread + 228 (libsystem_pthread.dylib + 13092) [0x1b8750324]
      814  _dispatch_worker_thread2 + 164 (libdispatch.dylib + 90372) [0x1b85a2104]
        814  _dispatch_root_queue_drain + 396 (libdispatch.dylib + 88296) [0x1b85a18e8]
          814  _dispatch_queue_override_invoke + 784 (libdispatch.dylib + 29384) [0x1b85932c8]
            814  _dispatch_client_callout + 20 (libdispatch.dylib + 16820) [0x1b85901b4]
              814  _dispatch_disk_perform + 512 (libdispatch.dylib + 211920) [0x1b85bfbd0]
                814  __write_nocancel + 8 (libsystem_kernel.dylib + 23184) [0x1b871aa90]

  Binary Images:
           0x100e80000 -                ???  com.ninxsoft.mist 0.2 (0.2)          <8DEF3962-1987-339D-973E-65E3CEC548A5>  /Applications/Mist.app/Contents/MacOS/Mist
           0x1b858c000 -        0x1b85d2fff  libdispatch.dylib (1325.120.2)       <035D23D9-4CB5-3759-9059-1F7878F89FEE>  /usr/lib/system/libdispatch.dylib
           0x1b8715000 -        0x1b874cfff  libsystem_kernel.dylib (8020.141.5)  <D5CDDE7E-7037-3A70-9CE4-9E3847DA6CE0>  /usr/lib/system/libsystem_kernel.dylib
           0x1b874d000 -        0x1b8759fff  libsystem_pthread.dylib (486.100.11) <F32FF902-BA43-30B0-AD43-A2A8A9FF69FE>  /usr/lib/system/libsystem_pthread.dylib
ninxsoft commented 2 years ago

@ssbarnea great pickup!

The shasums are currently being sourced from the IPSW Downloads API, and it appears at some point the server was returning a blank shasum, hence your error.

The shasum looks like it is reporting correctly now, but having said that, you shouldn't be penalised for a 3rd party resource being invalid.

I am proposing we add some logic to skip the shasum verification if no shasum is found online.

ninxsoft commented 2 years ago

This logic has been added here: 24d0591822534714204df12f3e691e8ce9fb5943

ssbarnea commented 2 years ago

@ninxsoft Thanks a lot for the quick reply. Since 12.6 was released I struggled to get it downloaded and installed, either the download fails, gets stuck or the effective pre-installation step fails with a generic error. I even opened a support ticket with my company and with Apple as we have some MDM software. Others were able to perform the update but somehow I reached a deep bug. I was hoping that running the installer separately might avoid the issue.

BTW, I am quite curious about the differences between the installer with firmware and the one without firmware (14.08 vs 12.04 GB). Their titles are identical, but I seen that when I use the tab to switch between the Installers and Firmwares it does show different size.

Are there really two versions or there is a bug in rendering their size? If there are two, maybe we can make a change to make it easier to distinguish between them, not having only the size as a differentiator.

BTW, something is really fishy on how Apple own software-update works. Quite often it does not report the update as being available and when it does and I start downloading it is very slow... as in 10-20x slower than Mist was. My expectation was that they use the same source, but maybe that is not true.