Running on …
Couchbase Lite .Net 3.0.0
RPi4 aarch64 (Linux / Debian)
Unhandled exception. System.TypeInitializationException: The type initializer for ‘Couchbase.Lite.Database’ threw an exception.
—> System.DllNotFoundException: Unable to load shared library ‘LiteCore’ or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libLiteCore: cannot open shared object file: No such file or directory
at LiteCore.Interop.Native.c4log_getDomain(Byte* name, Boolean create)
at Couchbase.Lite.Logging.FileLogger.SetupDomainObjects()
at Couchbase.Lite.Logging.FileLogger…ctor()
at Couchbase.Lite.Logging.Log…ctor()
at Couchbase.Lite.Database…cctor()
— End of inner exception stack trace —
at Couchbase.Lite.Database…ctor(String name, DatabaseConfiguration configuration)
at NetClient.Program.Main(String args) in /home/pi/development/net-client/Program.cs:line 16
using System;
using System.IO;
using Couchbase.Lite;
using Couchbase.Lite.Query;
using Couchbase.Lite.Sync;
using Couchbase.Lite.Support;
namespace NetClient
{
class Program
{
static void Main(string[] args)
{
// Couchbase.Lite.Support.Activate();
// Create or open database
var database = new Database("mydb");
// Create replicator to push and pull changes to and from the cloud
var targetEndpoint = new URLEndpoint(new Uri("wss://...."));
var replConfig = new ReplicatorConfiguration(database, targetEndpoint);
// Add authentication
replConfig.Authenticator = new BasicAuthenticator("...", "...");
// Optionally, Create replicator (make sure to add an instance or static variable
// named _Replicator)
var _Replicator = new Replicator(replConfig);
_Replicator.AddChangeListener((sender, args) =>
{
if (args.Status.Error != null)
{
Console.WriteLine($"Error :: {args.Status.Error}");
}
});
// Start replicator
_Replicator.Start();
}
}
}