net-ipfs-engine icon indicating copy to clipboard operation
net-ipfs-engine copied to clipboard

CBOR and dynamic class

Open richardschneider opened this issue 7 years ago • 1 comments

CBOR is failing only on netcoreapp 2.0

            var obj = new { simple = "object" };
            var cid = await ipfs.Dag.PutAsync(obj, multiHash: "sha3-512");
Failed   Example1
Error Message:
 Test method Ipfs.Engine.DagApiTest.Example1 threw exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: type
Stack Trace:
    at System.Reflection.RuntimeReflectionExtensions.GetRuntimeMethod(Type type, String name, Type[] parameters)
   at PeterO.DebugUtility.Log(String str)
   at PeterO.Cbor.PropertyMap.HasCustomAttribute(Type t, String name)
   at PeterO.Cbor.PropertyMap.GetPropertyList(Type t)
   at PeterO.Cbor.PropertyMap.<GetProperties>d__22.MoveNext()
   at PeterO.Cbor.CBORObject.FromObject(Object obj, PODOptions options)
   at Ipfs.Engine.CoreApi.DagApi.<PutAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Ipfs.Engine.DagApiTest.<Example1>d__11.MoveNext() in C:\Users\Owner\Documents\GitHub\net-ipfs-engine\test\CoreApi\DagApiTest.cs:line 125
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)```

richardschneider avatar Aug 07 '18 23:08 richardschneider

That is due to a logging call that was commented out as of the latest release.

peteroupc avatar Sep 11 '18 07:09 peteroupc