AMSupportURLConnectionDelegate and AMSSupportURLSession both multiply defined

When running various tools, such as "opendiff" I receive the following error:

objc[6599]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1e30deb90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108f7c2c8). One of the two will be used. Which one is undefined.

objc[6599]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1e30debe0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108f7c318). One of the two will be used. Which one is undefined.


This appears to be related to the problems reported here: https://discussions.apple.com/thread/252824300

(Apple won't let me update that thread and is forcing me to make a new one -- what's up with that, Apple?)


This is probably caused by something installing a conflicting library -- in the above thread, various people are using homebrew, I am using MacPorts -- but the issue is the same.


What makes this VERY peculiar is that there is actually no file on my system with the name /usr/lib/libauthinstall.dylib so I cannot determine where this conflict is coming from.


I have an M1 mac.

MacBook Pro 14″, macOS 12.1

Posted on Jan 4, 2022 8:51 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 21, 2022 11:59 AM

try a simple, documented step first

In Terminal:


sudo xcode-select -r


explanation

The command resets xcode to the default path (see documentation excerpt below). This command

  • resolved the issue for me and
  • avoided the risk of introducing random, undocumented ideas from strangers.

These advantages make it worth trying first, especially since documented approaches typically won't interfere with future version upgrades. Experimental workarounds may need to be undone first.


source: https://stackoverflow.com/questions/65089767/class-amsupporturlconnectiondelegate-is-implemented-in-both

41 replies

Jan 15, 2022 1:44 PM in response to MrHoffman

MrHoffman wrote:

I have not seen these “ambiguous API” messages outside of log chatter.

You just have to run the right command. It comes and goes depending on the build, but I've seen it for at least a decade.

wipe the install, reload Xcode and the command line tools, and try to duplicate the issue there. With a clean install of macOS Monterey and the development tools, Apple might be more interested.

I made a point to self-censor in my prior post to avoid getting moderated. But telling the poor sap to reinstall Xcode is just cruel. 😄 I can confirm the message appears when running opendiff. This particular message is quite common in Apple's custom tools that most people never run.


Certain people just need to accept that sometimes the world simply doesn't measure up to their expected levels of perfection. Some Apple engineer, working from home due to COVID, maybe working from home in the USA while having COVID, made some change to a dylib on some other platform and some other engineer fixed it to get a build released on time. Life happens, you know?

Feb 14, 2022 5:06 AM in response to andrewhw00

Ditto. Macbook Pro M1, macOS 12.1, Macports. But in my case, I'm getting the error when using git, which was NOT installed via Macports - it has its own installer. And same as you, there is no /usr/lib/libauthinstall.dylib.


This has happened recently: it's Monday and I didn't have the problem on Friday. Updating to macOS 12.2.1 and running port selfupdate hasn't made any difference.


In my case, the error is identical except for the Hex numbers:

$ git status
objc[10068]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x201a7b678) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10856c2c8). One of the two will be used. Which one is undefined.
objc[10068]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x201a7b6c8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10856c318). One of the two will be used. Which one is undefined.

Jan 12, 2022 3:19 PM in response to andrewhw00

I also get this message when I open up new terminal window via the Terminal app, but I do not get it when opening new terminal windows within my IDE (Nova by Panic). I do not use homebrew to manage packages, and haven't installed MacPorts yet. For node, I use nvm to manage versions per project with default node set to v16.13.1, and only install packages and modules locally to projects that require them. For everything else, rather than use homebrew, I prefer to install manually via curl (haven't set up wget yet) or downloading a package installer.


I did not get this message until after I finished some dev environment set up that included: AWS-Cli (requiring me to create bin directory in /usr/local). Prior to that my client's custom npm package registry was failing on install (local to project). Long story, but y'all get the idea.


My paths set in .zshrc seem fine (never been a problem on other machines), but I'm wondering if there's something that's being sourced when I open the Terminal app that's triggering this log message.

Jan 13, 2022 9:38 AM in response to etresoft

andrewhw00 wrote:

When running various tools, such as "opendiff" I receive the following error:
objc[6599]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1e30deb90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108f7c2c8). One of the two will be used. Which one is undefined.
objc[6599]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1e30debe0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108f7c318). One of the two will be used. Which one is undefined.


This is normal and very common.


Common, perhaps, but not "normal". Unmanaged symbol duplication from multiple sources risks conflicting symbol definition if the sources provide different implementations. This is a common source of fragility when dynamic libraries are used, and typically one wants to be able to rigorously ensure that the correct version of the symbol is being presented.


This is why the error message is being reported in the first place, in order to make users aware of this potential fragility. In the current situation, it appears that the two conflicting implementations are similar enough that the program(s) "work" but having this situation being reported by a vendor supplied system tool makes me think that it is quite likely that other tools using the system libraries are having the same issue, but as they are not being invoked from the command line that the error state is not being seen.


Whether this is "common" I cannot comment on, but certainly this is not "normal" in systems design.


Thank you for letting me know about Apple's policy of automatically locking a thread if no further comments have been added in a six month time frame.


Dynamic libraries only exist in the operating system cache. They don't normally have a stand-alone dylib. But the macOS operating system is easily the most complex operating system ever made, so there are lots of things that fall through the cracks and show up in places like this.

This first sentence in this statement is certainly not true. There are dozens of dynamic libraries in the filesystem in MacOSX as well as every other operating environment commonly in use.


Until I saw this error, I was unaware that it was possible in MacOSX that a library could exist without "a stand-alone dylib" as you put it. Are there docs on this cache? It seems more than a little peculiar that the error system seems to depend on having an on-disk version of the dynamic library to report on if it is expected that on-disk copies are unusual -- and that is exactly what is in the error message here.


The MacOSX operating system is certainly quite complicated -- we are in absolute agreement there. It is exactly the fragility that comes with complexity that I am attempting to manage.


Do you know the name of this library definition cache? Or the tools to manage it?


It seems that what is required to solve this problem is simply a cache flush, however without knowing the name of the technology managing the cache, flushing it is quite difficult.


Jan 13, 2022 9:46 AM in response to andrecrimb_w

Thanks for the suggestion, @andrecrimb_w -- though I should make clear that this is not an architecture incompatibility issue. All the code I am using is native ARM/M1, so Rosetta (as a tool to manage Intel execution on the ARM based M1 chip) shouldn't come into play here.


I can't comment on the Homebrew setup however -- it may be quite helpful there.


Thanks!

Jan 14, 2022 4:25 AM in response to etresoft

You seem to be getting upset. This was really a fairly simple question, and I believe that your comment about the release notes will help. Thank-you for that.


I will note that I am not seeing these errors within the Xcode debugger console. These are showing up at the command line in Terminal. (I don't even have Xcode open -- the only reason Xcode is in this discussion at all is because opendiff gets shipped as part of the Xcode suite.)


So while these errors may have been reported for quite some time within the developer tools internal error stream, this is, to my knowledge, the first time that they have actually appeared directly on stderr when running the command line tools. I understand that to Apple the command line environment is not the bread-and-butter interface to the system, but it is where I and many other users do all our work.

Jan 14, 2022 6:30 AM in response to andrewhw00

andrewhw00 wrote:

You seem to be getting upset.

Upset? No. Exasperated? Totally! I will tell you that questioning someone’s emotional state is not the novel and effective rhetorical strategy you think it is.

the only reason Xcode is in this discussion at all is because opendiff gets shipped as part of the Xcode suite.

And because you posted this question in the Developer forum.

this is, to my knowledge, the first time that they have actually appeared directly on stderr when running the command line tools.

As I said above, this has been a normal and common message for at least a decade.

Jan 15, 2022 8:49 AM in response to etresoft

Exasperated then. This is really quite a simple question.


It is helpful to know that this message has been common inside of the Xcode console for "at least a decade". That doesn't actually mean that it isn't a problem, however, as symbol collision does indeed lead to dynamic object fragility.


The reason I am posting this here, as I did neglect to mention in my original post, is because Apple Technical Support asked me to post this here, on the grounds that user level tools provided by Xcode would get some kind of answer here, and frankly, the topic seemed to be beyond them.


I will say that I am disappointed to hear that within the development environment that you are seeing so many errors of this type. Frankly, that is sloppy. Not unusual -- other vendors have allowed a similar wild west environment to flourish -- but definitely sloppy.


I am even more disappointed that errors of this type are now being allowed to leak out of the development console onto the command line.


I will also say that the conversation that we have had here -- which has very much had a flavour of "just stop asking questions" is exceedingly disappointing. The purpose of this forum is for people to learn information. Some information has been provided, for which I thank you -- some very helpful things have been said -- but the general tenor of the responses have been about trying to get me to stop asking questions, rather than simply providing answers.

Jan 15, 2022 9:09 AM in response to andrewhw00

andrewhw00 wrote:

It is helpful to know that this message has been common inside of the Xcode console for "at least a decade".

Not really, because that isn't true. I was merely referring to the extreme amount of logging present in the operating system. Most people never notice it because they never use the Terminal, where such messages might be printed. Developers commonly see those messages, generated by the operating system, in the Xcode console. Developers normally do not see this particular message for various reasons that are clearly not worth explaining.

The reason I am posting this here, as I did neglect to mention in my original post, is because Apple Technical Support asked me to post this here, on the grounds that user level tools provided by Xcode would get some kind of answer here, and frankly, the topic seemed to be beyond them.

Apple Support does not provide developer support. Even Apple Developer support does not provide any information regarding behaviour of the operating system in this respect.

I will say that I am disappointed to hear that within the development environment that you are seeing so many errors of this type. Frankly, that is sloppy. Not unusual -- other vendors have allowed a similar wild west environment to flourish -- but definitely sloppy.

I am even more disappointed that errors of this type are now being allowed to leak out of the development console onto the command line.

It is one thing to ship a billion devices and take over an industry, but something else entirely to take pot shots in a consumer support forum. Engineering can be a messy business. It is the results that matter, not the critique.

I will also say that the conversation that we have had here -- which has very much had a flavour of "just stop asking questions" is exceedingly disappointing. The purpose of this forum is for people to learn information.

Exactly! When you realizing that learning isn't occurring, it is time to wrap it up.

Jan 15, 2022 9:09 AM in response to MrHoffman

Thanks for your answer, @MrHofffman


Unfortunately, there no longer are any app support folks for OpenDiff -- at least not according to Apple Technical Support. All app support for anything related to Xcode was apparently discontinued, according to the conversation I had with them. Are you aware of any app support for Xcode that the person at Technical Support may not have been aware of? (Not a facetious question -- with an organization this size I frequently find that even the senior people in the user-facing tech support are not aware of all of the edges of support world.)


To be clear: this definitely is not "log chatter" -- these are messages being reported directly to stderr when using the tool from the command line.


Finally, thank-you for the recognition that this longstanding issue is indeed misbehaviour (regardless how common such misbehaviour may be).

Jan 15, 2022 10:33 AM in response to etresoft

Nothing I have said it meant to be a "pot shot".


Stating that an error has actually occurred upon observing the vendor provided software, when run in a vendor approved way, produces an error message isn't a pot shot.


My observation that I am disappointed to learn that this likely is occurring because of a longstanding unmanaged misbehaviour at a lower level is not meant to be a "pot shot" either -- just an honest observation of a user of this system.


I don't see how the number of devices shipped, nor any measure of market capitalization as you mentioned earlier, has anything to do with this situation.


I am now perplexed by your statement that "Developers normally do not see this particular message for various reasons that are clearly not worth explaining." This directly contradicts what you said earlier. Is this, or is this not, a common error message in the developer console? As I have noted, error messages of this form are certainly NOT commonly produced on standard error.


If all you are offering is that there are lots of messages on the developer console, and that you therefore expect users of the system to simply ignore any error messages that they see, then this is, I am afraid, not useful information.

Jan 15, 2022 1:18 PM in response to andrewhw00

andrewhw00 wrote:

Nothing I have said it meant to be a "pot shot".

Let's see what the dictionary says:

pot·shot| ˈpätˌSHät | 
noun
a shot aimed unexpectedly or at random at someone or something with no chance of self-defense: a sniper took a potshot at him
• a criticism, especially a random or unfounded one: the show takes wickedly funny potshots at movies

You insulted Apple developers behind their back by calling their work "sloppy".

Your criticisms are completely unfounded.

Ergo - a "pot shot".

Stating that an error has actually occurred upon observing the vendor provided software, when run in a vendor approved way, produces an error message isn't a pot shot.

It is a warning, not an error. The tool still works doesn't it? Ergo, no error.

My observation that I am disappointed to learn that this likely is occurring because of a longstanding unmanaged misbehaviour at a lower level is not meant to be a "pot shot" either -- just an honest observation of a user of this system.

"I'm also just a user, standing in front of a developer, asking them to be less sloppy"

I don't see how the number of devices shipped, nor any measure of market capitalization as you mentioned earlier, has anything to do with this situation.

Not once did I say anything about "market capitalization".


I did suggest that having written operating systems for over a billion devices, in dozens of different hardware configurations, and to have done so successfully, strongly suggests that Apple engineers know what they are doing and that your criticisms of sloppy work are absolutely false and unfounded.

I am now perplexed by your statement that "Developers normally do not see this particular message for various reasons that are clearly not worth explaining." This directly contradicts what you said earlier. Is this, or is this not, a common error message in the developer console?

OK. I'll try again. I never, not even once, said this was a common error message in the developer console. You simply misunderstood.


I said this has been a common error message for at least a decade. I didn't bother to mention that this has been a common error message in the Terminal for a decade because at that time, I had no idea how my statements were going to be so wildly twisted and misunderstood.


I also said that Apple likes to emit very verbose information to log systems of all kinds. I mentioned the developer console as one particular place where Apple's log messages can get out of hand. I also mentioned the Console app (completely different than the developer console, by the way) as another place where Apple's log messages can have the unintended consequence of driving people who are already mentally unstable into insanity.


To clarify, this specific message "Class <name> is implemented in both /path/to/dylib1 and /path/to/dylib2. One of the two will be used. Which one is undefined." is a normal, harmless, warning message that has been printed on the Terminal and in log files by Apple software for many years.

As I have noted, error messages of this form are certainly NOT commonly produced on standard error.

Message of this form are commonly produced on standard error.

If all you are offering is that there are lots of messages on the developer console, and that you therefore expect users of the system to simply ignore any error messages that they see, then this is, I am afraid, not useful information.

I must have neglected to mention this, but you are referring to a warning message, not an error message. If it had been an error message, then it should have been associated with some type of system or app failure. You were running opendiff, correct? Did opendiff fail in some way?


I previously suggested that users who are unaccustomed to logging messages should avoid the Console app. I think it would be better if they avoided Terminal as well, since Terminal will often emit various console messages. (Note, by "console" here, I am not referring to the Xcode debugger console, nor to Apple's Console.app, but rather, the normal behaviour of text-based tools being executed from a command-line environment.)

Feb 21, 2022 8:00 AM in response to andrewhw00

Same error, using /bin/bash as shell and MacPorts, not hombrew.


Last login: Mon Feb 21 12:42:59 on console


Restored session: Mon Feb 21 12:41:45 -03 2022


objc[1099]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x1fbc6b678) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1083682c8). One of the two will be used. Which one is undefined.


objc[1099]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x1fbc6b6c8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108368318). One of the two will be used. Which one is undefined.


objc[1124]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x1fbc6b678) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065402c8). One of the two will be used. Which one is undefined.


objc[1124]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x1fbc6b6c8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106540318). One of the two will be used. Which one is undefined.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

AMSupportURLConnectionDelegate and AMSSupportURLSession both multiply defined

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.