Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Insidious

macrumors regular
Original poster
Dec 6, 2017
133
127
I had iTunes 12.9.5 working fine in Catalina via Retroactive 2.0 on my Mac Mini. I have a Late 2012, so Catalina was the highest I could go. However, this week I installed the latest version of Big Sur using OpenCore Legacy Patcher and it seemed like everything was working great. Although after doing so, iTunes stopped opening when I clicked on the icon. To try to fix it, I reinstalled it again with Retroactive, but it seemed like the install wasn't completing correctly, like it was finishing too fast without getting to steps 3 and 4. Sure enough, iTunes 12.9.5 still wouldn't load.

I was only able to get iTunes Classic (v11) working, but I need 12.9.5. I then upgraded to Monterey via OCLP and I tried again with Retroactive and still the same issue. I saw recent comments about it working for Ventura, so I upgraded once more via OCLP and...... still not working with Retroactive. Is Retroactive broken? Has anyone had success getting 12.9.5 to run recently? My OS installs have all been upgrades. I'm thinking about doing a clean install if that may make a difference.
 

Grumpus

macrumors regular
Jan 17, 2021
249
162
I had iTunes 12.9.5 working fine in Catalina via Retroactive 2.0 on my Mac Mini. I have a Late 2012, so Catalina was the highest I could go. However, this week I installed the latest version of Big Sur using OpenCore Legacy Patcher and it seemed like everything was working great. Although after doing so, iTunes stopped opening when I clicked on the icon. To try to fix it, I reinstalled it again with Retroactive, but it seemed like the install wasn't completing correctly, like it was finishing too fast without getting to steps 3 and 4. Sure enough, iTunes 12.9.5 still wouldn't load.
iTunes 12.9.5 will not run under OCLP because framework libraries can't be loaded, with the error synopsis saying "security policy does not allow @ path expansion." The problem obviously stems from changes made by OCLP, but after reading the response to this bug report I'm not optimistic that it will ever be fixed.
 
  • Like
Reactions: Insidious

Insidious

macrumors regular
Original poster
Dec 6, 2017
133
127
iTunes 12.9.5 will not run under OCLP because framework libraries can't be loaded, with the error synopsis saying "security policy does not allow @ path expansion." The problem obviously stems from changes made by OCLP, but after reading the response to this bug report I'm not optimistic that it will ever be fixed.
I hadn't considered that possibility. That makes sense. Thank you! Then my best solution is an alternate partition of Catalina without OCLP. ;)
 

bogdanw

macrumors 603
Mar 10, 2009
5,726
2,755
The iTunes app created by Retroactive is Apple’s iTunes packaged inside an iTunes app made by Retroactive’s developer with additional libraries. You can see that clearly in the path from the crash report: /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes

The iTunes app created with the method mentioned in the other thread is just iTunes from Apple, with 3 values changed in its Info.plist (12.9.5 changed to 13.9.5). It works even in Ventura 13.2.1 with SIP enabled. What exactly didn’t work for you? What error message have you received?
 

Grumpus

macrumors regular
Jan 17, 2021
249
162
@bogdanw, a link to a crash report for Ventura appears above. Crashes on Montery look the same as for Ventura. You can see a crash report from Big Sur here. Your observation that Retroactive is producing an "app within an app" is correct, but as far as I can tell no libraries have been changed. The Retroactive-produced app is ad-hoc signed and consists mainly of a /bin/bash script which executes the original iTunes binary. This works on non-OCLP machines, but unfortunately it fails under OCLP.

The DYLD_*_PATH exports in Retroactive's bash script are red-herrings. They're stripped out of the environment when SIP is turned on, so they accomplish nothing. Even if they worked, I believe they point to the original, unchanged iTunes framework libraries.

Your approach, i.e. modifying only the plists, will fail in exactly the same way under OCLP. The iTunes binary has been linked using an "@executable_path" feature which should expand to the absolute path of the directory that iTunes is executed from. This path would be prepended to the framework library name(s) and used to load the libraries at run time. Unfortunately, something that OCLP changes turns this into a security violation, hence the crashes.

iTunes 12.8.3, with modified plists, does run under OCLP, but there are a few problems, the main one that I saw being that some graphical elements in the Preferences (relating to the import settings) aren't displayed. I didn't actually try ripping a CD, but that probably works, so if the OP could be content with the default import settings that might be a solution. The older versions of iTunes installed by Retroactive also work under OCLP.
 

Grumpus

macrumors regular
Jan 17, 2021
249
162
I had no luck when trying to disable SIP under OCLP using those settings. Even with everything checked in the Configure SIP panel, csrutil status will still report a 'non-standard configuration.' Sorry, I can't give you the exact message from csrutil status as I finally just gave up on OCLP. Doing a csrutil disable in recovery mode doesn't work either, since OCLP overrides that.

EDIT: I should also mention, iTunes 12.9.5 works fine on a supported machine with SIP turned on, so the problem is definitely something that OCLP is doing.
 
Last edited:

rotoyouoio

macrumors newbie
Jun 21, 2012
9
3
I had no luck when trying to disable SIP under OCLP using those settings. Even with everything checked in the Configure SIP panel, csrutil status will still report a 'non-standard configuration.' Sorry, I can't give you the exact message from csrutil status as I finally just gave up on OCLP. Doing a csrutil disable in recovery mode doesn't work either, since OCLP overrides that.

EDIT: I should also mention, iTunes 12.9.5 works fine on a supported machine with SIP turned on, so the problem is definitely something that OCLP is doing.
install_name_tool -change @executable_path/../Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes
install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes
install_name_tool -change @executable_path/../Frameworks/libgnsdk_musicid.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_musicid.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes
install_name_tool -change @executable_path/../Frameworks/libgnsdk_submit.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_submit.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes
install_name_tool -change @executable_path/../Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_dsp.3.06.1.dylib
install_name_tool -change @executable_path/../Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_musicid.3.06.1.dylib
install_name_tool -change @executable_path/../Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_submit.3.06.1.dylib
install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_dsp.3.06.1.dylib
install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_musicid.3.06.1.dylib
install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/Frameworks/libgnsdk_submit.3.06.1.dylib
sudo codesign --remove-signature /Applications/iTunes.app
 

rotoyouoio

macrumors newbie
Jun 21, 2012
9
3
Last edited:

Grumpus

macrumors regular
Jan 17, 2021
249
162
Thank you @rotoyouoio, that looks promising! I presume that the plist changes given by @bogdanw will still be required. I'll have to spin up another OCLP install to test.
I modified a script which produces a working iTunes app to include the invocations of install_name_tool and codesign signature removal. Unfortunately, the resulting app doesn't work under a non-OCLP Monterey, with or without SIP. I've no reason to think it will work any better under OCLP and I don't have a spare disk to try that on right now. Oh well. The result is:
Screen Shot 2023-03-17 at 11.13.49 AM.png
 

Airsculpture

macrumors 6502
Oct 14, 2020
344
85
Happily using iTunes on Ventura, just for information for people. No issues with install using Retroactive 2.0
 

Grumpus

macrumors regular
Jan 17, 2021
249
162
Happily using iTunes on Ventura, just for information for people. No issues with install using Retroactive 2.0
Which version of iTunes? It's 12.9.5 that had the problem, the other versions that Retroactive offers, 12.6.5, 11.4 and 10.7, all seem to work ok. If you're saying that 12.9.5 is working, please tell us what version of OCLP you're using and whether any root patches were installed, and on what hardware. TIA.
 

Airsculpture

macrumors 6502
Oct 14, 2020
344
85
12.9.5 the latest possible

All I did was download Retro 2.0 and install on my 2017 iMac

Previously installed without issue on Monterey.
 

tljohnsn

macrumors newbie
Jun 29, 2023
1
1
I got iTunes 12.9.5.5 to work on Ventura with retroactive 2.0 and oclp 0.8.5 on a macbook pro late 2013 with the following:

sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_musicid.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_musicid.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_submit.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_submit.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_dsp.3.06.1.dylib sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_musicid.3.06.1.dylib sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_submit.3.06.1.dylib sudo codesign --remove-signature /Applications/iTunes.app/Contents/MacOS/iTunes.app

Thank you @rotoyouoio for everything you posted so far that help me get to that point.
 
  • Like
Reactions: rmadsen3

RealKGB

macrumors member
Dec 26, 2021
34
6
I got iTunes 12.9.5.5 to work on Ventura with retroactive 2.0 and oclp 0.8.5 on a macbook pro late 2013 with the following:

sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_dsp.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_musicid.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_musicid.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_submit.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_submit.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_dsp.3.06.1.dylib sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_musicid.3.06.1.dylib sudo install_name_tool -change @executable_path/../Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_manager.3.06.1.dylib /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/Frameworks/libgnsdk_submit.3.06.1.dylib sudo codesign --remove-signature /Applications/iTunes.app/Contents/MacOS/iTunes.app

Thank you @rotoyouoio for everything you posted so far that help me get to that point.
Tried on Sonoma (MBP Mid-2012 15" with OCLP dev beta), but still crashes with 13021. Spawning via cli reports this:

Code:
objc[8040]: Class AMSBag_DeviceOffers is implemented in both /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/CommerceKit (0x7ff95eb34380) and /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes (0x10cef1018). One of the two will be used. Which one is undefined.
realkgb@MacBook-Max MacOS % ./iTunes
objc[8048]: Class AMSBag_DeviceOffers is implemented in both /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/CommerceKit (0x7ff95eb34380) and /Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes (0x106e67018). One of the two will be used. Which one is undefined.
2023-07-26 13:49:37.288 iTunes[8048:98316] .sdef warning for attribute 'rawData' of class 'artwork' in suite 'iTunes Suite': 'raw data' is not a valid type name.
2023-07-26 13:49:37.594 failed to create BKAgent: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.BKAgentService" UserInfo={NSDebugDescription=connection to service named com.apple.BKAgentService}

Not sure if this is helpful or not
 

RealKGB

macrumors member
Dec 26, 2021
34
6
Update: 12.9.5 is working again with OCLP 0.6.9! On Sonoma, too!

iTunes Store doesn't work though - error -45016.
 

jeremywork

macrumors member
Dec 12, 2008
65
60
I've been fighting this problem recently.

MacBookPro9,1 (2012 15" Unibody)
12.6.8 OCLP with a second partition running 10.13.6

Upon fresh install of Monterey, iTunes 12.9.5 can be installed with Retroactive 2.0 and launches just fine.
Then after reboot (or reboot to High Sierra partition, not sure which causes the issue) launching iTunes presents the crash including:
Code:
Termination Reason:    Namespace DYLD, Code 1 Library missing
Library not loaded: '@executable_path/../Frameworks/libgnsdk_dsp.3.06.1.dylib'
Referenced from: '/Applications/iTunes.app/Contents/MacOS/iTunes.app/Contents/MacOS/iTunes'
Reason: tried: '' (no such file), (security policy does not allow @ path expansion)
(terminated at launch; ignore backtrace)

I tried the alternate method sourcing iTunes from the Mojave installer here:
But the crash remained identical.

I then tried the above recommendation:
But I also began to instead get iTunes error code 13021.

Reinstalling macOS 12.6.8 did resolve the problem, but only temporarily.

Finally, I tried copying the contents of .../iTunes.app/Contents/Frameworks to /usr/lib/
Code:
libgnsdk_dsp.3.06.1.dylib
libgnsdk_manager.3.06.1.dylib
libgnsdk_musicid.3.06.1.dylib
libgnsdk_submit.3.06.1.dylib

Since Monterey's root directory is a sealed snapshot, this must be done using the solution from cpit here:

First, this requires that FileVault to be disabled (in System Preferences → Security & Privacy → FileVault). This means the data on your hard drive will no longer be encrypted, i.e. anyone with physical access to your system would be able to gain full access to your data.


In addition to disabling System Integrity Protection (SIP), you'll also need to disable the Signed System Volume (SSV), which is a mechanism that checks the system volume at runtime and rejects any data that doesn't have a cryptographically valid Apple signature. This means you won't be able to turn SSV (or SIP) back on without losing the changes you've made to the root drive.


To disable SIP and SSV, reboot in Recovery Mode (holding ⌘+r). In Recovery Mode, open Terminal and execute:

csrutil disable # disable System Integrity Protection (SIP)
csrutil authenticated-root disable # disable Signed System Volume (SSV)
reboot


Once rebooted back into standard mode, create a new directory in a location where your user has write access, e.g. $HOME. I believe it needs to have fully open permissions. So, if the newly created folder is called rootmount:

mkdir -m777 ~/rootmount


You then need to mount your root device to this directory. The root device will be listed in the output of mount with something like /dev/disk1s5s1 on / (apfs, sealed, local, read-only, journaled). Mount the listed device without the final s1—for example:

cd ~
sudo mount -o nobrowse -t apfs /dev/disk1s5 rootmount
cd rootmount
## whatever changes you want to make


Once you've done cd rootmount you're in the writable copy of your root drive. Make whatever changes you want to make there. After that, you'll have to tell the system to use the new version as the root device. To do so:

sudo bless -folder /Users/<your-username>/rootmount/System/Library/CoreServices -bootefi -create-snapshot


When you reboot, the changes you've made should persist on the root drive.


Important reiterated warning: if you re-enable SIP and/or SSV, your root drive will revert to its Apple-approved state, reverting all changes you've made. In addition, updating the OS will also cause the changes to revert.

After reboot my iTunes 12.9.5 now launches again in Monterey using OCLP.
 
Last edited:

jeremywork

macrumors member
Dec 12, 2008
65
60
I'm not sure if this is related to the problem, but I have questions about the way OCLP overrides the SIP state on startup.

When I added OCLP/Monterey I had been running High Sierra with SIP disabled via Recovery with csrutil disable.

After installing and booting Monterey with all the SIP flags checked in OCLP, the output of csrutil status was as follows:
Code:
System Integrity Protection status: unknown (Custom Configuration).

Configuration:
    Apple Internal: disabled
    Kext Signing: disabled
    Filesystem Protections: disabled
    Debugging Restrictions: disabled
    DTrace Restrictions: disabled
    NVRAM Protections: disabled
    BaseSystem Verification: disabled

This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.

If I reset the PRAM, the system then returned:
Code:
System Integrity Protection status: enabled (Custom Configuration).

Configuration:
    Apple Internal: disabled
    Kext Signing: disabled
    Filesystem Protections: disabled
    Debugging Restrictions: disabled
    DTrace Restrictions: disabled
    NVRAM Protections: disabled
    BaseSystem Verification: disabled

This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.

Only after returning to High Sierra's Recovery and running csrutil disable again would the main SIP status return to unknown, despite the individual flags remaining consistent. Checking in the Software section of System Report also returned SIP: enabled when PRAM had been reset, and : disabled after re-entering csrutil disable. Doing this alone did not return iTunes to a working state, however.

Furthermore, checking all the flags in OCLP correctly reports that the configuration to be written is 0xfff, however writing this configuration and rebooting always reports that the booted configuration is 0xfef, which corresponds to the 'Allow Apple Internal' flag not being checked, contrary to the output of csrutil status. Perhaps this is related to the iTunes issue? 0xfef appears whether or not csrutil disabled has been entered since the last PRAM reset.

Screen Shot 2023-08-10 at 7.36.49 PM.png Screen Shot 2023-08-10 at 7.46.24 PM.png
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.