onnx model in ubuntu 18.04 not running - azure-machine-learning-service

I am trying to implement custom vision solution using C#, Azure custom vision, and ONNX Model. My API code is running perfect on windows OS, but when I am trying to run same code on Ubuntu 18.04, getting below error.
I have download trained ONNX model from Azure ml.
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.DllNotFoundException: Unable to load shared library 'api-ms-win-core-com-l1-1-0.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libapi-ms-win-core-com-l1-1-0.dll: cannot open shared object file: No such file or directory
at WinRT.Platform.CoIncrementMTAUsage(IntPtr* cookie)
at WinRT.WinrtModule..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
at System.Activator.CreateInstance[T]()
at System.LazyHelper.CreateViaDefaultConstructor[T]()
at System.Lazy`1.CreateViaDefaultConstructor()
at System.Lazy`1.ViaConstructor()
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.Lazy`1.get_Value()
at WinRT.WinrtModule.get_Instance()
at WinRT.WinrtModule.GetActivationFactory(String runtimeClassId)
at WinRT.BaseActivationFactory..ctor(String typeNamespace, String typeFullName)
at Windows.Storage.StorageFile._IStorageFileStatics..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
at System.Activator.CreateInstance[T]()
at WinRT.WeakLazy`1.get_Value()
at Windows.Storage.StorageFile._IStorageFileStatics.get_Instance()
at Windows.Storage.StorageFile.GetFileFromPathAsync(String path)
at CustomVisionAPI.Controllers.HomeController.Run() in /home/aaa/bbb/CutomVision/WebApplication1/Controllers/HomeController.cs:line 44
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
at System.Threading.QueueUserWorkItemCallback.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

This doesn't look like an onnxruntime issue at all.

Related

SharePoint 2019 RSI text lenght limit error

on my SharePoint 2019 farm a had problem with RSI(Recently Shared Items). When upload or create any file with long filename and share it to other employee, it does not appear in the list for these employees. Files with short name all ok.
Some debugging:
w3wp.exe (0x04F4) 0x1898 SharePoint Foundation General boj18 Medium CITPList::SetValue failed with hr 0x81020018 for fieldid {31DE87B8-15D7-44EB-B43B-CD9BAD34CA40} 473263a0-d78c-0027-d85c-2a6886aea219
w3wp.exe (0x04F4) 0x1898 SharePoint Foundation General 8kh7 High Invalid text value. The text field contains invalid data. Check the field value and try again. 473263a0-d78c-0027-d85c-2a6886aea219
w3wp.exe (0x04F4) 0x1898 SharePoint Foundation Document Sharing awfk0 Unexpected Failed to cache recently shared item 'Documents/hiden long name file.pdf': Microsoft.SharePoint.SPException: Invalid text value. The text field contains invalid data. Check the field value and try again. ---> System.Runtime.InteropServices.COMException: Invalid text value. The text field contains invalid data. Check the field value and try again. in Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Boolean bNoDemote, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bUnRestrictedUpdateInProgress, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback) в Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Boolean bNoDemote, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bUnRestrictedUpdateInProgress, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)
Field id 31de87b8-15d7-44eb-b43b-cd9bad34ca40 is a Server Redirected Url they have MaxLength : 255. I think this is a problem, but currently i don't know what to do next and how to fix it
I tried find this field in ui, but nothing found

Adding Vendor lookup to custom field

I added a custom field for vendorid on the SO Line. (Yes, I know there is one there, but we are building some new logic). I've added the integer field and it appears on the grid fine. I'm trying to get a lookup of vendors. I started with this
Where<AP.Vendor.type, NotEqual<BAccountType.employeeType>>>))]
and then tried
Where<BAccountR.type, Equal<BAccountType.companyType>,
Or<AP.Vendor.type, NotEqual<BAccountType.employeeType>>>>),
Visibility = PXUIVisibility.SelectorVisible, CacheGlobal = true, Filterable = true)]
It got me a lookup on new records, but then when I save and try to open any sales order, I get an error that says "Error: An error occurred during the processing of the field InventoryID: Specified cast is not valid.." which makes no sense to me. But if I remove the above it works, so seems like that must be the issue.
Stack Trace as requested:
Error: Error: An error occurred during processing of the field InventoryID: Specified cast is not valid..
Raised At: 2/24/2020 6:47:58 PM Screen: SO.30.10.00
Details:
2/24/2020 6:47:58 PM Error:
Error: An error occurred during processing of the field InventoryID: Specified cast is not valid..
System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at PX.Data.PXDataRecord.GetInt32(Int32 i)
at PX.Data.PXDBIntAttribute.RowSelecting(PXCache sender, PXRowSelectingEventArgs e)
at PX.Data.PXCache.OnRowSelecting(Object item, PXDataRecord record, Int32& position, Boolean isReadOnly)
at PX.Data.PXCache.OnRowSelecting(Object item, PXDataRecord record, Int32& position, Boolean isReadOnly)
at PX.Data.PXCache`1.Select(PXDataRecord record, Int32& position, Boolean isReadOnly, Boolean& wasUpdated)
at PX.Data.PXView.GetResult(Object[] parameters, PXFilterRow[] filters, Boolean reverseOrder, Int32 topCount, PXSearchColumn[] sorts, Boolean& overrideSort, Boolean& extFilter)
at PX.Data.PXView.Select(Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Objects.SO.SOOrderEntry.transactions()
at _CustomMethod(Object , Object[] )
at PX.Data.PXView.InvokeDelegate(Object[] parameters)
at PX.Data.PXView.Select(Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Data.PXGraph.ExecuteSelect(String viewName, Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
Anyone have any thoughts?
TL;DR;
Remove PXDBInt attribute from the field.
The issue here is not with Where condition but with attributes definition for the field.
[PXDBInt]
[PXUIField(DisplayName="Vendor ID")]
[AP.Vendor(typeof(Search<BAccountR.bAccountID, Where<AP.Vendor.type,
NotEqual<BAccountType.employeeType>>>))]
Actually, here you have DBField attribute twice. You have PXDBIntAttribute and Vendor attribute that contains PXDBIntAttribute inside.
Because of that the framework has the wrong fields to db columns mapping resulting in that strange error.
If you use Visual studio, I recommend you to try Acuminator extension https://marketplace.visualstudio.com/items?itemName=Acumatica.Acuminator
It highlights that type of errors
Too long for a comment, but more of a suggestion than an "answer". Try building your own PXSelector. I have a custom DAC that needs to store two vendors, and I had to abandon the AP.Vendor attribute for a custom PXSelector for mine to work. This is one of mine. In my case, I need to be able to see which one is defined as the Preferred Vendor for the warehouse, and I only want to see vendors associated with my InventoryID. SSINItemBranch is a custom DAC that is also available in the scope of this DAC's usage. The point is, use this as an example if you need one to try creating your own from scratch. If this isn't how you want to accomplish the task, at least you might isolate if the problem is a use case of the AP.Vendor attribute or something else.
[PXSelector(
typeof(Search2<
Vendor.bAccountID,
InnerJoin<POVendorInventory,
On<POVendorInventory.vendorID, Equal<Vendor.bAccountID>,
And<POVendorInventory.inventoryID, Equal<Current<SSINItemBranch.inventoryID>>>>,
LeftJoin<INItemSite, On<INItemSite.inventoryID, Equal<POVendorInventory.inventoryID>,
And<INItemSite.preferredVendorID, Equal<POVendorInventory.vendorID>,
And<INItemSite.preferredVendorLocationID, Equal<POVendorInventory.vendorLocationID>,
And<INItemSite.preferredVendorOverride, Equal<True>>>>>>>,
Where<Vendor.type, Equal<BAccountType.vendorType>>>),
typeof(Vendor.acctCD),
typeof(Vendor.acctName),
typeof(POVendorInventory.vendorLocationID),
typeof(INItemSite.preferredVendorOverride),
typeof(POVendorInventory.vendorInventoryID),
typeof(POVendorInventory.vLeadTime),
SubstituteKey = typeof(Vendor.acctCD),
DescriptionField = typeof(Vendor.acctName),
Filterable = true
)]

SparkCLR: process Text file fails

I am trying to learn SparkCLR to process a text file and run a Spark SQL query on it using a Sample like below:
[Sample]
internal static void MyDataFrameSample()
{
var schemaTagValues = new StructType(new List<StructField>
{
new StructField("tagname", new StringType()),
new StructField("time", new LongType()),
new StructField("value", new DoubleType()),
new StructField("confidence", new IntegerType()),
new StructField("mode", new IntegerType())
});
var rddTagValues1 = SparkCLRSamples.SparkContext.TextFile(SparkCLRSamples.Configuration.GetInputDataPath(myDataFile))
.Map(r => r.Split('\t')
.Select(s => (object)s).ToArray());
var dataFrameTagValues = GetSqlContext().CreateDataFrame(rddTagValues1, schemaTagValues);
dataFrameTagValues.RegisterTempTable("tagvalues");
//var qualityFilteredDataFrame = GetSqlContext().Sql("SELECT tagname, value, time FROM tagvalues where confidence > 85");
var qualityFilteredDataFrame = GetSqlContext().Sql("SELECT * FROM tagvalues");
var data = qualityFilteredDataFrame.Collect();
var filteredCount = qualityFilteredDataFrame.Count();
Console.WriteLine("Filter By = 'confidence', RowsCount={0}", filteredCount);
}
but this keeps giving me the error that says:
[2016-01-13 08:56:28,593] [8] [ERROR] [Microsoft.Spark.CSharp.Interop.Ipc.JvmBridge] - JVM method execution failed: Static method collectAndServe failed for class org.apache.spark.api.python.PythonRDD when called with 1 parameters ([Index=1, Type=JvmObjectReference, Value=19], )
[2016-01-13 08:56:28,593] [8] [ERROR] [Microsoft.Spark.CSharp.Interop.Ipc.JvmBridge] -
*******************************************************************************************************************************
at Microsoft.Spark.CSharp.Interop.Ipc.JvmBridge.CallJavaMethod(Boolean isStatic, Object classNameOrJvmObjectReference, String methodName, Object[] parameters) in d:\SparkCLR\csharp\Adapter\Microsoft.Spark.CSharp\Interop\Ipc\JvmBridge.cs:line 91
*******************************************************************************************************************************
my text file looks like below:
10PC1008.AA 130908762000000000 7.059829 100 0
10PC1008.AA 130908762050000000 7.060376 100 0
10PC1008.AA 130908762100000000 7.059613 100 0
10PC1008.BB 130908762150000000 7.059134 100 0
10PC1008.BB 130908762200000000 7.060124 100 0
Is there something wrong in the way I am using this?
Edit 1
I have set the following as my Samples project properties:
my User Environmentalvariable is as below:(not sure if that matters)
Also what i see in SparkCLRWorker log that its unable to load the assembly as per the logs:
[2016-01-14 08:37:01,865] [1] [ERROR] [Microsoft.Spark.CSharp.Worker] - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.FileNotFoundException: Could not load file or assembly 'SparkCLRSamples, Version=1.5.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at System.Runtime.Serialization.FormatterServices.LoadAssemblyFromString(String assemblyName)
at System.Reflection.MemberInfoSerializationHolder..ctor(SerializationInfo info, StreamingContext context)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.SerializationInvoke(IRuntimeMethodInfo method, Object target, SerializationInfo info, StreamingContext& context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
at Microsoft.Spark.CSharp.Worker.Main(String[] args) in d:\SparkCLR\csharp\Worker\Microsoft.Spark.CSharp\Worker.cs:line 149
Did you specify the sample data location and copy your source text file to that location? If not you can refer to
https://github.com/Microsoft/SparkCLR/blob/master/csharp/Samples/Microsoft.Spark.CSharp/samplesusage.md
to set your sample data location with argument [--data | sparkclr.sampledata.loc].
Try explicitly setting [--temp | spark.local.dir] option (see sampleusage.md for more info on supported arguments) when you run your code. SparkCLR worker executable gets downloaded into this directory at the time of execution. If you use default temp directory, there is a possibility that the worker executable will get quarantined by your anti-virus software mistaking it for some malicious program downloaded by your browser. Overriding the default value to something like c:\temp\SparkCLRTemp will help avoiding that problem.
If setting temp directory does not help, share the entire commandline argument list you are using when launching SparkCLR driver code.
this is how you change the port number, I hope this helps
in App.config add the following
for the sake of completeness, you must also add the tag that specifies the path to the csharpworker
<appSettings>
<add key="CSharpBackendPortNumber" value="num"/>
<add key="CSharpWorkerPath" value="C:\MobiusRelease\samples\CSharpWorker.exe"/>
</appSettings>
notice, to make this work in debug mode you should first run this command using command line,
from the (mobius home) directory
%SPARKCLR_HOME%\scripts
run
sparkclr-submit.cmd debug
this will give you a message like this that contains a port number
[CSharpRunner.main] Port number used by CSharpBackend is 5567
* [CSharpRunner.main] Backend running debug mode. Press enter to exit *

NPM stop working in Visual Studio 2015 after node.js Upgrade

I had to upgrade my machine Node.js and NPM to fix the Long Path issue in Windows, but this broke VS 2015.
I tried to reinstall VS 2015 but without any success.
When I try to install any package from VS 2015 the console pop this message below:
System.AggregateException: One or more errors occurred. --->
Microsoft.NodejsTools.Npm.PackageJsonException: Error reading
package.json at
'C:\Users\FilipeAugusto\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\package.json':
Error reading package.json. The file may be parseable JSON but may
contain objects with duplicate properties.
The following error occurred:
Can not add Newtonsoft.Json.Linq.JValue to
Newtonsoft.Json.Linq.JObject. --->
Microsoft.NodejsTools.Npm.PackageJsonException: Error reading
package.json. The file may be parseable JSON but may contain objects
with duplicate properties.
The following error occurred:
Can not add Newtonsoft.Json.Linq.JValue to
Newtonsoft.Json.Linq.JObject. ---> System.ArgumentException: Can not
add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject. at
Newtonsoft.Json.Linq.JObject.ValidateToken(JToken o, JToken existing)
at Newtonsoft.Json.Linq.JContainer.InsertItem(Int32 index, JToken
item, Boolean skipParentCheck) at
Newtonsoft.Json.Linq.JObject.InsertItem(Int32 index, JToken item,
Boolean skipParentCheck) at
Newtonsoft.Json.Linq.JContainer.AddInternal(Int32 index, Object
content, Boolean skipParentCheck) at
Newtonsoft.Json.Linq.JContainer.Add(Object content) at
Newtonsoft.Json.Linq.JTokenWriter.AddValue(JValue value, JsonToken
token) at Newtonsoft.Json.Linq.JTokenWriter.WriteNull() at
Newtonsoft.Json.JsonWriter.AutoCompleteClose(JsonContainerType type)
at Newtonsoft.Json.JsonWriter.WriteEndObject() at
Newtonsoft.Json.JsonWriter.WriteEnd(JsonContainerType type) at
Newtonsoft.Json.JsonWriter.WriteEnd() at
Newtonsoft.Json.JsonWriter.AutoCompleteAll() at
Newtonsoft.Json.Linq.JTokenWriter.Close() at
Newtonsoft.Json.JsonWriter.System.IDisposable.Dispose() at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateJObject(JsonReader
reader) at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader
reader, Type objectType, JsonContract contract, JsonProperty member,
JsonContainerContract containerContract, JsonProperty containerMember,
Object existingValue) at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader
reader, Type objectType, JsonContract contract, JsonProperty member,
JsonContainerContract containerContract, JsonProperty containerMember,
Object existingValue) at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader
reader, Type objectType, Boolean checkAdditionalContent) at
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader,
Type objectType) at
Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type,
JsonSerializerSettings settings) at
Microsoft.NodejsTools.Npm.ReaderPackageJsonSource..ctor(TextReader
reader) --- End of inner exception stack trace --- at
Microsoft.NodejsTools.Npm.ReaderPackageJsonSource..ctor(TextReader
reader) at
Microsoft.NodejsTools.Npm.FilePackageJsonSource..ctor(String
fullPathToFile) --- End of inner exception stack trace --- at
Microsoft.NodejsTools.Npm.FilePackageJsonSource.WrapExceptionAndRethrow(String
fullPathToFile, Exception ex) at
Microsoft.NodejsTools.Npm.FilePackageJsonSource..ctor(String
fullPathToFile) at
Microsoft.NodejsTools.Npm.DirectoryPackageJsonSource..ctor(String
fullDirectoryPath) at
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
at Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) at
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
at Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) at
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
at
Microsoft.NodejsTools.Npm.SPI.NpmController.d__1.MoveNext()
--- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.NodejsTools.Npm.PackageJsonException: Error reading
package.json at
'C:\Users\FilipeAugusto\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\package.json':
Error reading package.json. The file may be parseable JSON but may
contain objects with duplicate properties.
The following error occurred:
Can not add Newtonsoft.Json.Linq.JValue to
Newtonsoft.Json.Linq.JObject. --->
Microsoft.NodejsTools.Npm.PackageJsonException: Error reading
package.json. The file may be parseable JSON but may contain objects
with duplicate properties.
The following error occurred:
Can not add Newtonsoft.Json.Linq.JValue to
Newtonsoft.Json.Linq.JObject. ---> System.ArgumentException: Can not
add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject. at
Newtonsoft.Json.Linq.JObject.ValidateToken(JToken o, JToken existing)
at Newtonsoft.Json.Linq.JContainer.InsertItem(Int32 index, JToken
item, Boolean skipParentCheck) at
Newtonsoft.Json.Linq.JObject.InsertItem(Int32 index, JToken item,
Boolean skipParentCheck) at
Newtonsoft.Json.Linq.JContainer.AddInternal(Int32 index, Object
content, Boolean skipParentCheck) at
Newtonsoft.Json.Linq.JContainer.Add(Object content) at
Newtonsoft.Json.Linq.JTokenWriter.AddValue(JValue value, JsonToken
token) at Newtonsoft.Json.Linq.JTokenWriter.WriteNull() at
Newtonsoft.Json.JsonWriter.AutoCompleteClose(JsonContainerType type)
at Newtonsoft.Json.JsonWriter.WriteEndObject() at
Newtonsoft.Json.JsonWriter.WriteEnd(JsonContainerType type) at
Newtonsoft.Json.JsonWriter.WriteEnd() at
Newtonsoft.Json.JsonWriter.AutoCompleteAll() at
Newtonsoft.Json.Linq.JTokenWriter.Close() at
Newtonsoft.Json.JsonWriter.System.IDisposable.Dispose() at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateJObject(JsonReader
reader) at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader
reader, Type objectType, JsonContract contract, JsonProperty member,
JsonContainerContract containerContract, JsonProperty containerMember,
Object existingValue) at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader
reader, Type objectType, JsonContract contract, JsonProperty member,
JsonContainerContract containerContract, JsonProperty containerMember,
Object existingValue) at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader
reader, Type objectType, Boolean checkAdditionalContent) at
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader,
Type objectType) at
Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type,
JsonSerializerSettings settings) at
Microsoft.NodejsTools.Npm.ReaderPackageJsonSource..ctor(TextReader
reader) --- End of inner exception stack trace --- at
Microsoft.NodejsTools.Npm.ReaderPackageJsonSource..ctor(TextReader
reader) at
Microsoft.NodejsTools.Npm.FilePackageJsonSource..ctor(String
fullPathToFile) --- End of inner exception stack trace --- at
Microsoft.NodejsTools.Npm.FilePackageJsonSource.WrapExceptionAndRethrow(String
fullPathToFile, Exception ex) at
Microsoft.NodejsTools.Npm.FilePackageJsonSource..ctor(String
fullPathToFile) at
Microsoft.NodejsTools.Npm.DirectoryPackageJsonSource..ctor(String
fullDirectoryPath) at
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
at Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) at
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
at Microsoft.NodejsTools.Npm.SPI.NodeModules..ctor(IRootPackage
parent, Boolean showMissingDevOptionalSubPackages) at
Microsoft.NodejsTools.Npm.SPI.RootPackage..ctor(String
fullPathToRootDirectory, Boolean showMissingDevOptionalSubPackages)
at
Microsoft.NodejsTools.Npm.SPI.NpmController.d__1.MoveNext()<---
I tried this links that may fix the issue, but none of those help me:
Can not add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject. ---> Microsoft.NodejsTools.Npm.PackageJsonException: Error reading package.json. The file may be parseable JSON but may contain objects with duplicate properties
Global packages not loading due to Microsoft.NodejsTools.Npm.PackageJsonException with npm dependency
Error - Cannot load global packages." after fresh install of node/npm

SharePoint 2010 document library upload fails for particular user - doc already exists with same name

I have a SharePoint 2010 document library in a publishing site (with workflow - standard approval) that does not have any custom code running in it. It is just configured with OOTB features - Metadata Service tagging, versioning (no checkout required, uploading to add as new versions for existing files, adds each version as a new major version), SharePoint Search etc. Only thing not OOTB is setting up of a PDF iFilter as the library stores PDFs.
Other users can upload new versions of documents with no issues, but one user (who has approver rights across the site collection) cannot. Each time he tries to upload a newer version of a document to the library he gets an error message:
The specified name is already in use. The document or folder name was not changed. To change the name to a different value, close this dialog and edit the properties of the document or folder.
Checking the SP log files with the correlation ID does not really show much, beyond this exception:
System.Runtime.InteropServices.COMException: The specified name is already in use. The document or folder name was not changed. To change the name to a different value, close this dialog and edit the properties of the document or folder.
at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)
at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)

Resources