You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'TestRunCompleteArgs.Error.TargetSite.Module.Assembly'.
Steps to reproduce
Run a test which abnormally crashes test host, example: ShouldGetErrorMessageOnTesthostExitWithError acceptance test.
Try to serialize exception.
Expected behavior
vstest.console should exit.
Actual behavior
Newtonsoft.Json.JsonSerializationException occurred
HResult=0x80131500
Message=Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'TestRunCompleteArgs.Error.TargetSite.Module.Assembly'.
Source=<Cannot evaluate the exception source>
StackTrace:
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.Linq.JToken.FromObjectInternal(Object o, JsonSerializer jsonSerializer)
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.JsonDataSerializer.SerializePayload(String messageType, Object payload) in C:\Users\samadala\src\tmp\backup\vstest-enlist-2\vstest\src\Microsoft.TestPlatform.CommunicationUtilities\JsonDataSerializer.cs:line 134
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestSender.OnTestRunAbort(ITestRunEventsHandler testRunEventsHandler, Exception exception) in C:\Users\samadala\src\tmp\backup\vstest-enlist-2\vstest\src\Microsoft.TestPlatform.CommunicationUtilities\TestRequestSender.cs:line 297
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestSender.ListenAndReportTestResults(ITestRunEventsHandler testRunEventsHandler) in C:\Users\samadala\src\tmp\backup\vstest-enlist-2\vstest\src\Microsoft.TestPlatform.CommunicationUtilities\TestRequestSender.cs:line 262
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestSender.<>c__DisplayClass17_0.<StartTestRunAndListenAndReportTestResults>b__0() in C:\Users\samadala\src\tmp\backup\vstest-enlist-2\vstest\src\Microsoft.TestPlatform.CommunicationUtilities\TestRequestSender.cs:line 198
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
Workaround
Passing exception as null for TestRunCompleteEventArgs.
The text was updated successfully, but these errors were encountered:
* Dont pick package from fallbackPackageFolders as we want all the packages in vstest\package folder
* Issue:
1) #706
2) #618
Fix:
Don’t serialize the type if that have self-referencing loop
* Address PR comment.
* Log the exception in EqtTrace thrown from OnDiscoveryAbort and OnTestRunAbort
Description
Steps to reproduce
Expected behavior
Actual behavior
Workaround
The text was updated successfully, but these errors were encountered: