Auval Error 4099 on macOS

Hi all, I’m seeing an unfamiliar error when using auval -a to check if my custom AU plugin is valid:

2023-12-18 14:51:21.170 auvaltool[6454:612441] Error: Failed to connect to remote view because of Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service created from an endpoint was invalidated from this process." UserInfo={NSDebugDescription=The connection to service created from an endpoint was invalidated from this process.}
aumu Yhxo Manu  -  XYZ: Artivox    Cannot open component: 4099

I’m unsure what this error means; I looked up some stuff based on the error code but they both seem off the mark:

If anybody knows what this error is and can fill me in, that would be awesome! Thank you.

See if this helps: AU validation problem! - #7 by anthony-nicholls

Thanks for linking that @sudara I should probably go back and update that post but I’m not sure calling auval -v x x x does what at least it seemed to at the time. Instead try killall -9 AudioComponentRegistrar another thing I suggest is if you are building a new version of your plugin try setting the version number of your plugin to 0 while you’re building and testing debug builds. This according to Apple (some years ago) should force it to be rescanned every time hopefully preventing any weird caching issues.

2 Likes

Thank you @sudara and @anthony-nicholls! I tried both auval -v x x x and killall -9 AudioComponentRegistrar after erasing my Components folder in both locations (and also having to erase the .component from my build folder on Desktop?), setting the build versions to 0, then rebuilding and using auval -a, but I still see the same issue.

I do some strange stuff on the way, though. I also see XYZ: Artivox Cannot open component: 2 after doing all of those commands (but before I rebuild the plugin). I would’ve thought the Registrar clear would’ve removed all references to my plugin, but it still somehow finds this (when pulling up Plugin Manager in Logic it also does this).

The other thing that happened is that is the error code slightly changed (same warning, but now 4097).

Other than that, Apple asks if I trust the application, which is to be expected, but maybe auval wants me to sign it? Unsure, let me know your thoughts!

Just wanted to update this thread. It seems like this error has to do with resizing things in the editor constructor, but I’m not sure why yet. As for auval being able to find the plugin or have a memory of it, there are three places you have to delete the .component from for it to disappear from auval:

  1. From the Components folder in ~/Library/Audio/Plug-Ins
  2. From the builds folder in your project workspace
  3. From the Trash bin (that one drove me insane trying to figure out)

Hope that helps people in the future!

I’m currently facing the same issue porting my app to iOS. The issue happens with AUv3 plugins on both macOS and iOS though:

Loaded AudioUnit out-of-process: true 
Time to open AudioUnit:         200.717  ms
This AudioUnit is a version 3 implementation.
FIRST TIME:
FATAL ERROR: Initialize: result: 4099


validation result: couldn’t be opened

I also have no idea what it means. I’ll let you know if I find anything.

@joysterling Did you get it to run by removing resize calls from the editor constructor?

edit: From what I’m seeing so far, I get the feeling that error code 4099 can refer to a whole bunch of unrelated problems. For my case, I’m pretty sure that it’s caused by my buses layout, since I now get this error on iOS:

Thread 1: "required condition is false: inSrcImpl->NumberOutputs() > 0"

In case anyone runs into the same issues I ran into:

  1. AUv3 is very picky about audio channel and MIDI port configurations. If you get this wrong, validation will fail without telling you why
    • If you have an instrument plugin, make sure you only have audio output channels enabled, and only have MIDI input enabled
    • If you have an effect plugin, make sure you have no MIDI enabled, and have audio input and output channels
  2. Make sure the Audio Unit types are “kAudioUnitType_Effect” for effects and “kAudioUnitType_MusicDevice” for instruments. If you set it to “kAudioUnitType_MusicEffect” for example, the plugin will not show up in the list of plugins
  3. If you’re building for macOS, you need to enable App Sandbox
1 Like