Troubleshooting AAX Plugin Load Failure in Production Pro Tools Post CMake Transition

Previously, I had a working deployment process for AAX plugins, using the anti-piracy tools and SDKs required to create such things. I was using the Projucer to create the Xcode and Visual Studio projects to allow me to archive release binaries, which I’d subsequently wrap, codesign, package, notarize, and staple prior to release.

However, I recently had to convert to CMake in order to install modules I wanted to use. This is working great, and the API is really productive and useful. And while the resulting binaries works on my machine, including when I codesign, notarize, and staple production VSTs and AUs (which passes Apple’s auvaltool), when I engage the same distribution/deployment process as before on the AAX, and when that’s run on a production Pro Tools, this error message happens:

image

And the logs reveal these details:

Progress: Loading Plug-Ins: Blueprint
CFicPlugInCache::OpenCacheFile() (0x7fed0e91cf30) for /Users/username/Library/Preferences/Avid/Pro Tools/InstalledAAXPlugIns
CFicPlugInCache::FindMatch() (0x7fed0e91cf30) - file: Blueprint.aaxplugin, mod_utc: 133506130780000000
	returning NULL
CFicWidgetManager::IsWidgetCached() - trying legacy modification date for 
CFicPlugInCache::FindMatch() (0x7fed0e91cf30) - file: Blueprint.aaxplugin, mod_utc: 133506130790000000
	returning NULL
Sys_DLLMacOS::LoadBundle - error: code=3588, description='', domain=NSCocoaErrorDomain, reason='', suggestion='Try reinstalling the bundle.'
AAXH_CEffectFactory::ParseDLL - exception thrown( (-23) while loading "Blueprint.aaxplugin")
CFicAAXWidget::CreateComponentInstance - converting -14021 to kPlugInUnauthorized
Plug-In Binary "Blueprint.aaxplugin" failed to load with err = -7058.
Plug-In Binary "Blueprint.aaxplugin" 0.0.1 : Failed to load.

My source code, including the CMake, can be found here:

My questions if anyone has any ideas:

  1. What is causing this error and how can it be fixed?
  2. Is there any way to run AAXs in a production environment, or run them through production validator, prior to distribution?

I’ve been doing some experimenting and searching on this, it seems like this is a very general error that happens as a result of failure to validate. For posterity, I’m linking some related threads.

https://avidtech.my.salesforce-sites.com/pkb/articles/en_US/Error_Message/AAE-7058-Error-Plug-ins-Failed-to-Load

I’m thinking of either using a more robust CMake template, of which I’ve found a few, or learning how to link these dependencies with the Projucer. Having said that, I’m not necessarily convinced either of these things is the root cause, because I can still get it working on my machine when I think I’m using “Pro Tools Intro.”

I wonder if there’s any “version” based caching, because in the transition I did mess up the version number in that it went down.

I haven’t positively identified the cause, however, upon converting back to the Projucer using “Header Search Paths” to handle importing my dependencies, something which I believe should have no bearing on wrapping or codesigning, it is working. I have no reason to believe there was anything different between the two builds, for instance I understand “Hardened Runtime” is an important setting in this regard, and I believe this was set correctly. If I discover anything else, I’ll be sure to share it.

You might miss the linker flags:

OTHER_LDFLAGS = -Xlinker "-headerpad" -Xlinker 1500

This reserves room for the pace signature…

Just a shot in the dark

Is this while trying to run the plug-in installed by the build script or after you copy it to the AAX plug-ins folder manually?

Is it using the new JUCE approach of providing a symlink in the AAX folder or it’s the actual bundle in the AAX plug-ins path?

I haven’t gotten a chance to test Daniel’s suggestion in production yet, however all instances I’ve tested so far have been with copying the actual bundle to the folder manually. I’ve been confused by the automatic copying too many times, so I’m quite careful about that. Further, prior to sharing I always download the bundle from the internet to trigger Apple’s requirements too just to be totally sure.