Forum Xamarin.iOS

Adding a Developer Account Throws an Error

Just tried adding a Developer Account to the Xamarin Studio Preferences and I am receiving this error.

Any Help would be great!!

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Could not add internet password to keychain: The specified item already exists in the keychain.
at MonoDevelop.MacInterop.Keychain.AddInternetPassword (System.Uri uri, System.String password) [0x0015f] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/addins/MacPlatform/MacInterop/Keychain.cs:774
at MonoDevelop.MacDev.Gui.DeveloperAccountManagerWidget.AddClicked (System.Object sender, System.EventArgs args) [0x0005d] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/Gui/AppleDeveloperAccountsPanel.cs:365
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/MonoMethod.cs:230
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00069] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/MonoMethod.cs:238
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System.Reflection/MethodBase.cs:114
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000d5] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System/Delegate.cs:424
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00018] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System/MulticastDelegate.cs:72
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.5/mcs/class/corlib/System/Delegate.cs:398
at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in :0
at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in :0
at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in :0


  • @mhutch Bump. Someone from Xamarin, please help.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    Not sure how that happened, it looks like your username/password is already in the keychain and XS is trying to re-add it. Maybe @jstedfast would know how this could happen.

    You should be able to work around this by opening the Keychain Access app and removing your developer account's username/password.

  • Thanks @mhutch. My Apple Developer account is not in the keychain access app. We use a different developer account for Xamarin compared to the one we use for Apple.

    Xamarin on the build machine doesn't have any developer accounts attached to it yet. So any help by @jstedfast would be great.


  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    I have no idea how this could happen because before adding the password, we search for the username and it is returning a value that says the username was not found, so it should be safe to add it.

    Somehow, it is returning an error that the username already exists which doesn't make sense because the previous method invocation returned that it didn't.

    Someone else reported this a month or so ago and I fixed it to handle that error code w/o throwing an exception, but I have no idea how it could possibly happen and have been unable to reproduce it.

  • Hey @jstedfast

    I have a TeamViewer Account attached to the build machine if you would like to try it for your self? I don't mind giving you the login details to take a look and recreate.

    Ive tried everything to get past this error. Restarts, check for updates etc... I can't publish my app without it. So please help.

  • @jstedfast & @mhutch, Bump. It is still not working. Please help.

  • @mhutch & @jstedfast

    This preview still throws the same error as before.

  • @mhutch & @jstedfast


    Still not working as of Monday Morning.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    I just replaced it with a new build of 4.2.3 that checks for the DuplicateItem error code and ignores it

  • Hey @mhutch & @jstedfast

    It worked. Thanks Guys. May I suggest something? Don't break things for the user. If you still want to implement that code, just don't throw the error please. Just send the error off to the team, but let the user keep moving forward. Don't make it a firm stop that requires the user to ask questions. Make sense?

    Now, for the error. I just wanted to let you know my setup. I have a Mac build machine with a different UserAccount from Apple signed into the box. I added a Developer account from an entirely different account, so maybe the accounts are conflicting...

    Anyway, thanks!

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    We're moving in that direction (automating the sending of bug crash/exception logs), but we aren't completely there yet.

Sign In or Register to comment.