EXCEPTION: The type initializer for 'Couchbase.Lite.Support.IOSProxy' threw an exception

I’ve been running Couchbase.Lite.Enterprise 2.8.6 (stand-alone no sync) from Xamarin.Forms for few years now. Now all of a sudden, it stopped working due this error. It works in simulator but not in the actual iPhone. The exception is coming from this piece of code:

try
{
Database.Log.Console.Level = Couchbase.Lite.Logging.LogLevel.None;
}
catch (Exception ex)
{
string foo = ex.Message;
}

I’d appreciate any help. Thank you.

Debug info from Visual Studio:

Data {System.Collections.ListDictionaryInternal} System.Collections.ListDictionaryInternal
Exception of type ‘Mono.Debugger.Soft.VMDisconnectedException’ was thrown.
HResult -2146233036 int
HelpLink (null) string
InnerException {System.DllNotFoundException: Unable to find or open library at /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/CFNetwork at Couchbase.Lite.Support.IOSProxy.GetPointer (System.String libPath, System.String symbolName) [0x00015…} System.DllNotFoundException
base {System.TypeLoadException} System.TypeLoadException
base {System.SystemException} System.SystemException
Exception of type ‘Mono.Debugger.Soft.VMDisconnectedException’ was thrown.
Message Unable to find or open library at /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/CFNetwork string
TypeName string
Non-public members
AssemblyName The name ‘AssemblyName’ does not exist in the current context.
ClassName The name ‘ClassName’ does not exist in the current context.
MessageArg The name ‘MessageArg’ does not exist in the current context.
ResourceId The name ‘ResourceId’ does not exist in the current context.
Message The type initializer for ‘Couchbase.Lite.Support.IOSProxy’ threw an exception. string
Source Couchbase.Lite string
StackTrace at Couchbase.Lite.DI.Service…cctor () [0x00036] in C:\Jenkins\workspace\couchbase-lite-net-edition-build\couchbase-lite-net-ee\couchbase-lite-net\src\Couchbase.Lite.Shared\API\DI\Service.cs:87 string
TargetSite {Void .cctor()} System.Reflection.RuntimeConstructorInfo
Exception of type ‘Mono.Debugger.Soft.VMDisconnectedException’ was thrown.
TypeName Couchbase.Lite.Support.IOSProxy string

This was probably caused by an update to iOS. At some point Apple changed the location of one of the libraries that Couchbase Lite was using. The new location is attempted, along with the old one, starting with version 3.1.3.

I guess it’s time for an upgrade. Thank you for the info!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.