Unable to upload files using Linux based OmniClient library

I am trying to upload files to Nucleus using the Linux based OmniClient library. I am using omniClientCopy API to copy the files from local machine to Nucleus server.

I have referenced linux-x64/libomniclient.so in my C# project and I am invoking omniClientCopy API using Interop Services.

Here is the snippet that makes the call to Nucleus.

omniClientWait(omniClientCopy(localFilePath, serverFilePath, IntPtr.Zero, CopyCallbackImpl, Convert.ToUInt32(OmniClientCopyBehavior.eOmniClientCopy_Overwrite), “”));

Callback Result: eOmniClientResult_ErrorConnection
Error: Connection

Exception from OmniClient Library: Terminate called without an active exception

Sometime this API works, with eOmniClientResult_Ok response, if I try to upload 20-40KB files, but if I try to upload a larger file, then I get eOmniClientResult_ErrorConnection back from the callback method.

Not sure what is happening inside the C++ library.

How can I fix this issue?

@siddharth.s1312 , to help narrow down this issue, we’d need to see your Nucleus LFT logs, and your verbose logs from your tool you’re working on.

The call is not coming to the lft service. From Nginx access logs, it looks like it is getting rejected from /omni/auth/api/device/authorize HTTP/1.1" 400.

What could be the reason for this HTTP 400 status code?

The problem is resolved now after updating omniClient library to a recent version.